VLCB SDK
An opinionated SDK for VLCB protocol
Loading...
Searching...
No Matches
module.h File Reference
#include <stdint.h>
Include dependency graph for common/inc/vlcb/common/module.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  VlcbModuleVersion
 

Macros

#define VLCB_MODULE_LOAD_ADDR_EMPTY   (VlcbModuleParamLoadAddr)0
 
#define VLCB_MODULE_CPU_MANUID_UNKNOWN    (VlcbModuleParamCpuManuId){'?', '?', '?', '?'}
 
#define VLCB_VERSION(major, minor)
 
#define VLCB_VERSION_BETA(major, minor, beta)
 

Typedefs

typedef uint32_t VlcbModuleParamLoadAddr
 
typedef char VlcbModuleParamCpuManuId[4]
 
typedef uint8_t VlcbServiceVersion
 
typedef uint8_t VlcbCommandError
 
typedef uint8_t VlcbModuleFlags
 Module flags.
 
typedef uint8_t VlcbModuleParam
 

Enumerations

enum  VlcbCommandError {
  VLCB_CMDERR_INVALID_COMMAND = 1 , VLCB_CMDERR_NOT_IN_LEARN_MODE = 2 , VLCB_CMDERR_NOT_IN_SETUP_MODE = 3 , VLCB_CMDERR_TOO_MANY_EVENTS = 4 ,
  VLCB_CMDERR_NO_EV = 5 , VLCB_CMDERR_INVALID_EV_INDEX = 6 , VLCB_CMDERR_INVALID_EVENT = 7 , VLCB_CMDERR_INVALID_EVENT_INDEX = 8 ,
  VLCB_CMDERR_INVALID_PARAM_INDEX = 9 , VLCB_CMDERR_INVALID_NV_INDEX = 10 , VLCB_CMDERR_INVALID_EV_VALUE = 11 , VLCB_CMDERR_INVALID_NV_VALUE = 12 ,
  VLCB_CMDERR_ANOTHER_MODULE_IS_IN_LEARN_MODE = 13
}
 
enum  VlcbModuleFlags {
  VLCB_MODULE_FLAG_EVENT_CONSUMER = 0x1 , VLCB_MODULE_FLAG_EVENT_PRODUCER = 0x2 , VLCB_MODULE_FLAG_EVENT_COMBI = 0x3 , VLCB_MODULE_FLAG_NORMAL_MODE = 0x4 ,
  VLCB_MODULE_FLAG_BOOTLOADER = 0x8 , VLCB_MODULE_FLAG_CONSUME_OWN_EVENTS = 0x10 , VLCB_MODULE_FLAG_LEARN_MODE = 0x20 , VLCB_MODULE_FLAG_VLCB = 0x40 ,
  VLCB_MODULE_FLAG_SERVICE_DISCOVERY = 0x40
}
 
enum  VlcbModuleParam {
  VLCB_MODULE_PARAM_MODULE_PARAMETER_COUNT = 0 , VLCB_MODULE_PARAM_MODULE_MANUFACTURER = 1 , VLCB_MODULE_PARAM_MINOR_VERSION = 2 , VLCB_MODULE_PARAM_MODULE_TYPE = 3 ,
  VLCB_MODULE_PARAM_MAX_EVENT_COUNT = 4 , VLCB_MODULE_PARAM_EVENT_VARIABLE_COUNT = 5 , VLCB_MODULE_PARAM_NODE_VARIABLE_COUNT = 6 , VLCB_MODULE_PARAM_MAJOR_VERSION = 7 ,
  VLCB_MODULE_PARAM_FLAGS = 8 , VLCB_MODULE_PARAM_CPU_ID = 9 , VLCB_MODULE_PARAM_BUS_TYPE = 10 , VLCB_MODULE_PARAM_LOAD_ADDRESS = 11 ,
  VLCB_MODULE_PARAM_CPU_MANUFACTURER_ID = 15 , VLCB_MODULE_PARAM_CPU_MANUFACTURER = 19 , VLCB_MODULE_PARAM_BETA_VERSION = 20
}
 

Macro Definition Documentation

◆ VLCB_MODULE_CPU_MANUID_UNKNOWN

#define VLCB_MODULE_CPU_MANUID_UNKNOWN    (VlcbModuleParamCpuManuId){'?', '?', '?', '?'}

Definition at line 9 of file common/inc/vlcb/common/module.h.

◆ VLCB_MODULE_LOAD_ADDR_EMPTY

#define VLCB_MODULE_LOAD_ADDR_EMPTY   (VlcbModuleParamLoadAddr)0

Definition at line 6 of file common/inc/vlcb/common/module.h.

◆ VLCB_VERSION

#define VLCB_VERSION ( major,
minor )
Value:
(VlcbModuleVersion){.major = major, .minor = minor.beta = 0}

Definition at line 12 of file common/inc/vlcb/common/module.h.

◆ VLCB_VERSION_BETA

#define VLCB_VERSION_BETA ( major,
minor,
beta )
Value:
(VlcbModuleVersion) { .major = major, .minor = minor.beta = beta }

Definition at line 14 of file common/inc/vlcb/common/module.h.

Typedef Documentation

◆ VlcbCommandError

typedef uint8_t VlcbCommandError

