upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Functions
Handler-to-Object Interface Functions

Functions

uint32_t Device_Object_Instance_Number (void)
 
int Device_Read_Property (BACNET_READ_PROPERTY_DATA *rpdata)
 
void Device_Init (object_functions_t *object_table)
 

Detailed Description

This section describes the fairly limited set of functions that link the BAC-stack handlers to the BACnet Object instances. All of these calls are situated in the Device Object, which "knows" how to reach its child Objects.

Most of these calls have a common operation:

  1. Call Device_Objects_Find_Functions( for the desired Object_Type )
  2. Call the Object's Object_Valid_Instance( for the desired object_instance ) to make sure there is such an instance.
  3. Call the Object helper function needed by the handler, eg Object_Read_Property() for the RP handler.

Function Documentation

uint32_t Device_Object_Instance_Number ( void  )

Return the Object Instance number for our (single) Device Object. This is a key function, widely invoked by the handler code, since it provides "our" (ie, local) address.

Returns
The Instance number used in the BACNET_OBJECT_ID for the Device.
int Device_Read_Property ( BACNET_READ_PROPERTY_DATA *  rpdata)

Looks up the requested Object and Property, and encodes its Value in an APDU.

If the Object or Property can't be found, sets the error class and code.

Parameters
rpdata[in,out] Structure with the desired Object and Property info on entry, and APDU message on return.
Returns
The length of the APDU on success, else BACNET_STATUS_ERROR
void Device_Init ( object_functions_t object_table)

Initialize the Device Object. Initialize the group of object helper functions for any supported Object. Initialize each of the Device Object child Object instances.

Parameters
object_table[in,out] array of structure with object functions. Each Child Object must provide some implementation of each of these functions in order to properly support the default handlers.

Here is the caller graph for this function:

Collaboration diagram for Handler-to-Object Interface Functions: