Refactor/cov subscriptions encoding decoding test (#1296)
* Add BACnetRecipientProcess type encoding and decoding functions with associated tests * Refactor COV subscription encoding and decoding functions to reduce code size and reuse existing unit tested functions. * Refactor COV subscription handling to simplify error checking
This commit is contained in:
@@ -10,14 +10,16 @@
|
||||
|
||||
void bip_get_my_address(BACNET_ADDRESS *my_address)
|
||||
{
|
||||
(void)my_address;
|
||||
if (my_address) {
|
||||
my_address->mac_len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int bip_send_pdu(
|
||||
BACNET_ADDRESS *dest,
|
||||
BACNET_NPDU_DATA *npdu_data,
|
||||
uint8_t *pdu,
|
||||
unsigned pdu_len)
|
||||
uint16_t pdu_len)
|
||||
{
|
||||
(void)dest;
|
||||
(void)npdu_data;
|
||||
|
||||
@@ -46,3 +46,57 @@ int Device_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata)
|
||||
(void)rpdata;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool Device_Valid_Object_Id(
|
||||
BACNET_OBJECT_TYPE object_type, uint32_t object_instance)
|
||||
{
|
||||
(void)object_type;
|
||||
(void)object_instance;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Device_Value_List_Supported(BACNET_OBJECT_TYPE object_type)
|
||||
{
|
||||
(void)object_type;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Device_COV(BACNET_OBJECT_TYPE object_type, uint32_t object_instance)
|
||||
{
|
||||
(void)object_type;
|
||||
(void)object_instance;
|
||||
return false;
|
||||
}
|
||||
|
||||
void Device_COV_Clear(BACNET_OBJECT_TYPE object_type, uint32_t object_instance)
|
||||
{
|
||||
(void)object_type;
|
||||
(void)object_instance;
|
||||
}
|
||||
|
||||
bool Device_Encode_Value_List(
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
uint32_t object_instance,
|
||||
BACNET_PROPERTY_VALUE *value_list)
|
||||
{
|
||||
(void)object_type;
|
||||
(void)object_instance;
|
||||
(void)value_list;
|
||||
return true;
|
||||
}
|
||||
|
||||
uint16_t Routed_Device_Object_Index(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool Set_Routed_Device_Object_Index(uint16_t index)
|
||||
{
|
||||
(void)index;
|
||||
return true;
|
||||
}
|
||||
|
||||
uint16_t Get_Num_Managed_Devices(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user