Jump to main content

# 1.1.2.4 Library Interface

G3 MAC Real Time driver library provides the following interfaces:

Functions

Name | Description
--- | ---
DRV_G3_MACRT_Initialize | Initializes the MAC RT instance for the specified driver index
DRV_G3_MACRT_Open | Opens the specified MAC RT driver instance and returns a handle to it
DRV_G3_MACRT_Close | Closes an opened instance of the MAC RT driver given its handle
DRV_G3_MACRT_TxRequest | Allows a client to transmit MAC RT data through Power Line
DRV_G3_MACRT_PIBGet | Allows a client to get information from PLC transceiver about MAC RT and PHY Information Base (PIB)
DRV_G3_MACRT_PIBSet | Allows a client to set information to PLC transceiver on MAC RT and PHY Information Base (PIB)
DRV_G3_MACRT_GetTimerReference | Get the internal timer reference from PLC transceiver in microseconds
DRV_G3_MACRT_InitCallbackRegister | Allows a client to set a G3 MAC RT initialization event handling function for the driver to call back when the PLC binary file has been loaded into the PLC transceiver
DRV_G3_MACRT_TxCfmCallbackRegister | Allows a client to set a data confirm event handling function for the driver to call back when the requested transmission has finished
DRV_G3_MACRT_DataIndCallbackRegister | Allows a client to set a data indication event handling function for the driver to call back when a data reception has finished
DRV_G3_MACRT_RxParamsIndCallbackRegister | Allows a client to set a reception parameters event handling function for the driver to call back when a new data message is received
DRV_G3_MACRT_MacSnifferCallbackRegister | Allows enabling G3 MAC RT Sniffer capabilities and set the data buffer in which the content of the sniffer packet will be stored when a new PLC message is received
DRV_G3_MACRT_CommStatusCallbackRegister | Allows a client to set a Comm Status indication event handling function for the driver to call back when a Comm Status event has to be reported
DRV_G3_MACRT_PhySnifferCallbackRegister | Allows enabling G3 PHY Sniffer capabilities and set the data buffer in which the content of the sniffer packet will be stored when a new PLC message is received
DRV_G3_MACRT_ExceptionCallbackRegister | Allows a client to set an exception event handling function for the driver to call back when some error occurs through PLC transceiver communication
DRV_G3_MACRT_ExternalInterruptHandler | Allows application to register callback for PLC Interrupt pin
DRV_G3_MACRT_Status | Gets the current status of the PLC driver module
DRV_G3_MACRT_Tasks | Maintains the driver's state machine
DRV_G3_MACRT_SleepIndCallbackRegister | Allows a client to set an Sleep mode disable event handling function for the driver to call back when the PLC driver is active again
DRV_G3_MACRT_Sleep | PLC driver Sleep mode management
DRV_G3_MACRT_EnableTX | Enables/Disables PLC transmission
DRV_G3_MACRT_SetCoordinator | Enables G3-PLC coordinator capabilities
DRV_G3_MACRT_SetBand | Sets G3-PLC band
DRV_G3_MACRT_EnablePhySniffer | Enables G3-PLC PHY Sniffer capabilities

Data types and constants