Error codes for CMDERR message

Definition at line 28 of file common/inc/vlcb/common/module.h.

◆ VlcbModuleFlags

typedef uint8_t VlcbModuleFlags

Module flags.

These flags are stored within the module parameter

Definition at line 106 of file common/inc/vlcb/common/module.h.

◆ VlcbModuleParam

typedef uint8_t VlcbModuleParam

Parameter index numbers (readable by OPC_RQNPN, returned in OPC_PARAN) Index numbers count from 1, subtract 1 for offset into parameter block Note that RQNPN with index 0 returns the parameter count

Definition at line 170 of file common/inc/vlcb/common/module.h.

◆ VlcbModuleParamCpuManuId

typedef char VlcbModuleParamCpuManuId[4]

Definition at line 8 of file common/inc/vlcb/common/module.h.

◆ VlcbModuleParamLoadAddr

typedef uint32_t VlcbModuleParamLoadAddr

Definition at line 5 of file common/inc/vlcb/common/module.h.

◆ VlcbServiceVersion

typedef uint8_t VlcbServiceVersion

Definition at line 23 of file common/inc/vlcb/common/module.h.

Enumeration Type Documentation

◆ VlcbCommandError

Enumerator
VLCB_CMDERR_INVALID_COMMAND 

Invalid command

VLCB_CMDERR_NOT_IN_LEARN_MODE 

The mode is not currently in learn mode

VLCB_CMDERR_NOT_IN_SETUP_MODE 

The mode is not currently in setup mode

VLCB_CMDERR_TOO_MANY_EVENTS 

Too many events provisioned in module

The event storage is exhausted

VLCB_CMDERR_NO_EV 

No Event-Variable

VLCB_CMDERR_INVALID_EV_INDEX 

Invalid EV index

VLCB_CMDERR_INVALID_EVENT 

Invalid event

VLCB_CMDERR_INVALID_EVENT_INDEX 

Invalid event index

VLCB_CMDERR_INVALID_PARAM_INDEX 

Invalid param index

VLCB_CMDERR_INVALID_NV_INDEX 

Invalid NV index

VLCB_CMDERR_INVALID_EV_VALUE 

Invalid EV value

VLCB_CMDERR_INVALID_NV_VALUE 

Invalid NV value

VLCB_CMDERR_ANOTHER_MODULE_IS_IN_LEARN_MODE 

Another module is already in learn mode

Sent when module in learn mode sees NNLRN for different module (also exits learn mode)

Definition at line 29 of file common/inc/vlcb/common/module.h.

◆ VlcbModuleFlags

Enumerator
VLCB_MODULE_FLAG_EVENT_CONSUMER 

Module is a consumer of events

VLCB_MODULE_FLAG_EVENT_PRODUCER 

Module is a producer of events

VLCB_MODULE_FLAG_EVENT_COMBI 

Module is both a consumer and producer of events (Shorthand for EventConsumer combined with EventProducer)

VLCB_MODULE_FLAG_NORMAL_MODE 

Module is in Normal mode (VLCB) or FLiM (CBUS)

VLCB_MODULE_FLAG_BOOTLOADER 

Module supports the FCU bootloader protocol

VLCB_MODULE_FLAG_CONSUME_OWN_EVENTS 

Module can consume its own events

VLCB_MODULE_FLAG_LEARN_MODE 

Module is in learn mode

VLCB_MODULE_FLAG_VLCB 

Module is VLCB compatible

VLCB_MODULE_FLAG_SERVICE_DISCOVERY 

Module supports Service Discovery (Deprecated in favour of PF_VLCB.)

Definition at line 107 of file common/inc/vlcb/common/module.h.

◆ VlcbModuleParam

Enumerator
VLCB_MODULE_PARAM_MODULE_PARAMETER_COUNT 

Number of parameters

VLCB_MODULE_PARAM_MODULE_MANUFACTURER 

Manufacturer id

VLCB_MODULE_PARAM_MINOR_VERSION 

Minor version (single alphabetic character)

VLCB_MODULE_PARAM_MODULE_TYPE 

Module type code

VLCB_MODULE_PARAM_MAX_EVENT_COUNT 

Number of events supported

VLCB_MODULE_PARAM_EVENT_VARIABLE_COUNT 

Event variables per event

VLCB_MODULE_PARAM_NODE_VARIABLE_COUNT 

Number of Node variables

VLCB_MODULE_PARAM_MAJOR_VERSION 

Major version (numeric)

VLCB_MODULE_PARAM_FLAGS 

Node flags

VLCB_MODULE_PARAM_CPU_ID 

Processor type

VLCB_MODULE_PARAM_BUS_TYPE 

Bus type

VLCB_MODULE_PARAM_LOAD_ADDRESS 

load address, 4 bytes

VLCB_MODULE_PARAM_CPU_MANUFACTURER_ID 

CPU manufacturer's id as read from the chip config space, 4 bytes (note - read from cpu at runtime, so not included in checksum)

VLCB_MODULE_PARAM_CPU_MANUFACTURER 

CPU manufacturer code

VLCB_MODULE_PARAM_BETA_VERSION 

Beta revision (numeric), or 0 if release

Definition at line 171 of file common/inc/vlcb/common/module.h.