-
Notifications
You must be signed in to change notification settings - Fork 0
Types
Jan Horacek edited this page Nov 20, 2022
·
5 revisions
enum class LogLevel {
None = 0,
Error = 1,
Warning = 2,
Info = 3,
Commands = 4,
RawData = 5,
Debug = 6,
};
enum class TrkStatus {
Unknown = 0,
Off = 1,
On = 2,
Programming = 3,
};
using CommandCallbackFunc = void(*)(void *sender, void *data);
struct CommandCallback {
CommandCallbackFunc const func;
void *const data;
};
using Cb = CommandCallback;
struct LocoInfo {
uint16_t addr;
bool direction;
uint8_t speed;
uint8_t maxSpeed;
uint32_t functions;
bool usedByAnother;
};
using TrkAcquiredCallback = void(*)(const void *sender, LocoInfo);
using TrkStdNotifyEv = void(*)(const void *sender, void *data);
using TrkStatusChangedEv = void(*)(const void *sender, void *data, int trkStatus);
using TrkLogEv = void(*)(const void *sender, void *data, int logLevel, const char16_t *msg);
using TrkLocoEv = void(*)(const void *sender, void *data, uint16_t addr);
using TrkMsgEv = void(*)(const void *sender, void *data, const char16_t *msg);