Name | Type | Description
--- | --- | ---
DRV_G3_MACRT_INIT | Struct | Contains the data required to initialize the PLC driver
DRV_PLC_HAL_INTERFACE | Struct | Contains the data required to initialize the PLC driver HAL Interface
DRV_PLC_PLIB_INTERFACE | Struct | Contains the data required to initialize the PLC driver PLIB Interface
DRV_G3_MACRT_STATE | Enum | This data type defines the states of the G3 MAC RT Driver. It is used as output of DRV_G3_MACRT_Status
DRV_G3_MACRT_EXCEPTION | Enum | Defines the type for G3 MAC RT Driver transfer errors
DRV_G3_MACRT_INIT_CALLBACK | Typedef | Pointer to a G3 MAC RT Driver Initialization Event handler function
DRV_G3_MACRT_TX_CFM_CALLBACK | Typedef | Pointer to a MAC RT Driver Transmission Confirm Event handler function
DRV_G3_MACRT_DATA_IND_CALLBACK | Typedef | Pointer to a G3 MAC RT Driver Reception Event handler function
DRV_G3_MACRT_RX_PARAMS_IND_CALLBACK | Typedef | Pointer to a G3 MAC RT Driver Event handler function to get parameters from the last received message
DRV_G3_MACRT_MAC_SNIFFER_IND_CALLBACK | Typedef | Pointer to a G3 MAC RT Sniffer Reception Event handler function
DRV_G3_MACRT_COMM_STATUS_IND_CALLBACK | Typedef | Pointer to a G3 MAC RT Communication Status Event handler function
DRV_G3_MACRT_PHY_SNIFFER_IND_CALLBACK | Typedef | Pointer to a G3 MAC RT PHY Sniffer Reception Event handler function
DRV_G3_MACRT_EXCEPTION_CALLBACK | Typedef | Pointer to a G3 MAC RT Driver Exceptions Event handler function
DRV_G3_MACRT_SLEEP_IND_CALLBACK | Typedef | Notifies when Sleep mode is disabled and MAC RT driver is available to be used again
MAC_RT_TX_CFM_OBJ | Struct | Includes a transmission result and timestamp
MAC_RT_RX_PARAMETERS_OBJ | Struct | Includes information to describe any new received message
MAC_RT_STATUS | Enum | List of possible return values for G3 MAC RT Driver functions
MAC_RT_PIB_OBJ | Struct | Object to access the MAC RT and PHY Information Base (PIB)
MAC_RT_PIB | Enum | List of available MAC RT Information Base objects
MAC_RT_PHY_PIB | Enum | List of available PHY Information Base objects
MAC_RT_BAND | Enum | The list of G3-PLC bandplans
MAC_RT_TONE_MAP | Struct | Tone Map definition supported by G3-PLC spec
MAC_RT_TONE_MASK | Struct | Tone Mask definition supported by G3-PLC spec
MAC_RT_MOD_TYPE | Enum | The list of all types of modulation supported by G3-PLC spec
MAC_RT_MOD_SCHEME | Enum | The list of all modulation schemes supported by G3-PLC spec
MAC_RT_TONE_MAP_RSP_DATA | Struct | This struct includes Modulation Type, Modulation Scheme and Tone Map data
MAC_RT_ADDRESS_MODE | Enum | The list of addressing modes supported by G3 spec
MAC_RT_EXT_ADDRESS | Struct | This struct includes Extended Address (EUI64)
MAC_RT_ADDRESS | Struct | This struct includes addressing mode and address (short or extended)
MAC_RT_FRAME_TYPE | Enum | The list of MAC frame types supported by G3 spec
MAC_RT_COMMAND | Enum | The list of MAC commands supported by G3 spec
MAC_RT_DSN_TABLE_ENTRY | Struct | This data type defines a G3 MAC DSN Table entry
MAC_RT_POS_ENTRY | Struct | This data type defines a G3 MAC POS entry
MAC_RT_TX_COEF | Struct | This data type defines the G3-PLC TX coefficients
MAC_RT_NEIGHBOUR_ENTRY | Struct | This data type defines a G3-PLC MAC Neighbour Table entry
MAC_RT_FRAME_CONTROL | Struct | This data type includes information related to the G3 MAC frame control field
MAC_RT_SEGMENT_CONTROL | Struct | This data type includes information related to the G3-PLC MAC segment control field
MAC_RT_AUX_SECURITY_HEADER | Struct | This data type includes information related to the G3 MAC Auxiliary Security Header
MAC_RT_HEADER | Struct | This data type includes information related to the G3 MAC Header
MAC_RT_TONE_MAP_RESPONSE | Struct | This data type includes information related to the G3-PLC Tone Map Response frame
MAC_RT_MIB_INIT_OBJ | Struct | Defines the data required to initialize the G3-PLC MAC RT MIB layer
MAC_RT_PHY_SNIFFER_HEADER | Struct | This data type includes information about G3-PLC PHY Sniffer packet

Rev: G