Implementation of the IDeviceNetworkHighLevel interface and the simplified implementation on top of the complex system for the Facade Pattern. More...
Go to the source code of this file.
Functions | |
static bool | _InitializeLowLevelSystem (void) |
Make sure we have access to the low-level system. | |
static int | NumChains (void) |
The number of device chains available from the sub-system. | |
static void | GetIdcodes (int chainIndex, UIntArray *idcodes) |
Returns a list of all idcodes from all selected devices in the given device chain. | |
static void | EnableDevicesInDeviceChain (int chainIndex, uint32_t selectMask) |
Make visible certain devices in the given device chain. The selectMask value has a bit set for each device to make visible. | |
static void | DisableDevicesInDeviceChain (int chainIndex) |
Resets the given device chain so that all devices except the first are no longer visible. | |
IDeviceNetworkHighLevel * | Facade_GetHighLevelDeviceService (void) |
Retrieve a set of function pointers to the high-level device service used in the Facade Pattern example. | |
Variables | |
static IDeviceNetworkLowLevel * | _lowlevelSystem = NULL |
IDeviceNetworkHighLevel | highlevelService |
Definition of the IDeviceNetworkHighLevel interface, using function pointers to each function. | |
Implementation of the IDeviceNetworkHighLevel interface and the simplified implementation on top of the complex system for the Facade Pattern.
Definition in file Facade_Interface.c.
|
static |
Make sure we have access to the low-level system.
Definition at line 17 of file Facade_Interface.c.
References _lowlevelSystem, and Facade_GetLowLevelDeviceService().
Referenced by DisableDevicesInDeviceChain(), EnableDevicesInDeviceChain(), GetIdcodes(), and NumChains().
|
static |
Resets the given device chain so that all devices except the first are no longer visible.
chainIndex | Index of the device chain to access (0..NumChains-1). |
Definition at line 72 of file Facade_Interface.c.
References _InitializeLowLevelSystem(), _lowlevelSystem, IDeviceNetworkLowLevel::LockDeviceChain, IDeviceNetworkLowLevel::ResetDeviceChain, and IDeviceNetworkLowLevel::UnlockDeviceChain.
|
static |
Make visible certain devices in the given device chain. The selectMask value has a bit set for each device to make visible.
chainIndex | Index of the device chain to access (0..NumChains-1). |
selectMask | A bit mask where each bit corresponds to a device, up to the number of devices in the given device chain. Bit 0 is ignored as the first device is always visible. |
Definition at line 59 of file Facade_Interface.c.
References _InitializeLowLevelSystem(), _lowlevelSystem, IDeviceNetworkLowLevel::EnableDevicesInDeviceChain, IDeviceNetworkLowLevel::LockDeviceChain, and IDeviceNetworkLowLevel::UnlockDeviceChain.
IDeviceNetworkHighLevel * Facade_GetHighLevelDeviceService | ( | void | ) |
Retrieve a set of function pointers to the high-level device service used in the Facade Pattern example.
Definition at line 106 of file Facade_Interface.c.
References highlevelService.
Referenced by Facade_Exercise().
|
static |
Returns a list of all idcodes from all selected devices in the given device chain.
chainIndex | Index of the device chain to access (0..NumChains-1). |
idcodes | A UIntArray that is filled in with the idcodes of the selected devices. This UIntArray object needs to be initialized before use with UIntArray_Initialize() and freed after use with UIntArray_Clear(). |
Definition at line 46 of file Facade_Interface.c.
References _InitializeLowLevelSystem(), _lowlevelSystem, IDeviceNetworkLowLevel::GetIdcodes, IDeviceNetworkLowLevel::LockDeviceChain, and IDeviceNetworkLowLevel::UnlockDeviceChain.
|
static |
The number of device chains available from the sub-system.
Definition at line 33 of file Facade_Interface.c.
References _InitializeLowLevelSystem(), _lowlevelSystem, and IDeviceNetworkLowLevel::GetNumChains.
|
static |
Definition at line 10 of file Facade_Interface.c.
Referenced by _InitializeLowLevelSystem(), DisableDevicesInDeviceChain(), EnableDevicesInDeviceChain(), GetIdcodes(), and NumChains().
IDeviceNetworkHighLevel highlevelService |
Definition of the IDeviceNetworkHighLevel interface, using function pointers to each function.
The function pointers set here must be in the same order they are defined in the IDeviceNetworkHighLevel structure representing the interface.
Definition at line 96 of file Facade_Interface.c.
Referenced by Facade_GetHighLevelDeviceService().