bacnet/runtime/server.h
changeset 2020 6dddf3070806
child 2649 db68cb0e6bdc
equal deleted inserted replaced
2019:92f02bb17c7e 2020:6dddf3070806
       
     1 /**************************************************************************
       
     2 *
       
     3 * Copyright (C) 2006 Steve Karg <skarg@users.sourceforge.net>
       
     4 * Copyright (C) 2017 Mario de Sousa <msousa@fe.up.pt>
       
     5 *
       
     6 * Permission is hereby granted, free of charge, to any person obtaining
       
     7 * a copy of this software and associated documentation files (the
       
     8 * "Software"), to deal in the Software without restriction, including
       
     9 * without limitation the rights to use, copy, modify, merge, publish,
       
    10 * distribute, sublicense, and/or sell copies of the Software, and to
       
    11 * permit persons to whom the Software is furnished to do so, subject to
       
    12 * the following conditions:
       
    13 *
       
    14 * The above copyright notice and this permission notice shall be included
       
    15 * in all copies or substantial portions of the Software.
       
    16 *
       
    17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
       
    18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
       
    19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
       
    20 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
       
    21 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
       
    22 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
       
    23 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
       
    24 *
       
    25 *********************************************************************/
       
    26 
       
    27 #ifndef SERVER_H_
       
    28 #define SERVER_H_
       
    29 
       
    30 
       
    31 #include <stddef.h>
       
    32 #include <stdint.h>
       
    33 
       
    34 
       
    35 
       
    36 typedef struct{
       
    37 	    const char *location;
       
    38 	    const char *network_interface;
       
    39 	    const char *port_number;
       
    40 	    const char *device_name;
       
    41 	    const char *comm_control_passwd;
       
    42 	    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
       
    44 	    pthread_t	thread_id;  // thread handling this server
       
    45 	} server_node_t;
       
    46 
       
    47 
       
    48 
       
    49 /*initialization following all parameters given by user in application*/
       
    50 static server_node_t server_node = {
       
    51   "%(locstr)s",
       
    52   "%(network_interface)s",           // interface    (NULL => use default (eth0))
       
    53   "%(port_number)s",                 // Port number  (NULL => use default)
       
    54   "%(BACnet_Device_Name)s",          // BACnet server's device (object) name
       
    55   "%(BACnet_Comm_Control_Password)s",// BACnet server's device (object) name
       
    56    %(BACnet_Device_ID)s              // BACnet server's device (object) ID
       
    57 };
       
    58 
       
    59 
       
    60 
       
    61 #endif /* SERVER_H_ */