Accessories
Arduino for motors and lights library.
Accessories Class Reference

#include "Accessories.hpp"

Static Public Member Functions

static void begin (int inEEPROMStart = -1, int inEEPROMSize = -1)
 
static void RaiseEvent (unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent = ACCESSORIES_EVENT_MOVEPOSITIONID, int inData = 0)
 
static void ReceiveEvent (unsigned long inID, ACCESSORIES_EVENT_TYPE lastEventType, int inData)
 
static bool loop ()
 
static void wait (unsigned long inDelay)
 
static void printEvent (unsigned long inId, ACCESSORIES_EVENT_TYPE inEventType, int inEventData)
 
static void printAccessories ()
 

Detailed Description

This is the main class of the library. All data and functions are static. There is no way to instantiate this class.

Definition at line 16 of file Accessories.hpp.

Member Function Documentation

void Accessories::begin ( int  inEEPROMStart = -1,
int  inEEPROMSize = -1 
)
static

Initialize the instance.

Parameters
inEEPROMStartDefines the starting byte address to save accessories status. If the size is -1, there will be no EEPROM saving. Default is -1.
inEEPROMSizeDefines the total size of EEPROM memory available to save accessories status. If the size is -1, there will be no EEPROM saving. Default is -1.

Definition at line 24 of file Accessories.cpp.

bool Accessories::loop ( )
static

Main loop function. This function will call all necessary internal loop functions for each accessory activated...

Returns
True if something rest to execute.

Definition at line 155 of file Accessories.cpp.

void Accessories::printAccessories ( )
static

Print the full list of commanders. The list is printed on the console in a hierarchical way, with details like buttons and events. There is also all data (pins, events) associated with each item.

Remarks
Only available if COMMANDERS_PRINT_COMMANDERS is defined.

Definition at line 133 of file Accessories.cpp.

void Accessories::printEvent ( unsigned long  inId,
ACCESSORIES_EVENT_TYPE  inEventType,
int  inEventData 
)
static

Print on the console the given event in plain English.

Remarks
Only available if ACCESSORIES_DEBUG_MODE is defined.

Definition at line 56 of file Accessories.cpp.

void Accessories::RaiseEvent ( unsigned long  inId,
ACCESSORIES_EVENT_TYPE  inEvent = ACCESSORIES_EVENT_MOVEPOSITIONID,
int  inData = 0 
)
static

Raise a new event.

Parameters
inIdId of a MovePosition of an accessory or an accessory item.
inEventType of the new event. Default is ACCESSORIES_EVENT_MOVEPOSITIONID.
inDataAssociated data to the event type. Default is 0.

Definition at line 115 of file Accessories.cpp.

void Accessories::ReceiveEvent ( unsigned long  inID,
ACCESSORIES_EVENT_TYPE  lastEventType,
int  inData 
)
static

Receive an event from external source.

Parameters
inIDId of the an accessory or an accessory item.
lastEventTypeType of the new event.
inDataAssociated data to the event type.

Definition at line 120 of file Accessories.cpp.

void Accessories::wait ( unsigned long  inDelay)
static

Wait until the delay without executing another event. All started movements will continue during the interval.

Parameters
inDelaywaiting delay in milliseconds.

Definition at line 221 of file Accessories.cpp.


The documentation for this class was generated from the following files: