bacnet/runtime/server.h
changeset 2649 db68cb0e6bdc
parent 2020 6dddf3070806
equal deleted inserted replaced
2648:e4ab768170f9 2649:db68cb0e6bdc
    31 #include <stddef.h>
    31 #include <stddef.h>
    32 #include <stdint.h>
    32 #include <stdint.h>
    33 
    33 
    34 
    34 
    35 
    35 
       
    36 
    36 typedef struct{
    37 typedef struct{
    37 	    const char *location;
    38 	    char location              [%(BACnet_Param_String_Size)d];
    38 	    const char *network_interface;
    39 	    char network_interface     [%(BACnet_Param_String_Size)d];
    39 	    const char *port_number;
    40 	    char port_number           [%(BACnet_Param_String_Size)d];
    40 	    const char *device_name;
    41 	    char device_name           [%(BACnet_Param_String_Size)d];
    41 	    const char *comm_control_passwd;
    42 	    char device_location       [%(BACnet_Param_String_Size)d];        
       
    43 	    char device_description    [%(BACnet_Param_String_Size)d];
       
    44 	    char device_appsoftware_ver[%(BACnet_Param_String_Size)d];        
       
    45 	    char comm_control_passwd   [%(BACnet_Param_String_Size)d];
       
    46 // 	    int         override_local_config;  // bool flag => 
       
    47 // 	                                        //   true : use these parameter values
       
    48 // 	                                        //   false: use values stored on local file in PLC
    42 	    uint32_t	device_id; // device ID is 22 bits long! uint16_t is not enough!
    49 	    uint32_t	device_id; // device ID is 22 bits long! uint16_t is not enough!
    43 	    int		init_state; // store how far along the server's initialization has progressed
    50 	    int		init_state; // store how far along the server's initialization has progressed
    44 	    pthread_t	thread_id;  // thread handling this server
    51 	    pthread_t	thread_id;  // thread handling this server
    45 	} server_node_t;
    52 	} server_node_t;
    46 
    53 
    47 
    54 
    48 
    55 
    49 /*initialization following all parameters given by user in application*/
    56 /*initialization following all parameters given by user in application*/
    50 static server_node_t server_node = {
    57 static server_node_t server_node = {
    51   "%(locstr)s",
    58   "%(locstr)s",
    52   "%(network_interface)s",           // interface    (NULL => use default (eth0))
    59   "%(network_interface)s",              // interface    (NULL => use default (eth0))
    53   "%(port_number)s",                 // Port number  (NULL => use default)
    60   "%(port_number)s",                    // Port number  (NULL => use default)
    54   "%(BACnet_Device_Name)s",          // BACnet server's device (object) name
    61   "%(BACnet_Device_Name)s",             // BACnet server's device (object) Name
    55   "%(BACnet_Comm_Control_Password)s",// BACnet server's device (object) name
    62   "%(BACnet_Device_Location)s",         // BACnet server's device (object) Location
    56    %(BACnet_Device_ID)s              // BACnet server's device (object) ID
    63   "%(BACnet_Device_Description)s",      // BACnet server's device (object) Description
       
    64   "%(BACnet_Device_AppSoft_Version)s",  // BACnet server's device (object) App. Software Ver.
       
    65   "%(BACnet_Comm_Control_Password)s",   // BACnet server's device (object) Password
       
    66 //  (Override_Parameters_Saved_on_PLC)d, // override locally saved parameters (bool flag)
       
    67   %(BACnet_Device_ID)s                  // BACnet server's device (object) ID
    57 };
    68 };
    58 
    69 
    59 
    70 
    60 
       
    61 #endif /* SERVER_H_ */
    71 #endif /* SERVER_H_ */