Hazelnet 3.0.0
Reference implementation of the CAN Bus Security (CBS) protocol
Data Fields
hzl_ServerCtx Struct Reference

Configuration and status of the HazelNet Server library. More...

#include <hzl_Server.h>

Collaboration diagram for hzl_ServerCtx:
Collaboration graph
[legend]

Data Fields

HZL_SET_BY_USER const hzl_ServerConfig_tserverConfig
 Pointer to one struct with the constant Server configuration. More...
 
HZL_SET_BY_USER const hzl_ServerClientConfig_tclientConfigs
 Pointer to an array of structs, each with the constant configuration of one Client. More...
 
HZL_SET_BY_USER const hzl_ServerGroupConfig_tgroupConfigs
 Pointer to an array of structs, each with the constant configuration of one Group. More...
 
HZL_SET_BY_USER hzl_ServerGroupState_tgroupStates
 Pointer to an array of structs, each with the variable state of one Group. More...
 
HZL_SET_BY_USER hzl_Io_t io
 Set of function pointers binding the API to the rest of the system. More...
 

Detailed Description

Configuration and status of the HazelNet Server library.

Initialised by the user on embedded, loaded from file on an OS.

Field Documentation

◆ serverConfig

HZL_SET_BY_USER const hzl_ServerConfig_t* hzl_ServerCtx::serverConfig

Pointer to one struct with the constant Server configuration.

Set by the user to point to a valid configuration. Must be not NULL.

◆ clientConfigs

HZL_SET_BY_USER const hzl_ServerClientConfig_t* hzl_ServerCtx::clientConfigs

Pointer to an array of structs, each with the constant configuration of one Client.

The array must contain hzl_ServerConfig_t.amountOfClients elements (structs). Set by the user to point to a valid configuration. Must be not NULL.

Constraints:

  • Structs must be sorted by the sid field strictly ascending without repetition and without gaps, starting from the sid == 1 (as sid == 0 is the Server itself). In other words, the array index i must contain the struct with sid == i+1.
  • The first struct (at index 0) must always be with sid == 1.
  • The array must contain at least one struct (thus the one with gid == 1).

◆ groupConfigs

HZL_SET_BY_USER const hzl_ServerGroupConfig_t* hzl_ServerCtx::groupConfigs

Pointer to an array of structs, each with the constant configuration of one Group.

The array must contain hzl_ServerConfig_t.amountOfGroups elements (structs). Set by the user to point to a valid configuration. Must be not NULL.

Constraints:

  • Structs must be sorted by the gid field strictly ascending without repetition and without gaps. In other words, the array index i must contain the struct with gid == i.
  • The first struct (at index 0) must always be with gid == 0.
  • The array must contain at least one struct (thus the one with gid == 0).

◆ groupStates

HZL_SET_BY_USER hzl_ServerGroupState_t* hzl_ServerCtx::groupStates

Pointer to an array of structs, each with the variable state of one Group.

Set by the user to point to a memory location, does not have to be initialised. The Server handles the initialisation on init and clears it at deinit. Must be not NULL.

The array must contain hzl_ServerConfig_t.amountOfGroups elements (structs), which will be indexed in the same was as in the groupConfigs array; i.e. groupConfigs[i] and groupStates[i] are respectively the configuration and state of the same group, for every i.

◆ io

HZL_SET_BY_USER hzl_Io_t hzl_ServerCtx::io

Set of function pointers binding the API to the rest of the system.

Including random number generation, timestamp generation and message transmission.


The documentation for this struct was generated from the following file: