73 unsigned long GetID() {
return m_ID;};
77 void SetID(
unsigned long id) {m_ID=id;};
104 virtual int StartUp() {
return m_AutoStart?Start():0;}
162 int Initialize() {
return Superclass::Initialize();}
165 void Shutdown() {Superclass::Shutdown();}
#define ALBA_ID_DEC(idname)
This macros is used to define a new Id and should be placed in a .cpp file.
long albaID
type for IDs inside ALBA
An agent processing the queued events on a separate thread.
void Shutdown()
Shutdown the agent, Subclasses can redefine InternalShutdown() to customize actions for shutting down...
int Initialize()
Initialize this agent.
This abstract class manages function calls coming from devices and issue specific events to interacto...
void SetID(unsigned long id)
Set ID for this device.
virtual void SetName(const char *name)
Set the Device name and rise an event to advise consumers.
virtual int InternalRestore(albaStorageElement *node)
This function fills in the device with settings restored from the node.
albaTypeMacro(albaDevice, albaAgentThreaded)
virtual int StartUp()
This checks AutoStart flag and if true Initialize the device Return false if AutoStart is OFF or init...
unsigned long GetID()
Get the ID for this device.
virtual int Start()
use this function to start (initialize) the device
void SetPersistentFlag(bool flag)
set peristent flag: a persistent device is not stored/restored and neither removed when settings are ...
void SetAutoStart(bool flag)
Set the AutoStart flag.
void AutoStartOff()
Disable autostarting of this device.
virtual int InternalInitialize()
start device
virtual void CreateGui()
Create the dialog that show the interface for settings.
virtual int InternalStore(albaStorageElement *node)
This is used to allow nested serialization of subclasses.
virtual void UpdateGui()
used to force Gui to update its content
virtual void Stop()
use this function to stop (shutdown) the device
DEVICE_MINIMUM_ID
non persistent device IDs start from ALBA_MIN_DEVICE_ID.
virtual void OnEvent(albaEventBase *event)
process events sent to the device
albaGUI * GetGui()
Return pointer to the GUI.
void AutoStartOn()
Enable autostarting of this device.
bool IsPersistent()
return true if it's a persistent device.
Implementation of the message object for the Subject/Observer design pattern.
albaGUI is a panel with function to easily create GUI.
albaStorable is an interface for serializable objects.
Abstract class representing the interface for the unit of information stored in the storage.