Loading...
Searching...
No Matches
Device Management

Data Structures

struct  DeviceHandle_t
 

Functions

void DeviceList_init (DeviceHandle_t deviceList[DEVICE_MAX_KEYS])
 Initialise all system devices.
 
DeviceHandle_t DeviceList_getDeviceHandle (DeviceKey)
 Retrieve device handle from list by key.
 
DeviceHandle_t DeviceList_getDeviceHandleFromName (char *)
 Retrieve device handle from list by name.
 
DeviceHandle_tDeviceList_getDeviceHandlePointer (DeviceKey)
 Retrieve device handle pointer from list by key.
 
void DeviceList_printDevices ()
 Print out names of all devices in list.
 

Detailed Description


Data Structure Documentation

◆ DeviceHandle_t

struct DeviceHandle_t

Definition at line 17 of file devicelist.h.

Function Documentation

◆ DeviceList_init()

void DeviceList_init ( DeviceHandle_t deviceList[DEVICE_MAX_KEYS])

Initialise all system devices.

Parameters
deviceListEmpty list to be initialised.

Definition at line 23 of file devicelist.c.

◆ DeviceList_getDeviceHandle()

DeviceHandle_t DeviceList_getDeviceHandle ( DeviceKey key)

Retrieve device handle from list by key.

Parameters
keyKey index for device in list.
Returns
Device handle if valid key is provided, else invalid handle.

Definition at line 36 of file devicelist.c.

◆ DeviceList_getDeviceHandleFromName()

DeviceHandle_t DeviceList_getDeviceHandleFromName ( char * name)

Retrieve device handle from list by name.

Parameters
nameString representation of device to be retrieved.
Returns
Device handle if device with matching name is found, else invalid handle.

Definition at line 55 of file devicelist.c.

◆ DeviceList_getDeviceHandlePointer()

DeviceHandle_t * DeviceList_getDeviceHandlePointer ( DeviceKey key)

Retrieve device handle pointer from list by key.

Important
Caution should be taken when making use of this method as modifying device handle pointers during run-time will lead to side effects.
Note
Device handles that are intended to be modified should be clearly documented at the point of initialisation to indicate that the behaviour of code accessing this handle will be non-deterministic.
Justification for run-time manipulation of device handles should likewise be documented.
Parameters
keyKey index for device in list.
Returns
Pointer to device handle if valid key is provided, else NULL.

Definition at line 86 of file devicelist.c.

◆ DeviceList_printDevices()

void DeviceList_printDevices ( )

Print out names of all devices in list.


Definition at line 101 of file devicelist.c.