|
33 | 33 | #include "bacnet_osif/bacnet_log.h" |
34 | 34 | LOG_MODULE_DECLARE(bacnet, CONFIG_BACNETSTACK_LOG_LEVEL); |
35 | 35 |
|
| 36 | +/* FIXME: get the device instance and name from settings! */ |
| 37 | +static const uint32_t Device_Instance = 260126; |
| 38 | +static const char *Device_Name = "BACnet Lighting Supervisor (B-LS)"; |
36 | 39 | /* instances for our objects */ |
37 | | -static const uint32_t Device_Instance = 260124; |
38 | 40 | static const uint32_t Lighting_Instance = 1; |
39 | 41 | static const uint32_t Binary_Lighting_Instance = 1; |
40 | 42 | static const uint32_t Channel_Instance = 1; |
@@ -115,6 +117,7 @@ static void BACnet_Lighting_Device_Init_Handler(void *context) |
115 | 117 | /* initialize objects for this basic sample */ |
116 | 118 | Device_Init(NULL); |
117 | 119 | Device_Set_Object_Instance_Number(Device_Instance); |
| 120 | + Device_Object_Name_ANSI_Init(Device_Name); |
118 | 121 | /* lighting output object */ |
119 | 122 | Lighting_Output_Create(Lighting_Instance); |
120 | 123 | Lighting_Output_Name_Set(Lighting_Instance, "Light-1"); |
@@ -172,7 +175,7 @@ static void BACnet_Lighting_Device_Task_Handler(void *context) |
172 | 175 |
|
173 | 176 | int main(void) |
174 | 177 | { |
175 | | - LOG_INF("*** BACnet Lighting Device (B-LD) ***"); |
| 178 | + LOG_INF("BACnet Device: %s", Device_Name); |
176 | 179 | LOG_INF("BACnet Stack Version " BACNET_VERSION_TEXT); |
177 | 180 | LOG_INF("BACnet Stack Max APDU: %d", MAX_APDU); |
178 | 181 | bacnet_basic_init_callback_set(BACnet_Lighting_Device_Init_Handler, |
|
0 commit comments