UNICENS: API Reference

UNICENS V2.1.0-3491
User Manual and API Reference
API Reference
Here is a list of all modules:
[detail level 1234]
o Initialization and Service | Provides initialization and service functions
| o Initialization and Service Types | Referred types used by basic functions
| \ Tracing/Debugging | Tracing/Debugging Interface
| \ Tracing/Debugging Types | Referred types used by Tracing/Debugging Interface
o INIC | INIC related functions
| \ Referred Types | INIC related types
o Network | Provides network management functions
| \ Referred Types | Provides network management functions
o Application Message Service | Application Message Service
| \ Referred Types | Referred types used by Application Message Service
o Command Interpreter | Decodes received MOST messages
| \ Referred Types | Referred types used by the Command Interpreter
o Manager | The Manager is responsible to force the network to available and handle NodeDiscovery and RoutingManagement by a default logic
o Node Discovery | Node Discovery Service
| \ Referred Types | Referred Types used by Node Discovery Service
o Programming | Programming Service
| \ Referred Types | Referred Types used by Programming Service
o BackChannel Diagnosis | BackChannel Diagnosis
| \ Referred Types | Referred Types used by BackChannel Diagnosis
o Routing Management | Provides service functions to handle connection routes
| o Extended Resources Management | Provides data type to manage MOST data resources
| | o Additional Streaming Port Functions | Additional Streaming Port functions of the Extended Resource Manager
| | o XRM Referred Types | Referred types used by XRM service functions
| | | \ XRM SubTypes | Referred types used in XRM Sockets and Ports description
| | \ XRM Configuration Macros | Configurations Macros used by XRM service functions
| \ Referred Types | Referred types used by Routing service functions
o Node Scripting | Provides service function to allow execution of custom scripts in remote Nodes
o Peripheral Bus Interface | Provides service functions to manage data communication over the peripheral bus interfaces I2C and GPIO
| o GPIO | Provides service functions to handle data communication over GPIO
| | \ GPIO Referred Types | Referred types used by the Extended Resource Manager
| \ I2C | Provides service functions to handle data communication over I2C
| \ I2C Referred Types | Referred types used by the Extended Resource Manager
o Miscellaneous | Miscellaneous features
\ Low-Level Driver | Provides an interface for Port Message Exchange with the INIC
o Low-Level Driver API | Function pointers to be used by the low-level driver
\ Referred Types | Referred types used by the low-level driver interface
  • © 2017 Microchip Technology Inc. All rights reserved. www.microchip.com


UNICENS: Initialization and Service

Topics | Data Structures | Macros | Callback Functions | Functions
Initialization and Service

Provides initialization and service functions. More...

Topics

Initialization and Service Types
Referred types used by basic functions.
Tracing/Debugging
Tracing/Debugging Interface.

Data Structures

struct Ucs_InitData_t
UNICENS initialization structure used by function Ucs_Init(). More...

Macros

#define | UCS_NUM_INSTANCES 1
Number of API instances which can be created by function Ucs_CreateInstance().
#define | UCS_FOOTPRINT_TINY
Define this macro to reduce the RAM and ROM size of the UNICENS software by disabling certain features.

Callback Functions

typedef void(* | Ucs_RequestServiceCb_t )(void *user_ptr)
Function signature used for service request callback.
typedef void(* | Ucs_ErrorCb_t )(Ucs_Error_t error_code, void *user_ptr)
Function signature used for the general error callback function.
typedef uint16_t(* | Ucs_GetTickCountCb_t )(void *user_ptr)
Function signature used for callback function to get system tick count.
typedef void(* | Ucs_SetAppTimerCb_t )(uint16_t timeout, void *user_ptr)
Function signature used for timer callback function.

Functions

Ucs_Inst_t * | Ucs_CreateInstance (void)
Retrieves a UNICENS API instance.
Ucs_Return_t | Ucs_SetDefaultConfig (Ucs_InitData_t *init_ptr)
Assigns default values to a provided UNICENS init structure.
Ucs_Return_t | Ucs_Init (Ucs_Inst_t *self, const Ucs_InitData_t *init_ptr, Ucs_InitResultCb_t init_result_fptr)
UNICENS initialization function.
Ucs_Return_t | Ucs_Stop (Ucs_Inst_t *self, Ucs_StdResultCb_t stopped_fptr)
Terminates the execution of UNICENS.
void | Ucs_Service (Ucs_Inst_t *self)
The application must call this function cyclically to drive UNICENS.
void | Ucs_ReportTimeout (Ucs_Inst_t *self)
The application must call this function if the application timer expires.

Detailed Description

Provides initialization and service functions.


UNICENS: Initialization and Service Types

Data Structures | Callback Functions | Enumerations
Initialization and Service Types
Initialization and Service

Referred types used by basic functions. More...

Data Structures

struct | Ucs_General_InitData_t
The general section of initialization data. More...
struct | Ucs_Nd_InitData_t
The initialization data of the Node Discovery service. More...
struct | Ucs_StdResult_t
Standard result structure which provides fields for detailed status and error information. More...

Callback Functions

typedef struct Ucs_Inst_ | Ucs_Inst_t
UNICENS instance.
typedef void(* | Ucs_StdResultCb_t )(Ucs_StdResult_t result, void *user_ptr)
Function signature used for UNICENS standard result callbacks.
typedef void(* | Ucs_InitResultCb_t )(Ucs_InitResult_t result, void *user_ptr)
Function signature used for UNICENS standard result callbacks.

Enumerations

enum Ucs_Error_t {
UCS_GEN_ERR_COMMUNICATION = 1,
UCS_GEN_ERR_INIC = 2
}
UNICENS general error codes. More...
enum Ucs_Return_t {
UCS_RET_SUCCESS = 0x00,
UCS_RET_ERR_PARAM = 0x01,
UCS_RET_ERR_BUFFER_OVERFLOW = 0x02,
UCS_RET_ERR_NOT_AVAILABLE = 0x03,
UCS_RET_ERR_NOT_SUPPORTED = 0x04,
UCS_RET_ERR_INVALID_SHADOW = 0x05,
UCS_RET_ERR_ALREADY_SET = 0x06,
UCS_RET_ERR_API_LOCKED = 0x07,
UCS_RET_ERR_NOT_INITIALIZED = 0x08
}
Standard return codes used for synchronous response. More...
enum Ucs_Result_t {
UCS_RES_SUCCESS = 0x00,
UCS_RES_ERR_MOST_STANDARD = 0x01,
UCS_RES_ERR_BUSY = 0x02,
UCS_RES_ERR_PROCESSING = 0x03,
UCS_RES_ERR_CONFIGURATION = 0x04,
UCS_RES_ERR_SYSTEM = 0x05,
UCS_RES_ERR_TIMEOUT = 0x06,
UCS_RES_ERR_TRANSMISSION = 0x07
}
Result codes used for asynchronous response. More...
enum Ucs_InitResult_t {
UCS_INIT_RES_SUCCESS = 0x00U,
UCS_INIT_RES_ERR_BUF_OVERFLOW = 0x01U,
UCS_INIT_RES_ERR_INIC_SYNC = 0x02U,
UCS_INIT_RES_ERR_INIC_VERSION = 0x03U,
UCS_INIT_RES_ERR_INIC_SYSTEM = 0x04U,
UCS_INIT_RES_ERR_DEV_ATT_CFG = 0x05U,
UCS_INIT_RES_ERR_DEV_ATT_PROC = 0x06U,
UCS_INIT_RES_ERR_NET_CFG = 0x07U,
UCS_INIT_RES_ERR_INTERNAL = 0x0AU,
UCS_INIT_RES_ERR_TIMEOUT = 0x0BU
}
Result values of initialization result callback function. More...

Detailed Description

Referred types used by basic functions.


UNICENS: Ucs_General_InitData_t Struct Reference

Data Fields
Ucs_General_InitData_t Struct Reference
Initialization and Service Types

The general section of initialization data. More...

Data Fields

Ucs_ErrorCb_t error_fptr
Mandatory callback function notifying an error that terminates the API.
Ucs_GetTickCountCb_t get_tick_count_fptr
Mandatory callback function querying the actual system tick count.
Ucs_SetAppTimerCb_t set_application_timer_fptr
Callback function requesting the application to call Ucs_ReportTimeout() after a certain time. Mandatory callback function in event driven mode.
Ucs_RequestServiceCb_t request_service_fptr
Callback function requesting the application to call Ucs_Service(). Mandatory callback function in event driven mode.
bool inic_watchdog_enabled
Optional setting for debugging. Set to false to disable the watchdog, set to true (default value) to enable the watchdog.
Ucs_DebugErrorMsgCb_t debug_error_msg_fptr
Optional callback function to debug incoming raw messages of operation type UCS_OP_ERROR and UCS_OP_ERRORACK.

Detailed Description

The general section of initialization data.


UNICENS: Ucs_General_InitData_t::debug_error_msg_fptr

  • Ucs_General_InitData_t
debug_error_msg_fptr
error_fptr
get_tick_count_fptr
inic_watchdog_enabled
request_service_fptr
set_application_timer_fptr
Ucs_DebugErrorMsgCb_t debug_error_msg_fptr

Optional callback function to debug incoming raw messages of operation type UCS_OP_ERROR and UCS_OP_ERRORACK.


UNICENS: Ucs_General_InitData_t::error_fptr

  • Ucs_General_InitData_t
debug_error_msg_fptr
error_fptr
get_tick_count_fptr
inic_watchdog_enabled
request_service_fptr
set_application_timer_fptr
Ucs_ErrorCb_t error_fptr

Mandatory callback function notifying an error that terminates the API.


UNICENS: Ucs_General_InitData_t::get_tick_count_fptr

  • Ucs_General_InitData_t
debug_error_msg_fptr
error_fptr
get_tick_count_fptr
inic_watchdog_enabled
request_service_fptr
set_application_timer_fptr
Ucs_GetTickCountCb_t get_tick_count_fptr

Mandatory callback function querying the actual system tick count.


UNICENS: Ucs_General_InitData_t::inic_watchdog_enabled

  • Ucs_General_InitData_t
debug_error_msg_fptr
error_fptr
get_tick_count_fptr
inic_watchdog_enabled
request_service_fptr
set_application_timer_fptr
bool inic_watchdog_enabled

Optional setting for debugging. Set to false to disable the watchdog, set to true (default value) to enable the watchdog.

Note
The INIC watchdog may only be disabled for debugging purpose. It must not be disabled in production systems.


UNICENS: Ucs_General_InitData_t::request_service_fptr

  • Ucs_General_InitData_t
debug_error_msg_fptr
error_fptr
get_tick_count_fptr
inic_watchdog_enabled
request_service_fptr
set_application_timer_fptr
Ucs_RequestServiceCb_t request_service_fptr

Callback function requesting the application to call Ucs_Service(). Mandatory callback function in event driven mode.


UNICENS: Ucs_General_InitData_t::set_application_timer_fptr

  • Ucs_General_InitData_t
debug_error_msg_fptr
error_fptr
get_tick_count_fptr
inic_watchdog_enabled
request_service_fptr
set_application_timer_fptr
Ucs_SetAppTimerCb_t set_application_timer_fptr

Callback function requesting the application to call Ucs_ReportTimeout() after a certain time. Mandatory callback function in event driven mode.


UNICENS: Ucs_Nd_InitData_t Struct Reference

Data Fields
Ucs_Nd_InitData_t Struct Reference
Initialization and Service Types

The initialization data of the Node Discovery service. More...

Data Fields

Ucs_Nd_ReportCb_t report_fptr
Callback function reporting the results of the Node Discovery service.
Ucs_Nd_EvalCb_t eval_fptr
Callback function asking for evaluation of the found signature.

Detailed Description

The initialization data of the Node Discovery service.


UNICENS: Ucs_Nd_InitData_t::eval_fptr

  • Ucs_Nd_InitData_t
eval_fptr
report_fptr
Ucs_Nd_EvalCb_t eval_fptr

Callback function asking for evaluation of the found signature.


UNICENS: Ucs_Nd_InitData_t::report_fptr

  • Ucs_Nd_InitData_t
eval_fptr
report_fptr
Ucs_Nd_ReportCb_t report_fptr

Callback function reporting the results of the Node Discovery service.


UNICENS: Ucs_StdResult_t Struct Reference

Data Fields
Ucs_StdResult_t Struct Reference
Initialization and Service Types

Standard result structure which provides fields for detailed status and error information. More...

Data Fields

Ucs_Result_t code
Result/Error code.
uint8_t * | info_ptr
INIC error data.
uint8_t | info_size
Size of the INIC error data in bytes.

Detailed Description

Standard result structure which provides fields for detailed status and error information.


UNICENS: Ucs_StdResult_t::code

  • Ucs_StdResult_t
code
info_ptr
info_size
Ucs_Result_t code

Result/Error code.


UNICENS: Ucs_StdResult_t::info_ptr

  • Ucs_StdResult_t
code
info_ptr
info_size
uint8_t* info_ptr

INIC error data.


UNICENS: Ucs_StdResult_t::info_size

  • Ucs_StdResult_t
code
info_ptr
info_size
uint8_t info_size

Size of the INIC error data in bytes.


UNICENS: Ucs_InitResultCb_t

  • Initialization and Service Types
Ucs_Error_t
Ucs_InitResult_t
Ucs_InitResultCb_t
Ucs_Inst_t
Ucs_Result_t
Ucs_Return_t
Ucs_StdResultCb_t
typedef void(* Ucs_InitResultCb_t)(Ucs_InitResult_t result, void *user_ptr)

Function signature used for UNICENS standard result callbacks.

Parameters
result | Result of the callback
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Inst_t

  • Initialization and Service Types
Ucs_Error_t
Ucs_InitResult_t
Ucs_InitResultCb_t
Ucs_Inst_t
Ucs_Result_t
Ucs_Return_t
Ucs_StdResultCb_t
typedef struct Ucs_Inst_ Ucs_Inst_t

UNICENS instance.


UNICENS: Ucs_StdResultCb_t

  • Initialization and Service Types
Ucs_Error_t
Ucs_InitResult_t
Ucs_InitResultCb_t
Ucs_Inst_t
Ucs_Result_t
Ucs_Return_t
Ucs_StdResultCb_t
typedef void(* Ucs_StdResultCb_t)(Ucs_StdResult_t result, void *user_ptr)

Function signature used for UNICENS standard result callbacks.

Parameters
result | Result of the callback
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Error_t

  • Initialization and Service Types
Ucs_Error_t
Ucs_InitResult_t
Ucs_InitResultCb_t
Ucs_Inst_t
Ucs_Result_t
Ucs_Return_t
Ucs_StdResultCb_t
enum Ucs_Error_t

UNICENS general error codes.

Enumerator:
UCS_GEN_ERR_COMMUNICATION

Fatal communication error between EHC and INIC.

UCS_GEN_ERR_INIC

INIC internal error.


UNICENS: Ucs_InitResult_t

  • Initialization and Service Types
Ucs_Error_t
Ucs_InitResult_t
Ucs_InitResultCb_t
Ucs_Inst_t
Ucs_Result_t
Ucs_Return_t
Ucs_StdResultCb_t
enum Ucs_InitResult_t

Result values of initialization result callback function.

Enumerator:
UCS_INIT_RES_SUCCESS

Initialization succeeded.

UCS_INIT_RES_ERR_BUF_OVERFLOW

No message buffer available.

UCS_INIT_RES_ERR_INIC_SYNC

INIC synchronization failed.

UCS_INIT_RES_ERR_INIC_VERSION

INIC device version check failed.

UCS_INIT_RES_ERR_INIC_SYSTEM

Device attach failed due to an INIC system error.

UCS_INIT_RES_ERR_DEV_ATT_CFG

INIC device attach failed due to an configuration error.

UCS_INIT_RES_ERR_DEV_ATT_PROC

Device attach failed due to a processing error.

UCS_INIT_RES_ERR_NET_CFG

Network Configuration request failed.

UCS_INIT_RES_ERR_INTERNAL

Internal error occurred.

UCS_INIT_RES_ERR_TIMEOUT

Initialization timeout occurred.


UNICENS: Ucs_Result_t

  • Initialization and Service Types
Ucs_Error_t
Ucs_InitResult_t
Ucs_InitResultCb_t
Ucs_Inst_t
Ucs_Result_t
Ucs_Return_t
Ucs_StdResultCb_t
enum Ucs_Result_t

Result codes used for asynchronous response.

Enumerator:
UCS_RES_SUCCESS

Operation successfully completed.

UCS_RES_ERR_MOST_STANDARD

MOST standard error occurred.

UCS_RES_ERR_BUSY

Function currently busy.

UCS_RES_ERR_PROCESSING

Processing error occurred.

UCS_RES_ERR_CONFIGURATION

Configuration error occurred.

UCS_RES_ERR_SYSTEM

System error occurred.

UCS_RES_ERR_TIMEOUT

Timeout occurred.

UCS_RES_ERR_TRANSMISSION

Transmission error occurred.


UNICENS: Ucs_Return_t

  • Initialization and Service Types
Ucs_Error_t
Ucs_InitResult_t
Ucs_InitResultCb_t
Ucs_Inst_t
Ucs_Result_t
Ucs_Return_t
Ucs_StdResultCb_t
enum Ucs_Return_t

Standard return codes used for synchronous response.

Enumerator:
UCS_RET_SUCCESS

Operation successfully completed.

UCS_RET_ERR_PARAM

At least one parameter exceeds its admissible range.

UCS_RET_ERR_BUFFER_OVERFLOW

Buffer overflow or service busy.

UCS_RET_ERR_NOT_AVAILABLE

Functionality not available.

UCS_RET_ERR_NOT_SUPPORTED

This function is not supported by this derivative of INIC / physical layer / MOST speed.

UCS_RET_ERR_INVALID_SHADOW

The requested information is not yet available.

UCS_RET_ERR_ALREADY_SET

The value to be set is already set. The application can therefore be aware that no message will be send to INIC and no callback will be called.

UCS_RET_ERR_API_LOCKED

INIC performs already requested function.

UCS_RET_ERR_NOT_INITIALIZED

UNICENS is not initialized.


UNICENS: Tracing/Debugging

Topics | Macros | Callback Functions
Tracing/Debugging
Initialization and Service

Tracing/Debugging Interface. More...

Topics

Tracing/Debugging Types
Referred types used by Tracing/Debugging Interface.

Macros

#define | UCS_TR_INFO
Trace macro to capture trace info events.
#define | UCS_TR_ERROR
Trace macro to capture trace error events.
#define | UCS_TR_SIZE_BUFFER 256
Defines the needed buffer size to decode a trace entry.

Callback Functions

typedef void(* Ucs_DebugErrorMsgCb_t )(Msg_MostTel_t *msg_ptr, void *user_ptr)
Optional callback function used to debug received raw messages with OpType UCS_OP_ERROR and UCS_OP_ERRORACK.

Detailed Description

Tracing/Debugging Interface.

The UCS Trace Interface is intended for debugging and logging purpose. There are 2 different trace options:

  • The definition of trace macros to print out internal states, messages and errors. This option provides two trace classes: info and error. Each trace class can be activated by defining the respective macro UCS_TR_INFO UCS_TR_ERROR in the configuration header file ucs_cfg.h. While the info class is intended only for debugging purpose during development, the error class can also be active for logging purpose in a production system.
  • Implementation of the callback function Ucs_DebugErrorMsgCb_t which is assigned during initialization. The callback function is fired on every received Error message from a local or remote INIC.


UNICENS: Tracing/Debugging Types

Data Structures | Macros | Enumerations
Tracing/Debugging Types
Tracing/Debugging

Referred types used by Tracing/Debugging Interface. More...

Data Structures

struct | Msg_MsgId_t
MOST message id "FBlockID.InstID.FktID.OPType". More...
struct | Msg_TxOptions_t
Retry options. More...
struct | Msg_TelData_t
Most telegram data. More...
struct | Msg_MostTel_t
Common MOST message. More...

Macros

#define | UCS_ADDR_BROADCAST_BLOCKING 0x03C8U
Blocking broadcast destination address.
#define | UCS_ADDR_BROADCAST_UNBLOCKING 0x03FFU
Unblocking broadcast destination address.

Enumerations

enum Ucs_MsgTxStatus_t {
UCS_MSG_STAT_OK = 0x00U,
UCS_MSG_STAT_ERROR_CFG_NO_RCVR = 0x01U,
UCS_MSG_STAT_ERROR_BF = 0x08U,
UCS_MSG_STAT_ERROR_CRC = 0x09U,
UCS_MSG_STAT_ERROR_ID = 0x0AU,
UCS_MSG_STAT_ERROR_ACK = 0x0BU,
UCS_MSG_STAT_ERROR_TIMEOUT = 0x0CU,
UCS_MSG_STAT_ERROR_FATAL_WT = 0x10U,
UCS_MSG_STAT_ERROR_FATAL_OA = 0x11U,
UCS_MSG_STAT_ERROR_NA_TRANS = 0x18U,
UCS_MSG_STAT_ERROR_NA_OFF = 0x19U,
UCS_MSG_STAT_ERROR_UNKNOWN = 0xFEU,
UCS_MSG_STAT_ERROR_SYNC = 0xFFU
}
Message transmission status for internal/debug use. More...
enum Ucs_OpType_t {
UCS_OP_SET = 0x0,
UCS_OP_GET = 0x1,
UCS_OP_SETGET = 0x2,
UCS_OP_INC = 0x3,
UCS_OP_DEC = 0x4,
UCS_OP_STATUS = 0xC,
UCS_OP_START = 0x0,
UCS_OP_ABORT = 0x1,
UCS_OP_STARTRESULT = 0x2,
UCS_OP_PROCESSING = 0xB,
UCS_OP_RESULT = 0xC,
UCS_OP_STARTACK = 0x8,
UCS_OP_ABORTACK = 0x7,
UCS_OP_STARTRESULTACK = 0x6,
UCS_OP_PROCESSINGACK = 0xA,
UCS_OP_RESULTACK = 0xD,
UCS_OP_GETINTERFACE = 0x5,
UCS_OP_INTERFACE = 0xE,
UCS_OP_ERROR = 0xF,
UCS_OP_ERRORACK = 0x9
}
Operation Types. More...

Detailed Description

Referred types used by Tracing/Debugging Interface.


UNICENS: Msg_MsgId_t Struct Reference

Data Fields
Msg_MsgId_t Struct Reference
Tracing/Debugging Types

MOST message id "FBlockID.InstID.FktID.OPType". More...

Data Fields

uint8_t | fblock_id
FBlockID.
uint8_t | instance_id
InstID.
uint16_t | function_id
FktID.
Ucs_OpType_t op_type
Operation type.

Detailed Description

MOST message id "FBlockID.InstID.FktID.OPType".


UNICENS: Msg_MsgId_t::fblock_id

  • Msg_MsgId_t
fblock_id
function_id
instance_id
op_type
uint8_t fblock_id

FBlockID.


UNICENS: Msg_MsgId_t::function_id

  • Msg_MsgId_t
fblock_id
function_id
instance_id
op_type
uint16_t function_id

FktID.


UNICENS: Msg_MsgId_t::instance_id

  • Msg_MsgId_t
fblock_id
function_id
instance_id
op_type
uint8_t instance_id

InstID.


UNICENS: Msg_MsgId_t::op_type

  • Msg_MsgId_t
fblock_id
function_id
instance_id
op_type
Ucs_OpType_t op_type

Operation type.


UNICENS: Msg_TxOptions_t Struct Reference

Data Fields
Msg_TxOptions_t Struct Reference
Tracing/Debugging Types

Retry options. More...

Data Fields

uint8_t | llrbc
Low-level retry block count performed by the INIC.
uint8_t | cancel_id
Either "0" or label for a group of dependent telegrams.

Detailed Description

Retry options.


UNICENS: Msg_TxOptions_t::cancel_id

  • Msg_TxOptions_t
cancel_id
llrbc
uint8_t cancel_id

Either "0" or label for a group of dependent telegrams.

The value determines the required action if the transmission has failed. Valid range:

  • 0: Only the failed telegram will is removed from the FIFO.
  • 1..255: All telegrams with the same cancel_id as a failed telegram will be removed from the FIFO queue.


UNICENS: Msg_TxOptions_t::llrbc

  • Msg_TxOptions_t
cancel_id
llrbc
uint8_t llrbc

Low-level retry block count performed by the INIC.

The LLRBC are applicable for MCMs. ICMs don't care. Values exceeding the maximum value are be corrected by the INIC silently to the maximum value. Valid range: 0..100


UNICENS: Msg_TelData_t Struct Reference

Data Fields
Msg_TelData_t Struct Reference
Tracing/Debugging Types

Most telegram data. More...

Data Fields

uint8_t | tel_id
Telegram id which indicates the telegram as part of segmented message or as single transfer.
uint8_t | tel_len
The telegram length. I.e. the number of telegram bytes starting at address which is referred in tel_data_ptr. The INIC will add one in case of "tel_id = 1..3".
uint8_t | tel_cnt
The message count indexing the telegram within a segmented message. The respective tel_cnt is moved by the INIC to "DATA[0]" in case of "tel_id = 1..3". Otherwise it is ignored.
uint8_t * | tel_data_ptr
Points to telegram data.

Detailed Description

Most telegram data.


UNICENS: Msg_TelData_t::tel_cnt

  • Msg_TelData_t
tel_cnt
tel_data_ptr
tel_id
tel_len
uint8_t tel_cnt

The message count indexing the telegram within a segmented message. The respective tel_cnt is moved by the INIC to "DATA[0]" in case of "tel_id = 1..3". Otherwise it is ignored.


UNICENS: Msg_TelData_t::tel_data_ptr

  • Msg_TelData_t
tel_cnt
tel_data_ptr
tel_id
tel_len
uint8_t* tel_data_ptr

Points to telegram data.


UNICENS: Msg_TelData_t::tel_id

  • Msg_TelData_t
tel_cnt
tel_data_ptr
tel_id
tel_len
uint8_t tel_id

Telegram id which indicates the telegram as part of segmented message or as single transfer.


UNICENS: Msg_TelData_t::tel_len

  • Msg_TelData_t
tel_cnt
tel_data_ptr
tel_id
tel_len
uint8_t tel_len

The telegram length. I.e. the number of telegram bytes starting at address which is referred in tel_data_ptr. The INIC will add one in case of "tel_id = 1..3".


UNICENS: Msg_MostTel_t Struct Reference

Data Fields
Msg_MostTel_t Struct Reference
Tracing/Debugging Types

Common MOST message. More...

Data Fields

uint16_t | destination_addr
MOST destination address.
uint16_t | source_addr
MOST source address.
Msg_MsgId_t id
MOST message id "FBlockID.InstID.FktID.OPType".
Msg_TxOptions_t opts
Message transmission options.
Msg_TelData_t tel
MOST telegram data.
void * | info_ptr
Possible reference to additional data.

Detailed Description

Common MOST message.


UNICENS: Msg_MostTel_t::destination_addr

  • Msg_MostTel_t
destination_addr
id
info_ptr
opts
source_addr
tel
uint16_t destination_addr

MOST destination address.


UNICENS: Msg_MostTel_t::id

  • Msg_MostTel_t
destination_addr
id
info_ptr
opts
source_addr
tel
Msg_MsgId_t id

MOST message id "FBlockID.InstID.FktID.OPType".


UNICENS: Msg_MostTel_t::info_ptr

  • Msg_MostTel_t
destination_addr
id
info_ptr
opts
source_addr
tel
void* info_ptr

Possible reference to additional data.


UNICENS: Msg_MostTel_t::opts

  • Msg_MostTel_t
destination_addr
id
info_ptr
opts
source_addr
tel
Msg_TxOptions_t opts

Message transmission options.


UNICENS: Msg_MostTel_t::source_addr

  • Msg_MostTel_t
destination_addr
id
info_ptr
opts
source_addr
tel
uint16_t source_addr

MOST source address.


UNICENS: Msg_MostTel_t::tel

  • Msg_MostTel_t
destination_addr
id
info_ptr
opts
source_addr
tel
Msg_TelData_t tel

MOST telegram data.


UNICENS: UCS_ADDR_BROADCAST_BLOCKING

  • Tracing/Debugging Types
UCS_ADDR_BROADCAST_BLOCKING
UCS_ADDR_BROADCAST_UNBLOCKING
Ucs_MsgTxStatus_t
Ucs_OpType_t
#define UCS_ADDR_BROADCAST_BLOCKING 0x03C8U

Blocking broadcast destination address.


UNICENS: UCS_ADDR_BROADCAST_UNBLOCKING

  • Tracing/Debugging Types
UCS_ADDR_BROADCAST_BLOCKING
UCS_ADDR_BROADCAST_UNBLOCKING
Ucs_MsgTxStatus_t
Ucs_OpType_t
#define UCS_ADDR_BROADCAST_UNBLOCKING 0x03FFU

Unblocking broadcast destination address.


UNICENS: Ucs_MsgTxStatus_t

  • Tracing/Debugging Types
UCS_ADDR_BROADCAST_BLOCKING
UCS_ADDR_BROADCAST_UNBLOCKING
Ucs_MsgTxStatus_t
Ucs_OpType_t
enum Ucs_MsgTxStatus_t

Message transmission status for internal/debug use.

Enumerator:
UCS_MSG_STAT_OK

Transmission succeeded.

UCS_MSG_STAT_ERROR_CFG_NO_RCVR

No internal receiver exists.

UCS_MSG_STAT_ERROR_BF

Buffer full.

UCS_MSG_STAT_ERROR_CRC

CRC.

UCS_MSG_STAT_ERROR_ID

Corrupted identifiers.

UCS_MSG_STAT_ERROR_ACK

Corrupted PACK or CACK.

UCS_MSG_STAT_ERROR_TIMEOUT

TX timeout.

UCS_MSG_STAT_ERROR_FATAL_WT

Wrong target.

UCS_MSG_STAT_ERROR_FATAL_OA

Own node address.

UCS_MSG_STAT_ERROR_NA_TRANS

Control channel was switched off and a pending transmission was canceled.

UCS_MSG_STAT_ERROR_NA_OFF

Control channel not available.

UCS_MSG_STAT_ERROR_UNKNOWN

Unknown error status.

UCS_MSG_STAT_ERROR_SYNC

Internal error which is notified if communication link with INIC is lost.


UNICENS: Ucs_OpType_t

  • Tracing/Debugging Types
UCS_ADDR_BROADCAST_BLOCKING
UCS_ADDR_BROADCAST_UNBLOCKING
Ucs_MsgTxStatus_t
Ucs_OpType_t
enum Ucs_OpType_t

Operation Types.

Enumerator:
UCS_OP_SET

Operation Set (Property)

UCS_OP_GET

Operation Get (Property)

UCS_OP_SETGET

Operation SetGet (Property)

UCS_OP_INC

Operation Increment (Property)

UCS_OP_DEC

Operation Decrement (Property)

UCS_OP_STATUS

Operation Status (Property)

UCS_OP_START

Operation Start (Method)

UCS_OP_ABORT

Operation Abort (Method)

UCS_OP_STARTRESULT

Operation StartResult (Method)

UCS_OP_PROCESSING

Operation Processing (Method)

UCS_OP_RESULT

Operation Result (Method)

UCS_OP_STARTACK

Operation StartAck (Method)

UCS_OP_ABORTACK

Operation AbortAck (Method)

UCS_OP_STARTRESULTACK

Operation StartResultAck (Method)

UCS_OP_PROCESSINGACK

Operation ProcessingAck (Method)

UCS_OP_RESULTACK

Operation ResultAck (Method)

UCS_OP_GETINTERFACE

Operation GetInterface (Property/Method)

UCS_OP_INTERFACE

Operation Interface (Property/Method)

UCS_OP_ERROR

Operation Error (Property/Method)

UCS_OP_ERRORACK

Operation ErrorAck (Property/Method)


UNICENS: UCS_TR_ERROR

  • Tracing/Debugging
Ucs_DebugErrorMsgCb_t
UCS_TR_ERROR
UCS_TR_INFO
UCS_TR_SIZE_BUFFER
#define UCS_TR_ERROR

Trace macro to capture trace error events.

This macro is used to enable the capturing of trace error events. The macro must be mapped onto a user-defined function. To disable the trace error events, the macro must not be defined. The mapped user-defined function must adhere to the following function signature.

void (*Ucs_TraceCb_t)(void * ucs_user_ptr, const char module_str[], const char entry_str[], uint16_t vargs_cnt, ...);

  • ucs_user_ptr
    Reference to the User argument
  • module_str
    The name of the software module that has posted the trace
  • entry_str
    The trace entry as formatted string
  • vargs_cnt
    Number of trace arguments which will be passed within the variable argument list
  • [...]
    Variable argument list to pass trace arguments
Note
The captured error events can be used for logging and as a first step for debugging unexpected behavior. However, the application must not derive any action when an error is indicated by the trace interface. An application must handle rely on result callback functions and handle "general.error_fptr()".

Example:

extern void App_UcsTraceError(void * ucs_user_ptr,
const char module_str[],
const char entry_str[],
uint16_t vargs_cnt,
...);
#define UCS_TR_ERROR App_UcsTraceError


UNICENS: UCS_TR_INFO

  • Tracing/Debugging
Ucs_DebugErrorMsgCb_t
UCS_TR_ERROR
UCS_TR_INFO
UCS_TR_SIZE_BUFFER
#define UCS_TR_INFO

Trace macro to capture trace info events.

This macro is used to enable the capturing of trace info events. The macro must be mapped onto a user-defined function. To disable the trace info events, the macro must not be defined. The mapped user-defined function must adhere to the following function signature.

void (*Ucs_TraceCb_t)(void * ucs_user_ptr, const char module_str[], const char entry_str[], uint16_t vargs_cnt, ...);

  • ucs_user_ptr
    Reference to the User argument
  • module_str
    The name of the software module that has posted the trace
  • entry_str
    The trace entry as formatted string
  • vargs_cnt
    Number of trace arguments which will be passed within the variable argument list
  • [...]
    Variable argument list to pass trace arguments
Warning
Do not assign UCS_TR_INFO in a production system. This has major effects on the CPU load and runtime. UCS_TR_INFO is intended for debugging software during development phase. Microchip Support might request you to assign of this macro to spy on internal events. Disable this macro definition after your support case is closed.

Example:

extern void App_UcsTraceInfo(void * ucs_user_ptr,
const char module_str[],
const char entry_str[],
uint16_t vargs_cnt,
...);
#define UCS_TR_INFO App_UcsTraceInfo


UNICENS: UCS_TR_SIZE_BUFFER

  • Tracing/Debugging
Ucs_DebugErrorMsgCb_t
UCS_TR_ERROR
UCS_TR_INFO
UCS_TR_SIZE_BUFFER
#define UCS_TR_SIZE_BUFFER 256

Defines the needed buffer size to decode a trace entry.


UNICENS: Ucs_DebugErrorMsgCb_t

  • Tracing/Debugging
Ucs_DebugErrorMsgCb_t
UCS_TR_ERROR
UCS_TR_INFO
UCS_TR_SIZE_BUFFER
typedef void(* Ucs_DebugErrorMsgCb_t)(Msg_MostTel_t *msg_ptr, void *user_ptr)

Optional callback function used to debug received raw messages with OpType UCS_OP_ERROR and UCS_OP_ERRORACK.

Parameters
msg_ptr | Reference to an error messages received from network or the local INIC. It is not allowed to modify the message. The reference becomes invalid when the callback function returns.
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_InitData_t Struct Reference

Data Fields
Ucs_InitData_t Struct Reference
Initialization and Service

UNICENS initialization structure used by function Ucs_Init(). More...

Data Fields

void * user_ptr
Optional reference to a user context which is provided within API callback functions.
Ucs_General_InitData_t general
General initialization data.
Ucs_Lld_InitData_t lld
Comprises assignment to low-level driver communication interfaces.
Ucs_Rm_InitData_t rm
The initialization data of the Routing Management.
Ucs_Gpio_InitData_t gpio
Initialization structure of the GPIO.
Ucs_I2c_InitData_t i2c
Initialization structure of the I2C.
Ucs_Nd_InitData_t nd
The initialization data of the Node Discovery.
Ucs_Ams_InitData_t ams
The initialization data of the Application Message Service.
Ucs_Network_InitData_t network
Network initialization data.
Ucs_Inic_InitData_t inic
INIC initialization data.
Ucs_Mgr_InitData_t mgr
The initialization data of the Manager.

Detailed Description

UNICENS initialization structure used by function Ucs_Init().


UNICENS: Ucs_InitData_t::ams

  • Ucs_InitData_t
ams
general
gpio
i2c
inic
lld
mgr
nd
network
rm
user_ptr
Ucs_Ams_InitData_t ams

The initialization data of the Application Message Service.


UNICENS: Ucs_InitData_t::general

  • Ucs_InitData_t
ams
general
gpio
i2c
inic
lld
mgr
nd
network
rm
user_ptr
Ucs_General_InitData_t general

General initialization data.


UNICENS: Ucs_InitData_t::gpio

  • Ucs_InitData_t
ams
general
gpio
i2c
inic
lld
mgr
nd
network
rm
user_ptr
Ucs_Gpio_InitData_t gpio

Initialization structure of the GPIO.


UNICENS: Ucs_InitData_t::i2c

  • Ucs_InitData_t
ams
general
gpio
i2c
inic
lld
mgr
nd
network
rm
user_ptr
Ucs_I2c_InitData_t i2c

Initialization structure of the I2C.


UNICENS: Ucs_InitData_t::inic

  • Ucs_InitData_t
ams
general
gpio
i2c
inic
lld
mgr
nd
network
rm
user_ptr
Ucs_Inic_InitData_t inic

INIC initialization data.


UNICENS: Ucs_InitData_t::lld

  • Ucs_InitData_t
ams
general
gpio
i2c
inic
lld
mgr
nd
network
rm
user_ptr
Ucs_Lld_InitData_t lld

Comprises assignment to low-level driver communication interfaces.


UNICENS: Ucs_InitData_t::mgr

  • Ucs_InitData_t
ams
general
gpio
i2c
inic
lld
mgr
nd
network
rm
user_ptr
Ucs_Mgr_InitData_t mgr

The initialization data of the Manager.


UNICENS: Ucs_InitData_t::nd

  • Ucs_InitData_t
ams
general
gpio
i2c
inic
lld
mgr
nd
network
rm
user_ptr
Ucs_Nd_InitData_t nd

The initialization data of the Node Discovery.


UNICENS: Ucs_InitData_t::network

  • Ucs_InitData_t
ams
general
gpio
i2c
inic
lld
mgr
nd
network
rm
user_ptr
Ucs_Network_InitData_t network

Network initialization data.


UNICENS: Ucs_InitData_t::rm

  • Ucs_InitData_t
ams
general
gpio
i2c
inic
lld
mgr
nd
network
rm
user_ptr
Ucs_Rm_InitData_t rm

The initialization data of the Routing Management.


UNICENS: Ucs_InitData_t::user_ptr

  • Ucs_InitData_t
ams
general
gpio
i2c
inic
lld
mgr
nd
network
rm
user_ptr
void* user_ptr

Optional reference to a user context which is provided within API callback functions.

Please note that Ucs_Lld_InitData_t provides a separate lld_user_ptr which is provided for LLD callback functions.


UNICENS: UCS_FOOTPRINT_TINY

  • Initialization and Service
Ucs_CreateInstance
Ucs_ErrorCb_t
UCS_FOOTPRINT_TINY
Ucs_GetTickCountCb_t
Ucs_Init
UCS_NUM_INSTANCES
Ucs_ReportTimeout
Ucs_RequestServiceCb_t
Ucs_Service
Ucs_SetAppTimerCb_t
Ucs_SetDefaultConfig
Ucs_Stop
#define UCS_FOOTPRINT_TINY

Define this macro to reduce the RAM and ROM size of the UNICENS software by disabling certain features.

If this macro is defined the following changes apply:

  • Reduction of low-level buffers
  • AMS does not support segmentation (payload > 45 bytes)


UNICENS: UCS_NUM_INSTANCES

  • Initialization and Service
Ucs_CreateInstance
Ucs_ErrorCb_t
UCS_FOOTPRINT_TINY
Ucs_GetTickCountCb_t
Ucs_Init
UCS_NUM_INSTANCES
Ucs_ReportTimeout
Ucs_RequestServiceCb_t
Ucs_Service
Ucs_SetAppTimerCb_t
Ucs_SetDefaultConfig
Ucs_Stop
#define UCS_NUM_INSTANCES 1

Number of API instances which can be created by function Ucs_CreateInstance().

One API instance is used to communicate with one local INIC. In this case the application is connected to one network. It is possible access multiple networks by having multiple API instances. Each API instance requires communication with an exclusive INIC. Valid values: 1..10. Default Value: 1.


UNICENS: Ucs_ErrorCb_t

  • Initialization and Service
Ucs_CreateInstance
Ucs_ErrorCb_t
UCS_FOOTPRINT_TINY
Ucs_GetTickCountCb_t
Ucs_Init
UCS_NUM_INSTANCES
Ucs_ReportTimeout
Ucs_RequestServiceCb_t
Ucs_Service
Ucs_SetAppTimerCb_t
Ucs_SetDefaultConfig
Ucs_Stop
typedef void(* Ucs_ErrorCb_t)(Ucs_Error_t error_code, void *user_ptr)

Function signature used for the general error callback function.

Parameters
error_code | Reported error code
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_GetTickCountCb_t

  • Initialization and Service
Ucs_CreateInstance
Ucs_ErrorCb_t
UCS_FOOTPRINT_TINY
Ucs_GetTickCountCb_t
Ucs_Init
UCS_NUM_INSTANCES
Ucs_ReportTimeout
Ucs_RequestServiceCb_t
Ucs_Service
Ucs_SetAppTimerCb_t
Ucs_SetDefaultConfig
Ucs_Stop
typedef uint16_t(* Ucs_GetTickCountCb_t)(void *user_ptr)

Function signature used for callback function to get system tick count.

Parameters
user_ptr User reference provided in Ucs_InitData_t::user_ptr
Returns
Tick count in milliseconds


UNICENS: Ucs_RequestServiceCb_t

  • Initialization and Service
Ucs_CreateInstance
Ucs_ErrorCb_t
UCS_FOOTPRINT_TINY
Ucs_GetTickCountCb_t
Ucs_Init
UCS_NUM_INSTANCES
Ucs_ReportTimeout
Ucs_RequestServiceCb_t
Ucs_Service
Ucs_SetAppTimerCb_t
Ucs_SetDefaultConfig
Ucs_Stop
typedef void(* Ucs_RequestServiceCb_t)(void *user_ptr)

Function signature used for service request callback.

Parameters
user_ptr User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_SetAppTimerCb_t

  • Initialization and Service
Ucs_CreateInstance
Ucs_ErrorCb_t
UCS_FOOTPRINT_TINY
Ucs_GetTickCountCb_t
Ucs_Init
UCS_NUM_INSTANCES
Ucs_ReportTimeout
Ucs_RequestServiceCb_t
Ucs_Service
Ucs_SetAppTimerCb_t
Ucs_SetDefaultConfig
Ucs_Stop
typedef void(* Ucs_SetAppTimerCb_t)(uint16_t timeout, void *user_ptr)

Function signature used for timer callback function.

Parameters
timeout | The specified time-out value. If timeout value is greater than 0, the application has to start the timer associated with the specified timeout value. If timeout value is equal to 0, the application has to stop the application timer.
user_ptr | User reference provided in Ucs_InitData_t::user_ptr
Note
The application should only dedicate one timer to UNICENS. Thus, whenever this callback function is called and the associated timeout value is greater than 0, the application should restart the timer with the new specified timeout value !


UNICENS: Ucs_CreateInstance

  • Initialization and Service
Ucs_CreateInstance
Ucs_ErrorCb_t
UCS_FOOTPRINT_TINY
Ucs_GetTickCountCb_t
Ucs_Init
UCS_NUM_INSTANCES
Ucs_ReportTimeout
Ucs_RequestServiceCb_t
Ucs_Service
Ucs_SetAppTimerCb_t
Ucs_SetDefaultConfig
Ucs_Stop
Ucs_Inst_t* Ucs_CreateInstance ( void )

Retrieves a UNICENS API instance.

One API instance is used to communicate with one local INIC. In this case the application is connected to one network. It is possible access multiple networks by having multiple API instances. Each API instance requires communication with an exclusive INIC.

Returns
Returns a reference to new instance of UNICENS or NULL, if it is not possible to create a further instance. The returned instance must be used as argument self.


UNICENS: Ucs_Init

  • Initialization and Service
Ucs_CreateInstance
Ucs_ErrorCb_t
UCS_FOOTPRINT_TINY
Ucs_GetTickCountCb_t
Ucs_Init
UCS_NUM_INSTANCES
Ucs_ReportTimeout
Ucs_RequestServiceCb_t
Ucs_Service
Ucs_SetAppTimerCb_t
Ucs_SetDefaultConfig
Ucs_Stop
Ucs_Return_t Ucs_Init | ( | Ucs_Inst_t * | self,
 |  | const Ucs_InitData_t * | init_ptr,
 |  | Ucs_InitResultCb_t | init_result_fptr
 | ) |  |

UNICENS initialization function.

This function must be called by the application for initializing the complete MOST NetServices library.

Note
Do not call this function within any of the UNICENS callbacks!
Parameters
self | The instance
init_ptr | Reference to UNICENS initialization data
init_result_fptr Callback that reports the result of the initialization Possible result values are shown in the table below.
Result Code | Description
UCS_INIT_RES_SUCCESS | Initialization succeeded
UCS_INIT_RES_ERR_BUF_OVERFLOW | No message buffer available
UCS_INIT_RES_ERR_PMS_INIT | PMS cannot establish INIC synchronization within 2 seconds
UCS_INIT_RES_ERR_INIC_VERSION | INIC device version check failed
UCS_INIT_RES_ERR_DEV_ATT_CFG | Device attach failed due to an configuration error
UCS_INIT_RES_ERR_DEV_ATT_PROC | Device attach failed due to a system error
UCS_INIT_RES_ERR_NET_CFG | Network configuration failed
UCS_INIT_RES_ERR_TIMEOUT | Initialization was not successful within 2 seconds
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error.
UCS_RET_ERR_PARAM | Parameter init_ptr or one of its attributes is not set correctly.


UNICENS: Ucs_ReportTimeout

  • Initialization and Service
Ucs_CreateInstance
Ucs_ErrorCb_t
UCS_FOOTPRINT_TINY
Ucs_GetTickCountCb_t
Ucs_Init
UCS_NUM_INSTANCES
Ucs_ReportTimeout
Ucs_RequestServiceCb_t
Ucs_Service
Ucs_SetAppTimerCb_t
Ucs_SetDefaultConfig
Ucs_Stop
void Ucs_ReportTimeout ( Ucs_Inst_t * self )

The application must call this function if the application timer expires.

Parameters
self The instance


UNICENS: Ucs_Service

  • Initialization and Service
Ucs_CreateInstance
Ucs_ErrorCb_t
UCS_FOOTPRINT_TINY
Ucs_GetTickCountCb_t
Ucs_Init
UCS_NUM_INSTANCES
Ucs_ReportTimeout
Ucs_RequestServiceCb_t
Ucs_Service
Ucs_SetAppTimerCb_t
Ucs_SetDefaultConfig
Ucs_Stop
void Ucs_Service ( Ucs_Inst_t * self )

The application must call this function cyclically to drive UNICENS.

Parameters
self The instance


UNICENS: Ucs_SetDefaultConfig

  • Initialization and Service
Ucs_CreateInstance
Ucs_ErrorCb_t
UCS_FOOTPRINT_TINY
Ucs_GetTickCountCb_t
Ucs_Init
UCS_NUM_INSTANCES
Ucs_ReportTimeout
Ucs_RequestServiceCb_t
Ucs_Service
Ucs_SetAppTimerCb_t
Ucs_SetDefaultConfig
Ucs_Stop
Ucs_Return_t Ucs_SetDefaultConfig ( Ucs_InitData_t * init_ptr )

Assigns default values to a provided UNICENS init structure.

Parameters
init_ptr Reference to a provided MNS init structure. Must not be NULL.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | Parameter init_ptr is NULL


UNICENS: Ucs_Stop

  • Initialization and Service
Ucs_CreateInstance
Ucs_ErrorCb_t
UCS_FOOTPRINT_TINY
Ucs_GetTickCountCb_t
Ucs_Init
UCS_NUM_INSTANCES
Ucs_ReportTimeout
Ucs_RequestServiceCb_t
Ucs_Service
Ucs_SetAppTimerCb_t
Ucs_SetDefaultConfig
Ucs_Stop
Ucs_Return_t Ucs_Stop | ( | Ucs_Inst_t * | self,
 |  | Ucs_StdResultCb_t | stopped_fptr
 | ) |  |

Terminates the execution of UNICENS.

This function stops further communication with the INIC, forces the INIC to protected mode and releases external resources, e.g. calls tx_complete_fptr for previously transmitted application messages. After the termination is complete UNICENS will call stopped_fptr() and will no longer invoke the request_service_fptr.

The application shall no longer call any API function. Any previously retrieved UNICENS objects (e.g. messages) become invalid.

Note
Do not call this function within any of the UNICENS callbacks!
Parameters
self The instance
stopped_fptr Mandatory callback function which is invoked as soon as the termination has been completed. Possible result values are shown in the table below.
Result Code | Description
UCS_RES_SUCCESS | Termination succeeded
UCS_RES_ERR_TIMEOUT | The termination was forced after a definite time. A communication error or INIC reset may be the reason.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | Mandatory callback function not provided
UCS_RET_ERR_API_LOCKED | Initialization was not completed or termination has been started before


UNICENS: INIC

Topics | Data Structures
INIC

INIC related functions. More...

Topics

Referred Types
INIC related types.

Data Structures

struct Ucs_Inic_InitData_t
The INIC section of initialization data. More...

Detailed Description

INIC related functions.


UNICENS: Referred Types

Data Structures | Callback Functions | Enumerations
Referred Types
INIC

INIC related types. More...

Data Structures

struct | Ucs_Inic_Version_t
This structure contains information on the hardware and firmware modules of the INIC. More...
struct | Ucs_Gpio_PinConfiguration_t
This structure contains information on the GPIO pin configuration. More...

Callback Functions

typedef void(* Ucs_Inic_PowerStateCb_t )(Ucs_Inic_PowerState_t power_state, void *user_ptr)
Function signature used to monitor the INICs power state.

Enumerations

enum Ucs_Inic_LastResetReason_t {
UCS_INIC_RST_STARTUP = 0x00U,
UCS_INIC_RST_HW_WATCHDOG = 0x01U,
UCS_INIC_RST_STACK_OVERFLOW = 0x02U
}
Data Type which describes the last reset reason of the device. More...
enum Ucs_Inic_PowerState_t {
UCS_INIC_PWS_U_NORMAL = 0x00U,
UCS_INIC_PWS_U_LOW = 0x01U,
UCS_INIC_PWS_STP = 0x02U,
UCS_INIC_PWS_U_CRITICAL = 0x03U,
UCS_INIC_PWS_NO_MONITORING = 0xFFU
}
The current power state of the INICs power management interface (PS0/PS1). More...
enum Ucs_Sd_ResCode_t {
UCS_SD_TARGET_FOUND = 0x01U,
UCS_SD_FINISHED = 0x02U,
UCS_SD_CABLE_LINK_RES = 0x03U,
UCS_SD_ABORTED = 0x04U,
UCS_SD_ERROR = 0x05U
}
Type of System Diagnosis Report. More...
enum Ucs_Sd_ErrCode_t {
UCS_SD_ERR_UNSPECIFIED = 0x01U,
UCS_SD_ERR_WELCOME_NO_SUCCESS = 0x02U,
UCS_SD_ERR_STOP_SYSDIAG_FAILED = 0x03U,
UCS_SD_ERR_TERMINATED = 0x04U
}
Type of System Diagnosis Error Codes. More...

Detailed Description

INIC related types.


UNICENS: Ucs_Inic_Version_t Struct Reference

Data Fields
Ucs_Inic_Version_t Struct Reference
Referred Types

This structure contains information on the hardware and firmware modules of the INIC. More...

Data Fields

uint32_t | product_identifier
Unique identifier that represents the product name.
uint32_t | build_version
Firmware build version number.
uint8_t | major_version
Firmware major version number.
uint8_t | minor_version
Firmware build version number.
uint8_t | release_version
Firmware release version number.
uint8_t | hw_revision
Chip revision number.
uint16_t | diagnosis_id
Diagnosis identifier of the INIC.
uint8_t | cs_major_version
Configuration String major version number.
uint8_t | cs_minor_version
Configuration String minor version number.
uint8_t | cs_release_version
Configuration String release version number.

Detailed Description

This structure contains information on the hardware and firmware modules of the INIC.


UNICENS: Ucs_Inic_Version_t::build_version

  • Ucs_Inic_Version_t
build_version
cs_major_version
cs_minor_version
cs_release_version
diagnosis_id
hw_revision
major_version
minor_version
product_identifier
release_version
uint32_t build_version

Firmware build version number.

BuildVersion


UNICENS: Ucs_Inic_Version_t::cs_major_version

  • Ucs_Inic_Version_t
build_version
cs_major_version
cs_minor_version
cs_release_version
diagnosis_id
hw_revision
major_version
minor_version
product_identifier
release_version
uint8_t cs_major_version

Configuration String major version number.

ExtMajorVersion


UNICENS: Ucs_Inic_Version_t::cs_minor_version

  • Ucs_Inic_Version_t
build_version
cs_major_version
cs_minor_version
cs_release_version
diagnosis_id
hw_revision
major_version
minor_version
product_identifier
release_version
uint8_t cs_minor_version

Configuration String minor version number.

ExtMinorVersion


UNICENS: Ucs_Inic_Version_t::cs_release_version

  • Ucs_Inic_Version_t
build_version
cs_major_version
cs_minor_version
cs_release_version
diagnosis_id
hw_revision
major_version
minor_version
product_identifier
release_version
uint8_t cs_release_version

Configuration String release version number.

ExtReleaseVersion


UNICENS: Ucs_Inic_Version_t::diagnosis_id

  • Ucs_Inic_Version_t
build_version
cs_major_version
cs_minor_version
cs_release_version
diagnosis_id
hw_revision
major_version
minor_version
product_identifier
release_version
uint16_t diagnosis_id

Diagnosis identifier of the INIC.

DiagnosisID


UNICENS: Ucs_Inic_Version_t::hw_revision

  • Ucs_Inic_Version_t
build_version
cs_major_version
cs_minor_version
cs_release_version
diagnosis_id
hw_revision
major_version
minor_version
product_identifier
release_version
uint8_t hw_revision

Chip revision number.

HardwareRevision


UNICENS: Ucs_Inic_Version_t::major_version

  • Ucs_Inic_Version_t
build_version
cs_major_version
cs_minor_version
cs_release_version
diagnosis_id
hw_revision
major_version
minor_version
product_identifier
release_version
uint8_t major_version

Firmware major version number.

MajorVersion


UNICENS: Ucs_Inic_Version_t::minor_version

  • Ucs_Inic_Version_t
build_version
cs_major_version
cs_minor_version
cs_release_version
diagnosis_id
hw_revision
major_version
minor_version
product_identifier
release_version
uint8_t minor_version

Firmware build version number.

MinorVersion


UNICENS: Ucs_Inic_Version_t::product_identifier

  • Ucs_Inic_Version_t
build_version
cs_major_version
cs_minor_version
cs_release_version
diagnosis_id
hw_revision
major_version
minor_version
product_identifier
release_version
uint32_t product_identifier

Unique identifier that represents the product name.

ProductIdentifier


UNICENS: Ucs_Inic_Version_t::release_version

  • Ucs_Inic_Version_t
build_version
cs_major_version
cs_minor_version
cs_release_version
diagnosis_id
hw_revision
major_version
minor_version
product_identifier
release_version
uint8_t release_version

Firmware release version number.

ReleaseVersion


UNICENS: Ucs_Gpio_PinConfiguration_t Struct Reference

Data Fields
Ucs_Gpio_PinConfiguration_t Struct Reference
Referred Types

This structure contains information on the GPIO pin configuration. More...

Data Fields

uint8_t pin
The GPIO pin that is to be configured.
Ucs_Gpio_PinMode_t mode
The mode of the GPIO pin.

Detailed Description

This structure contains information on the GPIO pin configuration.


UNICENS: Ucs_Gpio_PinConfiguration_t::mode

  • Ucs_Gpio_PinConfiguration_t
mode
pin
Ucs_Gpio_PinMode_t mode

The mode of the GPIO pin.


UNICENS: Ucs_Gpio_PinConfiguration_t::pin

  • Ucs_Gpio_PinConfiguration_t
mode
pin
uint8_t pin

The GPIO pin that is to be configured.


UNICENS: Ucs_Inic_PowerStateCb_t

  • Referred Types
Ucs_Inic_LastResetReason_t
Ucs_Inic_PowerState_t
Ucs_Inic_PowerStateCb_t
Ucs_Sd_ErrCode_t
Ucs_Sd_ResCode_t
typedef void(* Ucs_Inic_PowerStateCb_t)(Ucs_Inic_PowerState_t power_state, void *user_ptr)

Function signature used to monitor the INICs power state.

Parameters
power_state | The current state of the INICs power management interface.
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Inic_LastResetReason_t

  • Referred Types
Ucs_Inic_LastResetReason_t
Ucs_Inic_PowerState_t
Ucs_Inic_PowerStateCb_t
Ucs_Sd_ErrCode_t
Ucs_Sd_ResCode_t
enum Ucs_Inic_LastResetReason_t

Data Type which describes the last reset reason of the device.

Enumerator:
UCS_INIC_RST_STARTUP

Reset due to Power on reset or reset pin (!RST) is held low.

UCS_INIC_RST_HW_WATCHDOG

Reset due to hardware watchdog that had snapped.

UCS_INIC_RST_STACK_OVERFLOW

Reset due to stack overflow.


UNICENS: Ucs_Inic_PowerState_t

  • Referred Types
Ucs_Inic_LastResetReason_t
Ucs_Inic_PowerState_t
Ucs_Inic_PowerStateCb_t
Ucs_Sd_ErrCode_t
Ucs_Sd_ResCode_t
enum Ucs_Inic_PowerState_t

The current power state of the INICs power management interface (PS0/PS1).

Enumerator:
UCS_INIC_PWS_U_NORMAL

Power state "UNormal".

UCS_INIC_PWS_U_LOW

Power state "ULow".

UCS_INIC_PWS_STP

Power State "STP".

UCS_INIC_PWS_U_CRITICAL

Power State "UCritical".

UCS_INIC_PWS_NO_MONITORING

No power state. Power management monitoring is disabled in INIC configuration string.


UNICENS: Ucs_Sd_ErrCode_t

  • Referred Types
Ucs_Inic_LastResetReason_t
Ucs_Inic_PowerState_t
Ucs_Inic_PowerStateCb_t
Ucs_Sd_ErrCode_t
Ucs_Sd_ResCode_t
enum Ucs_Sd_ErrCode_t

Type of System Diagnosis Error Codes.

Enumerator:
UCS_SD_ERR_UNSPECIFIED

An internal error occurred during System Diagnosis.

UCS_SD_ERR_WELCOME_NO_SUCCESS

INIC answered with "NoSuccess" to a Welcome.StartResult command.

UCS_SD_ERR_STOP_SYSDIAG_FAILED

Stopping the System Diagnosis mode on INIC failed. The INIC may remain in System Diagnosis mode.

UCS_SD_ERR_TERMINATED

System Diagnosis stopped due to a severe error. The INIC may remain in System Diagnosis mode.


UNICENS: Ucs_Sd_ResCode_t

  • Referred Types
Ucs_Inic_LastResetReason_t
Ucs_Inic_PowerState_t
Ucs_Inic_PowerStateCb_t
Ucs_Sd_ErrCode_t
Ucs_Sd_ResCode_t
enum Ucs_Sd_ResCode_t

Type of System Diagnosis Report.

Enumerator:
UCS_SD_TARGET_FOUND

Segment description.

UCS_SD_FINISHED

System Diagnosis finished.

UCS_SD_CABLE_LINK_RES

Cable Link Diagnosis was executed.

UCS_SD_ABORTED

System Diagnosis stopped by application command.

UCS_SD_ERROR

System Diagnosis detected unexpected error.


UNICENS: Ucs_Inic_InitData_t Struct Reference

Data Fields
Ucs_Inic_InitData_t Struct Reference
INIC

The INIC section of initialization data. More...

Data Fields

Ucs_Inic_PowerStateCb_t power_state_fptr
Callback function to monitor the state of the INIC's power management interface.

Detailed Description

The INIC section of initialization data.


UNICENS: Ucs_Inic_InitData_t::power_state_fptr

  • Ucs_Inic_InitData_t
power_state_fptr
Ucs_Inic_PowerStateCb_t power_state_fptr

Callback function to monitor the state of the INIC's power management interface.


UNICENS: Network

Topics | Data Structures | Callback Functions | Functions
Network

Provides network management functions. More...

Topics

Referred Types
Provides network management functions.

Data Structures

struct Ucs_Network_InitData_t
The network section of the UNICENS initialization data. More...

Callback Functions

typedef void(* | Ucs_Network_StatusCb_t )(uint16_t change_mask, uint16_t events, Ucs_Network_Availability_t availability, Ucs_Network_AvailInfo_t avail_info, Ucs_Network_AvailTransCause_t avail_trans_cause, uint16_t node_address, uint8_t node_position, uint8_t max_position, uint16_t packet_bw, void *user_ptr)
Function signature used for the Network Status callback function.
typedef void(* | Ucs_Network_FrameCounterCb_t )(uint32_t reference, uint32_t frame_counter, bool frame_lock, Ucs_StdResult_t result, void *user_pointer)
Function signature of result callback used by Ucs_Network_GetFrameCounter().

Functions

Ucs_Return_t | Ucs_Network_Startup (Ucs_Inst_t *self, uint16_t packet_bw, uint16_t forced_na_timeout, Ucs_StdResultCb_t result_fptr)
Starts up the MOST Network.
Ucs_Return_t | Ucs_Network_Shutdown (Ucs_Inst_t *self, Ucs_StdResultCb_t result_fptr)
Switches of the MOST Network.
Ucs_Return_t | Ucs_Network_ForceNotAvailable (Ucs_Inst_t *self, bool force, Ucs_StdResultCb_t result_fptr)
Triggers the INIC to force the NotAvailable state.
Ucs_Return_t | Ucs_Network_GetFrameCounter (Ucs_Inst_t *self, uint32_t reference, Ucs_Network_FrameCounterCb_t result_fptr)
Retrieves the Network Frame Counter, which is the number of frames since reset.
uint8_t | Ucs_Network_GetNodesCount (Ucs_Inst_t *self)
Retrieves the number of nodes within the MOST network.

Detailed Description

Provides network management functions.


UNICENS: Referred Types

Data Structures | Macros | Enumerations
Referred Types
Network

Provides network management functions. More...

Data Structures

struct Ucs_Network_Status_t
Structure holds parameters for the notification of the Network Status. More...

Macros

#define | UCS_NETWORK_EVENT_NCE 0x0001U
Bitmask used for network status event "Network Change Event".
#define | UCS_EXC_SIGNATURE_VERSION_LIMIT 1U
Signature version limit of EXC commands. Denotes the maximum signature version number the INIC can handle.

Enumerations

enum Ucs_Network_StatusMask_t {
UCS_NW_M_EVENTS = 0x01U,
UCS_NW_M_AVAIL = 0x02U,
UCS_NW_M_AVAIL_INFO = 0x04U,
UCS_NW_M_AVAIL_TR_CAUSE = 0x08U,
UCS_NW_M_NODE_ADDR = 0x10U,
UCS_NW_M_NODE_POS = 0x20U,
UCS_NW_M_MAX_POS = 0x40U,
UCS_NW_M_PACKET_BW = 0x80U
}
Defines the flags set in change_mask used by NetworkStatus.Status. More...
enum Ucs_Network_Availability_t {
UCS_NW_NOT_AVAILABLE = 0x00U,
UCS_NW_AVAILABLE = 0x01U
}
MOST Network Availability. More...
enum Ucs_Network_AvailInfo_t {
UCS_NW_AVAIL_INFO_REGULAR = 0x00U,
UCS_NW_AVAIL_INFO_DIAGNOSIS = 0x02U,
UCS_NW_AVAIL_INFO_FORCED_NA = 0x06U,
UCS_NW_AVAIL_INFO_UNSTABLE = 0x10U,
UCS_NW_AVAIL_INFO_STABLE = 0x11U
}
MOST Network Availability Information. More...
enum Ucs_Network_AvailTransCause_t {
UCS_NW_AV_TR_CA_CMD = 0x00U,
UCS_NW_AV_TR_CA_RX_ACTIVITY = 0x01U,
UCS_NW_AV_TR_CA_NORMAL = 0x10U,
UCS_NW_AV_TR_CA_ERR_SSO = 0x11U,
UCS_NW_AV_TR_CA_ERR_CRIT_UNLOCK = 0x12U,
UCS_NW_AV_TR_CA_ERR_SYSTEM = 0x13U,
UCS_NW_AV_TR_CA_NO_TRANSITION = 0xFFU
}
MOST Network Availability Transition Cause. More...

Detailed Description

Provides network management functions.


UNICENS: Ucs_Network_Status_t Struct Reference

Data Fields
Ucs_Network_Status_t Struct Reference
Referred Types

Structure holds parameters for the notification of the Network Status. More...

Data Fields

Ucs_Network_StatusCb_t cb_fptr
Network Status callback function. This function reports information on the whole network.
uint16_t notification_mask
Notification mask (optional parameter; default value: 0xFFFF) Indicates for which parameters the notification shall be enabled. If such a bit is set and the corresponding parameter has been changed the notification callback is invoked. This is an optional parameter. If the mask is not modified notifications for all of the parameters are enabled.

Bit Index | Value (Hex) | Parameter
0 | 0x01 | events
1 | 0x02 | availability
2 | 0x04 | avail_info
3 | 0x08 | avail_trans_cause
4 | 0x10 | node_address
5 | 0x20 | node_position
6 | 0x40 | max_position
7 | 0x80 | packet_bw

Detailed Description

Structure holds parameters for the notification of the Network Status.


UNICENS: Ucs_Network_Status_t::cb_fptr

  • Ucs_Network_Status_t
cb_fptr
notification_mask
Ucs_Network_StatusCb_t cb_fptr

Network Status callback function. This function reports information on the whole network.


UNICENS: Ucs_Network_Status_t::notification_mask

  • Ucs_Network_Status_t
cb_fptr
notification_mask
uint16_t notification_mask

Notification mask (optional parameter; default value: 0xFFFF) Indicates for which parameters the notification shall be enabled. If such a bit is set and the corresponding parameter has been changed the notification callback is invoked. This is an optional parameter. If the mask is not modified notifications for all of the parameters are enabled.

Bit Index | Value (Hex) | Parameter
0 | 0x01 | events
1 | 0x02 | availability
2 | 0x04 | avail_info
3 | 0x08 | avail_trans_cause
4 | 0x10 | node_address
5 | 0x20 | node_position
6 | 0x40 | max_position
7 | 0x80 | packet_bw


UNICENS: UCS_EXC_SIGNATURE_VERSION_LIMIT

  • Referred Types
UCS_EXC_SIGNATURE_VERSION_LIMIT
Ucs_Network_Availability_t
Ucs_Network_AvailInfo_t
Ucs_Network_AvailTransCause_t
UCS_NETWORK_EVENT_NCE
Ucs_Network_StatusMask_t
#define UCS_EXC_SIGNATURE_VERSION_LIMIT 1U

Signature version limit of EXC commands. Denotes the maximum signature version number the INIC can handle.


UNICENS: UCS_NETWORK_EVENT_NCE

  • Referred Types
UCS_EXC_SIGNATURE_VERSION_LIMIT
Ucs_Network_Availability_t
Ucs_Network_AvailInfo_t
Ucs_Network_AvailTransCause_t
UCS_NETWORK_EVENT_NCE
Ucs_Network_StatusMask_t
#define UCS_NETWORK_EVENT_NCE 0x0001U

Bitmask used for network status event "Network Change Event".


UNICENS: Ucs_Network_Availability_t

  • Referred Types
UCS_EXC_SIGNATURE_VERSION_LIMIT
Ucs_Network_Availability_t
Ucs_Network_AvailInfo_t
Ucs_Network_AvailTransCause_t
UCS_NETWORK_EVENT_NCE
Ucs_Network_StatusMask_t
enum Ucs_Network_Availability_t

MOST Network Availability.

Enumerator:
UCS_NW_NOT_AVAILABLE

MOST network is not available.

UCS_NW_AVAILABLE

MOST network is available.


UNICENS: Ucs_Network_AvailInfo_t

  • Referred Types
UCS_EXC_SIGNATURE_VERSION_LIMIT
Ucs_Network_Availability_t
Ucs_Network_AvailInfo_t
Ucs_Network_AvailTransCause_t
UCS_NETWORK_EVENT_NCE
Ucs_Network_StatusMask_t
enum Ucs_Network_AvailInfo_t

MOST Network Availability Information.

AvailabilityInfo is a sub state of Availability (Ucs_Network_Availability_t) Possible pairs of Availability and Availability Information

Availability | Availability Information
UCS_NW_NOT_AVAILABLE | UCS_NW_AVAIL_INFO_REGULAR
UCS_NW_NOT_AVAILABLE | UCS_NW_AVAIL_INFO_DIAGNOSIS
UCS_NW_NOT_AVAILABLE | UCS_NW_AVAIL_INFO_FORCED_NA
UCS_NW_AVAILABLE | UCS_NW_AVAIL_INFO_UNSTABLE
UCS_NW_AVAILABLE | UCS_NW_AVAIL_INFO_STABLE
Enumerator:
UCS_NW_AVAIL_INFO_REGULAR

The network is not available because it is in NetInterface Off or Init state. It is pending to get available again.

UCS_NW_AVAIL_INFO_DIAGNOSIS

The network is not available because it performs a ring break diagnosis or physical layer test.

UCS_NW_AVAIL_INFO_FORCED_NA

The INIC forces the network to stay in "not available" state. The application may enter or leave this state by calling Ucs_Network_ForceNotAvailable(). Also see Ucs_Network_Startup().

UCS_NW_AVAIL_INFO_UNSTABLE

Network is available. Unlocks have been detected.

UCS_NW_AVAIL_INFO_STABLE

Network is available. Network is in Stable Lock.


UNICENS: Ucs_Network_AvailTransCause_t

  • Referred Types
UCS_EXC_SIGNATURE_VERSION_LIMIT
Ucs_Network_Availability_t
Ucs_Network_AvailInfo_t
Ucs_Network_AvailTransCause_t
UCS_NETWORK_EVENT_NCE
Ucs_Network_StatusMask_t
enum Ucs_Network_AvailTransCause_t

MOST Network Availability Transition Cause.

Enumerator:
UCS_NW_AV_TR_CA_CMD

Start-up is initiated by chip e.g., INIC.MOSTNetworkStartup()

UCS_NW_AV_TR_CA_RX_ACTIVITY

Chip is woken up by network activity.

UCS_NW_AV_TR_CA_NORMAL

Network is typically shutdown by an INIC.MOSTNetworkShutdown() command initiated locally or by a node positioned upstream (in the latter case, the shutdown flag indicates a Normal Shutdown).

UCS_NW_AV_TR_CA_ERR_SSO

Network is shutdown due to an error. In this case the shutdown reason was a sudden signal off. No shutdown flag is present.

UCS_NW_AV_TR_CA_ERR_CRIT_UNLOCK

Network is shutdown due to an error. In this case the shutdown reason was a critical unlock. No shutdown flag is present.

UCS_NW_AV_TR_CA_ERR_SYSTEM

Network is shutdown due to a chip or system error. Possible reasons are:

  • INIC enters ForcedNA state
  • The AutoShutdownDownDelay time expires after the EHC has detached.
UCS_NW_AV_TR_CA_NO_TRANSITION

No transition.


UNICENS: Ucs_Network_StatusMask_t

  • Referred Types
UCS_EXC_SIGNATURE_VERSION_LIMIT
Ucs_Network_Availability_t
Ucs_Network_AvailInfo_t
Ucs_Network_AvailTransCause_t
UCS_NETWORK_EVENT_NCE
Ucs_Network_StatusMask_t
enum Ucs_Network_StatusMask_t

Defines the flags set in change_mask used by NetworkStatus.Status.

Enumerator:
UCS_NW_M_EVENTS

Flag for notification of event changes.

UCS_NW_M_AVAIL

Flag for notification of availability changes.

UCS_NW_M_AVAIL_INFO

Flag for notification of availability info changes.

UCS_NW_M_AVAIL_TR_CAUSE

Flag for notification of availability transition cause changes.

UCS_NW_M_NODE_ADDR

Flag for notification of node address changes.

UCS_NW_M_NODE_POS

Flag for notification of node position changes.

UCS_NW_M_MAX_POS

Flag for notification of MPR changes.

UCS_NW_M_PACKET_BW

Flag for notification of packet bandwidth changes.


UNICENS: Ucs_Network_InitData_t Struct Reference

Data Fields
Ucs_Network_InitData_t Struct Reference
Network

The network section of the UNICENS initialization data. More...

Data Fields

Ucs_Network_Status_t status
Network Status.

Detailed Description

The network section of the UNICENS initialization data.


UNICENS: Ucs_Network_InitData_t::status

  • Ucs_Network_InitData_t
status
Ucs_Network_Status_t status

Network Status.


UNICENS: Ucs_Network_FrameCounterCb_t

  • Network
Ucs_Network_ForceNotAvailable
Ucs_Network_FrameCounterCb_t
Ucs_Network_GetFrameCounter
Ucs_Network_GetNodesCount
Ucs_Network_Shutdown
Ucs_Network_Startup
Ucs_Network_StatusCb_t
typedef void(* Ucs_Network_FrameCounterCb_t)(uint32_t reference, uint32_t frame_counter, bool frame_lock, Ucs_StdResult_t result, void *user_pointer)

Function signature of result callback used by Ucs_Network_GetFrameCounter().

The arguments of the result callback function correspond with the INIC's result for the function INIC.MOSTNetworkFrameCounter.
See also User Manual, section Synchronous vs. Asynchronous Results.
Parameters
frame_counter The MOST network frame count.
FrameCounter
reference Reference value that was passed to Mns_Network_GetFrameCounter().
Reference
lock | Indicates if the TimingSlave device is locked to the MOST network. For a TimingMaster device this value is always True.
result | Returned result of the operation
user_pter | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Network_StatusCb_t

  • Network
Ucs_Network_ForceNotAvailable
Ucs_Network_FrameCounterCb_t
Ucs_Network_GetFrameCounter
Ucs_Network_GetNodesCount
Ucs_Network_Shutdown
Ucs_Network_Startup
Ucs_Network_StatusCb_t
typedef void(* Ucs_Network_StatusCb_t)(uint16_t change_mask, uint16_t events, Ucs_Network_Availability_t availability, Ucs_Network_AvailInfo_t avail_info, Ucs_Network_AvailTransCause_t avail_trans_cause, uint16_t node_address, uint8_t node_position, uint8_t max_position, uint16_t packet_bw, void *user_ptr)

Function signature used for the Network Status callback function.

The arguments of the result callback function correspond with the INIC's result for the function INIC.MOSTNetworkStatus.
Parameters
change_mask Indicates which parameters have been changed since the last function call. If a bit is set the corresponding parameter has been changed since the last update.
Bit Index | Value (Hex) | Parameter
0 | 0x01 | events
1 | 0x02 | availability
2 | 0x04 | avail_info
3 | 0x08 | avail_trans_cause
4 | 0x10 | node_address
5 | 0x20 | node_position
6 | 0x40 | max_position
7 | 0x80 | packet_bw
events The occurred network events. Events are only indicated once they occurred. I.e., the value is not handled as a continuous state. You can use the bitmask UCS_NETWORK_EVENT_NCE to identify received events.
Events
availability The network availability.
Availability
avail_info The availability information.
AvailabilityInfo
avail_trans_cause The availability transition cause.
AvailabilityTransitionCause
node_address The current node address.
NodeAddress
node_position The current node position.
NodePosition
max_position The number of available nodes.
MaxPosition
packet_bw The packet bandwidth.
PacketBW
user_ptr User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Network_ForceNotAvailable

  • Network
Ucs_Network_ForceNotAvailable
Ucs_Network_FrameCounterCb_t
Ucs_Network_GetFrameCounter
Ucs_Network_GetNodesCount
Ucs_Network_Shutdown
Ucs_Network_Startup
Ucs_Network_StatusCb_t
Ucs_Return_t Ucs_Network_ForceNotAvailable | ( | Ucs_Inst_t * | self,
 |  | bool | force,
 |  | Ucs_StdResultCb_t | result_fptr
 | ) |  |

Triggers the INIC to force the NotAvailable state.

Parameters
self | The instance
force | Is true if the INIC shall force the network in NotAvailable state. If false the INIC shall no no longer force the network to NotAvailable state.
result_fptr | Optional result callback
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized


UNICENS: Ucs_Network_GetFrameCounter

  • Network
Ucs_Network_ForceNotAvailable
Ucs_Network_FrameCounterCb_t
Ucs_Network_GetFrameCounter
Ucs_Network_GetNodesCount
Ucs_Network_Shutdown
Ucs_Network_Startup
Ucs_Network_StatusCb_t
Ucs_Return_t Ucs_Network_GetFrameCounter | ( | Ucs_Inst_t * | self,
 |  | uint32_t | reference,
 |  | Ucs_Network_FrameCounterCb_t | result_fptr
 | ) |  |

Retrieves the Network Frame Counter, which is the number of frames since reset.

This function corresponds with the INIC function INIC.MOSTNetworkFrameCounter.
Parameters
self | The instance
reference Reference value that shall be delivered by result_fptr.
Reference
result_fptr | Result callback.
Returns
Possible return values are shown in the table below.
Value | Description
MNS_RET_SUCCESS | No error
MNS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
MNS_RET_ERR_API_LOCKED | API is currently locked
MNS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized


UNICENS: Ucs_Network_GetNodesCount

  • Network
Ucs_Network_ForceNotAvailable
Ucs_Network_FrameCounterCb_t
Ucs_Network_GetFrameCounter
Ucs_Network_GetNodesCount
Ucs_Network_Shutdown
Ucs_Network_Startup
Ucs_Network_StatusCb_t
uint8_t Ucs_Network_GetNodesCount ( Ucs_Inst_t * self )

Retrieves the number of nodes within the MOST network.

Parameters
self The instance
Returns
Returns the number of nodes within the MOST network.


UNICENS: Ucs_Network_Shutdown

  • Network
Ucs_Network_ForceNotAvailable
Ucs_Network_FrameCounterCb_t
Ucs_Network_GetFrameCounter
Ucs_Network_GetNodesCount
Ucs_Network_Shutdown
Ucs_Network_Startup
Ucs_Network_StatusCb_t
Ucs_Return_t Ucs_Network_Shutdown | ( | Ucs_Inst_t * | self,
 |  | Ucs_StdResultCb_t | result_fptr
 | ) |  |

Switches of the MOST Network.

Parameters
self | The instance
result_fptr | Optional result callback
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized


UNICENS: Ucs_Network_Startup

  • Network
Ucs_Network_ForceNotAvailable
Ucs_Network_FrameCounterCb_t
Ucs_Network_GetFrameCounter
Ucs_Network_GetNodesCount
Ucs_Network_Shutdown
Ucs_Network_Startup
Ucs_Network_StatusCb_t
Ucs_Return_t Ucs_Network_Startup | ( | Ucs_Inst_t * | self,
 |  | uint16_t | packet_bw,
 |  | uint16_t | forced_na_timeout,
 |  | Ucs_StdResultCb_t | result_fptr
 | ) |  |

Starts up the MOST Network.

Note
There is no predefined timeout for this operation. I.e., the startup process is performed by the INIC until result_fptr is invoked or the application calls Ucs_Network_Shutdown() to abort the startup process.
Parameters
self | The instance
packet_bw The desired packet bandwidth.
PacketBW
forced_na_timeout The delay time in milliseconds to shutdown the network after the INIC has entered the protected mode.
AutoForcedNotAvailable
result_fptr | Optional result callback.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized


UNICENS: Application Message Service

Topics | Data Structures | Macros | Callback Functions | Functions
Application Message Service

Application Message Service. More...

Topics

Referred Types
Referred types used by Application Message Service.

Data Structures

struct Ucs_Ams_InitData_t
The initialization data of the Application Message Service. More...

Macros

#define | UCS_AMS_NUM_RX_MSGS 20
Defines the number of reserved Rx message objects. Valid values: 5..255. Default value: 20.
#define | UCS_AMS_SIZE_RX_MSG 45
Defines the payload size in bytes which is available for every Rx message object. Valid values: 45..65535. Default value: 45.
#define | UCS_AMS_NUM_TX_MSGS 20
Defines the number of reserved Tx message objects. Valid values: 5..255. Default value: 20.
#define | UCS_AMS_SIZE_TX_MSG 45
Defines the payload size in bytes which is available for every Tx message object. Valid values: 45..65535. Default value: 45.

Callback Functions

typedef void(* | Ucs_AmsTx_MsgFreedCb_t )(void *user_ptr)
Type of a callback function that is invoked to notify that a Tx application message object is available again while a previous allocation using Ucs_AmsTx_AllocMsg() has failed.
typedef void(* | Ucs_AmsRx_MsgReceivedCb_t )(void *user_ptr)
Callback function type that is invoked if UNICENS has received a message completely and appended to the Rx message queue.

Functions

Ucs_AmsTx_Msg_t * | Ucs_AmsTx_AllocMsg (Ucs_Inst_t *self, uint16_t data_size)
Allocates an application message object for transmission.
Ucs_Return_t | Ucs_AmsTx_SendMsg (Ucs_Inst_t *self, Ucs_AmsTx_Msg_t *msg_ptr, Ucs_AmsTx_CompleteCb_t tx_complete_fptr)
Transmits an application message.
void | Ucs_AmsTx_FreeUnusedMsg (Ucs_Inst_t *self, Ucs_AmsTx_Msg_t *msg_ptr)
Frees an unused Tx message object.
Ucs_AmsRx_Msg_t * | Ucs_AmsRx_PeekMsg (Ucs_Inst_t *self)
Retrieves a reference to the front-most message in the Rx queue.
void | Ucs_AmsRx_ReleaseMsg (Ucs_Inst_t *self)
Removes and frees the front-most message from the Rx queue.
uint16_t | Ucs_AmsRx_GetMsgCnt (Ucs_Inst_t *self)
Retrieves the number of messages that are located in the Rx queue.

Detailed Description

Application Message Service.


UNICENS: Referred Types

Data Structures | Callback Functions | Enumerations
Referred Types
Application Message Service

Referred types used by Application Message Service. More...

Data Structures

struct | Ucs_AmsRx_InitData_t
The Rx initialization data of the Application Message Service. More...
struct | Ucs_AmsTx_InitData_t
The Tx initialization data of the Application Message Service. More...
struct | Ucs_AmsTx_Msg_t
Application message Tx type. More...
struct | Ucs_AmsRx_Msg_t
Application message Rx type. More...

Callback Functions

typedef void(* Ucs_AmsTx_CompleteCb_t )(Ucs_AmsTx_Msg_t *msg_ptr, Ucs_AmsTx_Result_t result, Ucs_AmsTx_Info_t info, void *user_ptr)
Type of a callback function that is invoked as soon as a message transmission was finished.

Enumerations

enum Ucs_AmsRx_ReceiveType_t {
UCS_AMSRX_RCT_SINGLECAST = 0U,
UCS_AMSRX_RCT_GROUPCAST = 1U,
UCS_AMSRX_RCT_BROADCAST = 2U
}
Defines which address type was used by the transmitter of a message. More...
enum Ucs_AmsTx_Result_t {
UCS_AMSTX_RES_SUCCESS = 0x00U,
UCS_AMSTX_RES_ERR_RETRIES_EXP = 0x01U,
UCS_AMSTX_RES_ERR_INVALID_TGT = 0x02U,
UCS_AMSTX_RES_ERR_NOT_AVAILABLE = 0x03U,
UCS_AMSTX_RES_ERR_BUF_INTERNAL = 0xFEU,
UCS_AMSTX_RES_ERR_UNEXPECTED = 0xFFU
}
Transmission result of an application message. More...
enum Ucs_AmsTx_Info_t {
UCS_AMSTX_I_SUCCESS = 0x00U,
UCS_AMSTX_I_ERR_CFG_NORECEIVER = 0x01U,
UCS_AMSTX_I_ERR_BF = 0x08U,
UCS_AMSTX_I_ERR_CRC = 0x09U,
UCS_AMSTX_I_ERR_ID = 0x0AU,
UCS_AMSTX_I_ERR_ACK = 0x0BU,
UCS_AMSTX_I_ERR_TIMEOUT = 0x0CU,
UCS_AMSTX_I_ERR_FATAL_WT = 0x10U,
UCS_AMSTX_I_ERR_FATAL_OA = 0x11U,
UCS_AMSTX_I_ERR_UNAVAIL_TRANS = 0x18U,
UCS_AMSTX_I_ERR_UNAVAIL_OFF = 0x19U,
UCS_AMSTX_I_ERR_UNKNOWN = 0xFEU,
UCS_AMSTX_I_ERR_UNSYNCED = 0xFFU
}
Detailed INIC transmission information which might be useful for debugging purposes. More...

Detailed Description

Referred types used by Application Message Service.


UNICENS: Ucs_AmsRx_InitData_t Struct Reference

Data Fields
Ucs_AmsRx_InitData_t Struct Reference
Referred Types

The Rx initialization data of the Application Message Service. More...

Data Fields

Ucs_AmsRx_MsgReceivedCb_t message_received_fptr
Callback function that is invoked if the UNICENS library has received a message completely and appended to the Rx message queue.

Detailed Description

The Rx initialization data of the Application Message Service.


UNICENS: Ucs_AmsRx_InitData_t::message_received_fptr

  • Ucs_AmsRx_InitData_t
message_received_fptr
Ucs_AmsRx_MsgReceivedCb_t message_received_fptr

Callback function that is invoked if the UNICENS library has received a message completely and appended to the Rx message queue.


UNICENS: Ucs_AmsTx_InitData_t Struct Reference

Data Fields
Ucs_AmsTx_InitData_t Struct Reference
Referred Types

The Tx initialization data of the Application Message Service. More...

Data Fields

Ucs_AmsTx_MsgFreedCb_t message_freed_fptr
Callback function which is invoked by the UNICENS library to notify that memory of a Tx message object was freed after a previous allocation using Ucs_AmsTx_AllocMsg() has failed. The application might attempt to call Ucs_AmsTx_AllocMsg() again.
uint8_t default_llrbc
Specifies the low-level retry block count which is pre-selected in an allocated Tx message object. Valid values: 0..100. Default value: 10.

Detailed Description

The Tx initialization data of the Application Message Service.


UNICENS: Ucs_AmsTx_InitData_t::default_llrbc

  • Ucs_AmsTx_InitData_t
default_llrbc
message_freed_fptr
uint8_t default_llrbc

Specifies the low-level retry block count which is pre-selected in an allocated Tx message object. Valid values: 0..100. Default value: 10.


UNICENS: Ucs_AmsTx_InitData_t::message_freed_fptr

  • Ucs_AmsTx_InitData_t
default_llrbc
message_freed_fptr
Ucs_AmsTx_MsgFreedCb_t message_freed_fptr

Callback function which is invoked by the UNICENS library to notify that memory of a Tx message object was freed after a previous allocation using Ucs_AmsTx_AllocMsg() has failed. The application might attempt to call Ucs_AmsTx_AllocMsg() again.


UNICENS: Ucs_AmsTx_Msg_t Struct Reference

Data Fields
Ucs_AmsTx_Msg_t Struct Reference
Referred Types

Application message Tx type. More...

Data Fields

uint16_t | destination_address
Destination address. Find some predefined addresses here.
uint16_t | msg_id
16bit message descriptor
uint8_t | llrbc
Specifies the "Low-Level Retry Block Count" (LLRBC)
uint8_t * | data_ptr
Payload data.
uint16_t | data_size
The size of payload data in bytes.
void * | custom_info_ptr
Customer specific reference.

Detailed Description

Application message Tx type.


UNICENS: Ucs_AmsTx_Msg_t::custom_info_ptr

  • Ucs_AmsTx_Msg_t
custom_info_ptr
data_ptr
data_size
destination_address
llrbc
msg_id
void* custom_info_ptr

Customer specific reference.

The application is allowed to use this attribute to assign an own reference to the message object. The reference is initialized by the UNICENS library with NULL and will not alter until the transmission has finished.


UNICENS: Ucs_AmsTx_Msg_t::data_ptr

  • Ucs_AmsTx_Msg_t
custom_info_ptr
data_ptr
data_size
destination_address
llrbc
msg_id
uint8_t* data_ptr

Payload data.


UNICENS: Ucs_AmsTx_Msg_t::data_size

  • Ucs_AmsTx_Msg_t
custom_info_ptr
data_ptr
data_size
destination_address
llrbc
msg_id
uint16_t data_size

The size of payload data in bytes.


UNICENS: Ucs_AmsTx_Msg_t::destination_address

  • Ucs_AmsTx_Msg_t
custom_info_ptr
data_ptr
data_size
destination_address
llrbc
msg_id
uint16_t destination_address

Destination address. Find some predefined addresses here.


UNICENS: Ucs_AmsTx_Msg_t::llrbc

  • Ucs_AmsTx_Msg_t
custom_info_ptr
data_ptr
data_size
destination_address
llrbc
msg_id
uint8_t llrbc

Specifies the "Low-Level Retry Block Count" (LLRBC)

Valid values: 0..100. Default value: configurable via default_llrbc of the initialization structure Ucs_AmsTx_InitData_t.


UNICENS: Ucs_AmsTx_Msg_t::msg_id

  • Ucs_AmsTx_Msg_t
custom_info_ptr
data_ptr
data_size
destination_address
llrbc
msg_id
uint16_t msg_id

16bit message descriptor


UNICENS: Ucs_AmsRx_Msg_t Struct Reference

Data Fields
Ucs_AmsRx_Msg_t Struct Reference
Referred Types

Application message Rx type. More...

Data Fields

uint16_t | source_address
Source address.
uint16_t | msg_id
16bit message descriptor
uint8_t * | data_ptr
Reference to payload.
uint16_t | data_size
Payload size in bytes.
void * | custom_info_ptr
Customer specific reference.
Ucs_AmsRx_ReceiveType_t receive_type
Defines which address type was used by the transmitter of this message.

Detailed Description

Application message Rx type.


UNICENS: Ucs_AmsRx_Msg_t::custom_info_ptr

  • Ucs_AmsRx_Msg_t
custom_info_ptr
data_ptr
data_size
msg_id
receive_type
source_address
void* custom_info_ptr

Customer specific reference.


UNICENS: Ucs_AmsRx_Msg_t::data_ptr

  • Ucs_AmsRx_Msg_t
custom_info_ptr
data_ptr
data_size
msg_id
receive_type
source_address
uint8_t* data_ptr

Reference to payload.


UNICENS: Ucs_AmsRx_Msg_t::data_size

  • Ucs_AmsRx_Msg_t
custom_info_ptr
data_ptr
data_size
msg_id
receive_type
source_address
uint16_t data_size

Payload size in bytes.


UNICENS: Ucs_AmsRx_Msg_t::msg_id

  • Ucs_AmsRx_Msg_t
custom_info_ptr
data_ptr
data_size
msg_id
receive_type
source_address
uint16_t msg_id

16bit message descriptor


UNICENS: Ucs_AmsRx_Msg_t::receive_type

  • Ucs_AmsRx_Msg_t
custom_info_ptr
data_ptr
data_size
msg_id
receive_type
source_address
Ucs_AmsRx_ReceiveType_t receive_type

Defines which address type was used by the transmitter of this message.


UNICENS: Ucs_AmsRx_Msg_t::source_address

  • Ucs_AmsRx_Msg_t
custom_info_ptr
data_ptr
data_size
msg_id
receive_type
source_address
uint16_t source_address

Source address.


UNICENS: Ucs_AmsTx_CompleteCb_t

  • Referred Types
Ucs_AmsRx_ReceiveType_t
Ucs_AmsTx_CompleteCb_t
Ucs_AmsTx_Info_t
Ucs_AmsTx_Result_t
typedef void(* Ucs_AmsTx_CompleteCb_t)(Ucs_AmsTx_Msg_t *msg_ptr, Ucs_AmsTx_Result_t result, Ucs_AmsTx_Info_t info, void *user_ptr)

Type of a callback function that is invoked as soon as a message transmission was finished.

The callback function notifies the result of a completed transmission. If the message has external payload, the application must decide whether to re-use or to free the external payload.

Parameters
msg_ptr | Reference to the related Tx message object. When the callback function returns the reference is no longer valid.
result | The transmission result.
info | Detailed INIC transmission result, which might be helpful for debug purposes.
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_AmsRx_ReceiveType_t

  • Referred Types
Ucs_AmsRx_ReceiveType_t
Ucs_AmsTx_CompleteCb_t
Ucs_AmsTx_Info_t
Ucs_AmsTx_Result_t
enum Ucs_AmsRx_ReceiveType_t

Defines which address type was used by the transmitter of a message.

Enumerator:
UCS_AMSRX_RCT_SINGLECAST

Message was transmitted as singlecast.

UCS_AMSRX_RCT_GROUPCAST

Message was transmitted as groupcast.

UCS_AMSRX_RCT_BROADCAST

Message was transmitted as broadcast.


UNICENS: Ucs_AmsTx_Info_t

  • Referred Types
Ucs_AmsRx_ReceiveType_t
Ucs_AmsTx_CompleteCb_t
Ucs_AmsTx_Info_t
Ucs_AmsTx_Result_t
enum Ucs_AmsTx_Info_t

Detailed INIC transmission information which might be useful for debugging purposes.

Enumerator:
UCS_AMSTX_I_SUCCESS

The transmission succeeded.

The corresponding transmission result is UCS_AMSTX_RES_SUCCESS.

UCS_AMSTX_I_ERR_CFG_NORECEIVER

The transmission failed because the MOST network is not accessible for MCM in the current attach state or for ICM in general.

The corresponding transmission result is UCS_AMSTX_RES_ERR_UNEXPECTED.

UCS_AMSTX_I_ERR_BF

The transmission failed because the receivers buffer is full.

The corresponding transmission result is UCS_AMSTX_RES_ERR_RETRIES_EXP.

UCS_AMSTX_I_ERR_CRC

The transmission failed because of a failed CRC.

The corresponding transmission result is UCS_AMSTX_RES_ERR_RETRIES_EXP.

UCS_AMSTX_I_ERR_ID

The transmission failed because of corrupted identifiers.

The corresponding transmission result is UCS_AMSTX_RES_ERR_RETRIES_EXP.

UCS_AMSTX_I_ERR_ACK

The transmission failed because of corrupted PACK or CACK.

The corresponding transmission result is UCS_AMSTX_RES_ERR_RETRIES_EXP.

UCS_AMSTX_I_ERR_TIMEOUT

The transmission failed because of a transmission timeout.

The corresponding transmission result is UCS_AMSTX_RES_ERR_RETRIES_EXP.

UCS_AMSTX_I_ERR_FATAL_WT

The transmission failed because of destination is not available.

The corresponding transmission result is UCS_AMSTX_RES_ERR_INVALID_TGT.

UCS_AMSTX_I_ERR_FATAL_OA

The transmission failed because of the destination is the own node address.

The corresponding transmission result is UCS_AMSTX_RES_ERR_INVALID_TGT.

UCS_AMSTX_I_ERR_UNAVAIL_TRANS

The transmission canceled during the transition from network interface state "available" to "not available".

The corresponding transmission result is UCS_AMSTX_RES_ERR_NOT_AVAILABLE.

UCS_AMSTX_I_ERR_UNAVAIL_OFF

The transmission failed because the network interface state is "not available".

The corresponding transmission result is UCS_AMSTX_RES_ERR_NOT_AVAILABLE.

UCS_AMSTX_I_ERR_UNKNOWN

The transmission failed because of an unknown INIC error code.

The corresponding transmission result is UCS_AMSTX_RES_ERR_UNEXPECTED. Please check if the MNS version is compatible with the applied INIC firmware version.

UCS_AMSTX_I_ERR_UNSYNCED

The transmission failed because the communication between the EHC and the INIC is lost.

The reason can be a communication error between the EHC and the INIC or that the application has called Ucs_Stop().
The corresponding transmission result is UCS_AMSTX_RES_ERR_NOT_AVAILABLE.


UNICENS: Ucs_AmsTx_Result_t

  • Referred Types
Ucs_AmsRx_ReceiveType_t
Ucs_AmsTx_CompleteCb_t
Ucs_AmsTx_Info_t
Ucs_AmsTx_Result_t
enum Ucs_AmsTx_Result_t

Transmission result of an application message.

Enumerator:
UCS_AMSTX_RES_SUCCESS

The transmission succeeded.

UCS_AMSTX_RES_ERR_RETRIES_EXP

The transmission including all retries have failed.

The following issues may have caused the failure:

  • message corruption
  • transmission timeouts
  • full receive buffers of the destination device
  • full receive buffers of the local device if the destination was the own address, own group or broadcast address
UCS_AMSTX_RES_ERR_INVALID_TGT

The transmission failed because the specified destination address is not found or not valid.

The following issues may have caused the failure:

  • device with the given destination address is not found
  • destination address is reserved (for future use)
  • destination address is 0xFFFF (un-initialized logical node address is not supported)
UCS_AMSTX_RES_ERR_NOT_AVAILABLE

The transmission failed since the network or the INIC is not available.

UCS_AMSTX_RES_ERR_BUF_INTERNAL

The transmission failed because the allocation of an Rx message object failed. The Rx message object is required to receive the message via the own Rx message queue.

This is possible in the following cases:

  • A message is transmitted to the own node address and the allocation of an Rx message object failed.
  • The network transmission to the own group address or broadcast address succeeded but the allocation of an Rx message object failed. The application has to decide whether to retransmit the message to the own address again.
UCS_AMSTX_RES_ERR_UNEXPECTED

The transmission failed due to an unexpected error. The cause of this failure may be an invalid INIC configuration, or an INIC to UNICENS incompatibility issue.


UNICENS: Ucs_Ams_InitData_t Struct Reference

Data Fields
Ucs_Ams_InitData_t Struct Reference
Application Message Service

The initialization data of the Application Message Service. More...

Data Fields

Ucs_AmsRx_InitData_t rx
Rx related initialization parameters.
Ucs_AmsTx_InitData_t tx
Tx related initialization parameters.
bool enabled
If set to false the AMS and CMD modules are not initialized and the related features are not available.

Detailed Description

The initialization data of the Application Message Service.


UNICENS: Ucs_Ams_InitData_t::enabled

  • Ucs_Ams_InitData_t
enabled
rx
tx
bool enabled

If set to false the AMS and CMD modules are not initialized and the related features are not available.


UNICENS: Ucs_Ams_InitData_t::rx

  • Ucs_Ams_InitData_t
enabled
rx
tx
Ucs_AmsRx_InitData_t rx

Rx related initialization parameters.


UNICENS: Ucs_Ams_InitData_t::tx

  • Ucs_Ams_InitData_t
enabled
rx
tx
Ucs_AmsTx_InitData_t tx

Tx related initialization parameters.


UNICENS: UCS_AMS_NUM_RX_MSGS

  • Application Message Service
UCS_AMS_NUM_RX_MSGS
UCS_AMS_NUM_TX_MSGS
UCS_AMS_SIZE_RX_MSG
UCS_AMS_SIZE_TX_MSG
Ucs_AmsRx_GetMsgCnt
Ucs_AmsRx_MsgReceivedCb_t
Ucs_AmsRx_PeekMsg
Ucs_AmsRx_ReleaseMsg
Ucs_AmsTx_AllocMsg
Ucs_AmsTx_FreeUnusedMsg
Ucs_AmsTx_MsgFreedCb_t
Ucs_AmsTx_SendMsg
#define UCS_AMS_NUM_RX_MSGS 20

Defines the number of reserved Rx message objects. Valid values: 5..255. Default value: 20.


UNICENS: UCS_AMS_NUM_TX_MSGS

  • Application Message Service
UCS_AMS_NUM_RX_MSGS
UCS_AMS_NUM_TX_MSGS
UCS_AMS_SIZE_RX_MSG
UCS_AMS_SIZE_TX_MSG
Ucs_AmsRx_GetMsgCnt
Ucs_AmsRx_MsgReceivedCb_t
Ucs_AmsRx_PeekMsg
Ucs_AmsRx_ReleaseMsg
Ucs_AmsTx_AllocMsg
Ucs_AmsTx_FreeUnusedMsg
Ucs_AmsTx_MsgFreedCb_t
Ucs_AmsTx_SendMsg
#define UCS_AMS_NUM_TX_MSGS 20

Defines the number of reserved Tx message objects. Valid values: 5..255. Default value: 20.


UNICENS: UCS_AMS_SIZE_RX_MSG

  • Application Message Service
UCS_AMS_NUM_RX_MSGS
UCS_AMS_NUM_TX_MSGS
UCS_AMS_SIZE_RX_MSG
UCS_AMS_SIZE_TX_MSG
Ucs_AmsRx_GetMsgCnt
Ucs_AmsRx_MsgReceivedCb_t
Ucs_AmsRx_PeekMsg
Ucs_AmsRx_ReleaseMsg
Ucs_AmsTx_AllocMsg
Ucs_AmsTx_FreeUnusedMsg
Ucs_AmsTx_MsgFreedCb_t
Ucs_AmsTx_SendMsg
#define UCS_AMS_SIZE_RX_MSG 45

Defines the payload size in bytes which is available for every Rx message object. Valid values: 45..65535. Default value: 45.


UNICENS: UCS_AMS_SIZE_TX_MSG

  • Application Message Service
UCS_AMS_NUM_RX_MSGS
UCS_AMS_NUM_TX_MSGS
UCS_AMS_SIZE_RX_MSG
UCS_AMS_SIZE_TX_MSG
Ucs_AmsRx_GetMsgCnt
Ucs_AmsRx_MsgReceivedCb_t
Ucs_AmsRx_PeekMsg
Ucs_AmsRx_ReleaseMsg
Ucs_AmsTx_AllocMsg
Ucs_AmsTx_FreeUnusedMsg
Ucs_AmsTx_MsgFreedCb_t
Ucs_AmsTx_SendMsg
#define UCS_AMS_SIZE_TX_MSG 45

Defines the payload size in bytes which is available for every Tx message object. Valid values: 45..65535. Default value: 45.


UNICENS: Ucs_AmsRx_MsgReceivedCb_t

  • Application Message Service
UCS_AMS_NUM_RX_MSGS
UCS_AMS_NUM_TX_MSGS
UCS_AMS_SIZE_RX_MSG
UCS_AMS_SIZE_TX_MSG
Ucs_AmsRx_GetMsgCnt
Ucs_AmsRx_MsgReceivedCb_t
Ucs_AmsRx_PeekMsg
Ucs_AmsRx_ReleaseMsg
Ucs_AmsTx_AllocMsg
Ucs_AmsTx_FreeUnusedMsg
Ucs_AmsTx_MsgFreedCb_t
Ucs_AmsTx_SendMsg
typedef void(* Ucs_AmsRx_MsgReceivedCb_t)(void *user_ptr)

Callback function type that is invoked if UNICENS has received a message completely and appended to the Rx message queue.

Parameters
user_ptr User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_AmsTx_MsgFreedCb_t

  • Application Message Service
UCS_AMS_NUM_RX_MSGS
UCS_AMS_NUM_TX_MSGS
UCS_AMS_SIZE_RX_MSG
UCS_AMS_SIZE_TX_MSG
Ucs_AmsRx_GetMsgCnt
Ucs_AmsRx_MsgReceivedCb_t
Ucs_AmsRx_PeekMsg
Ucs_AmsRx_ReleaseMsg
Ucs_AmsTx_AllocMsg
Ucs_AmsTx_FreeUnusedMsg
Ucs_AmsTx_MsgFreedCb_t
Ucs_AmsTx_SendMsg
typedef void(* Ucs_AmsTx_MsgFreedCb_t)(void *user_ptr)

Type of a callback function that is invoked to notify that a Tx application message object is available again while a previous allocation using Ucs_AmsTx_AllocMsg() has failed.

Parameters
user_ptr User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_AmsRx_GetMsgCnt

  • Application Message Service
UCS_AMS_NUM_RX_MSGS
UCS_AMS_NUM_TX_MSGS
UCS_AMS_SIZE_RX_MSG
UCS_AMS_SIZE_TX_MSG
Ucs_AmsRx_GetMsgCnt
Ucs_AmsRx_MsgReceivedCb_t
Ucs_AmsRx_PeekMsg
Ucs_AmsRx_ReleaseMsg
Ucs_AmsTx_AllocMsg
Ucs_AmsTx_FreeUnusedMsg
Ucs_AmsTx_MsgFreedCb_t
Ucs_AmsTx_SendMsg
uint16_t Ucs_AmsRx_GetMsgCnt ( Ucs_Inst_t * self )

Retrieves the number of messages that are located in the Rx queue.

Parameters
self The instance
Returns
The number of messages in the Rx queue


UNICENS: Ucs_AmsRx_PeekMsg

  • Application Message Service
UCS_AMS_NUM_RX_MSGS
UCS_AMS_NUM_TX_MSGS
UCS_AMS_SIZE_RX_MSG
UCS_AMS_SIZE_TX_MSG
Ucs_AmsRx_GetMsgCnt
Ucs_AmsRx_MsgReceivedCb_t
Ucs_AmsRx_PeekMsg
Ucs_AmsRx_ReleaseMsg
Ucs_AmsTx_AllocMsg
Ucs_AmsTx_FreeUnusedMsg
Ucs_AmsTx_MsgFreedCb_t
Ucs_AmsTx_SendMsg
Ucs_AmsRx_Msg_t* Ucs_AmsRx_PeekMsg ( Ucs_Inst_t * self )

Retrieves a reference to the front-most message in the Rx queue.

The Application Message Service already provides a queue of completed Rx messages. Ucs_AmsRx_PeekMsg() always returns a reference to the front-most message in the Rx queue. The function call does not dequeue the message handle. Thus, multiple subsequent calls of Ucs_AmsRx_PeekMsg() will always return the same reference. After processing the front-most message, the application must call Ucs_AmsRx_ReleaseMsg().
Typically, an application will process the front-most Rx message and call Ucs_AmsRx_ReleaseMsg(), which dequeues and frees the Rx message. Hence, the application must not access this this reference anymore. The next call of Ucs_AmsRx_PeekMsg() returns a reference of the following Rx message, or NULL if no further message is available.
However, it is possible that an application cannot process an Rx message. In that case that application must not call Ucs_AmsRx_ReleaseMsg() so that the next call of Ucs_AmsRx_PeekMsg() returns again the reference to the un-processed message.

Parameters
self The instance
Returns
Reference to the front-most message in the Rx queue or NULL if the Rx queue is empty.
Warning
It is important that the application takes care about the life time of the Rx message object. The returned reference is valid if the application performs the peek, processing and release operation in one go. A reference returned by Ucs_AmsRx_PeekMsg() might become invalid during a call of Ucs_Service(). The reason is that the UNICENS library might process an event which will flush the AMS Rx queue.


UNICENS: Ucs_AmsRx_ReleaseMsg

  • Application Message Service
UCS_AMS_NUM_RX_MSGS
UCS_AMS_NUM_TX_MSGS
UCS_AMS_SIZE_RX_MSG
UCS_AMS_SIZE_TX_MSG
Ucs_AmsRx_GetMsgCnt
Ucs_AmsRx_MsgReceivedCb_t
Ucs_AmsRx_PeekMsg
Ucs_AmsRx_ReleaseMsg
Ucs_AmsTx_AllocMsg
Ucs_AmsTx_FreeUnusedMsg
Ucs_AmsTx_MsgFreedCb_t
Ucs_AmsTx_SendMsg
void Ucs_AmsRx_ReleaseMsg ( Ucs_Inst_t * self )

Removes and frees the front-most message from the Rx queue.

The application must not access the removed message any longer.

Parameters
self The instance


UNICENS: Ucs_AmsTx_AllocMsg

  • Application Message Service
UCS_AMS_NUM_RX_MSGS
UCS_AMS_NUM_TX_MSGS
UCS_AMS_SIZE_RX_MSG
UCS_AMS_SIZE_TX_MSG
Ucs_AmsRx_GetMsgCnt
Ucs_AmsRx_MsgReceivedCb_t
Ucs_AmsRx_PeekMsg
Ucs_AmsRx_ReleaseMsg
Ucs_AmsTx_AllocMsg
Ucs_AmsTx_FreeUnusedMsg
Ucs_AmsTx_MsgFreedCb_t
Ucs_AmsTx_SendMsg
Ucs_AmsTx_Msg_t* Ucs_AmsTx_AllocMsg | ( | Ucs_Inst_t * | self,
 |  | uint16_t | data_size
 | ) |  |

Allocates an application message object for transmission.

This function retrieves a Tx message object with a payload buffer of the given size. The application must take care that Ucs_AmsTx_Msg_t::data_size of the resulting message object does not exceed the amount of provided payload.
The application is also allowed to provide own payload to the message object. In this case the application is allowed to call this function and pass data_size "0". The application can set Ucs_AmsTx_Msg_t::data_ptr and Ucs_AmsTx_Msg_t::data_size of the returned message object to the application provided payload.

Parameters
self | The instance
data_size | Required payload size which needs to be allocated. Valid values: 0..65535.
Returns
The allocated Tx message object or NULL if no Tx message object is available. If the function returns NULL the application can use ams.tx.message_freed_fptr as trigger to request a message object again.
Note
The application may also allocate a certain number of message objects without transmitting in one go. In this case the message object is handed over to the application which is now responsible to transmit or free the object. When UNICENS terminates it is possible that user allocated memory is still dedicated to such a message buffer. In this case the application must do the following steps for every retained Tx message object:
  • Free application provided payload
  • Call Ucs_AmsTx_FreeUnusedMsg() to release the message to UNICENS
  • Guarantee to access the Tx message object never again
After performing these steps the application is allowed to call Ucs_Init() again.


UNICENS: Ucs_AmsTx_FreeUnusedMsg

  • Application Message Service
UCS_AMS_NUM_RX_MSGS
UCS_AMS_NUM_TX_MSGS
UCS_AMS_SIZE_RX_MSG
UCS_AMS_SIZE_TX_MSG
Ucs_AmsRx_GetMsgCnt
Ucs_AmsRx_MsgReceivedCb_t
Ucs_AmsRx_PeekMsg
Ucs_AmsRx_ReleaseMsg
Ucs_AmsTx_AllocMsg
Ucs_AmsTx_FreeUnusedMsg
Ucs_AmsTx_MsgFreedCb_t
Ucs_AmsTx_SendMsg
void Ucs_AmsTx_FreeUnusedMsg | ( | Ucs_Inst_t * | self,
 |  | Ucs_AmsTx_Msg_t * | msg_ptr
 | ) |  |

Frees an unused Tx message object.

Parameters
self | The instance
msg_ptr | Reference to the Tx message object

It is important that the application is responsible to free external payload, which is associated with the message object.


UNICENS: Ucs_AmsTx_SendMsg

  • Application Message Service
UCS_AMS_NUM_RX_MSGS
UCS_AMS_NUM_TX_MSGS
UCS_AMS_SIZE_RX_MSG
UCS_AMS_SIZE_TX_MSG
Ucs_AmsRx_GetMsgCnt
Ucs_AmsRx_MsgReceivedCb_t
Ucs_AmsRx_PeekMsg
Ucs_AmsRx_ReleaseMsg
Ucs_AmsTx_AllocMsg
Ucs_AmsTx_FreeUnusedMsg
Ucs_AmsTx_MsgFreedCb_t
Ucs_AmsTx_SendMsg
Ucs_Return_t Ucs_AmsTx_SendMsg | ( | Ucs_Inst_t * | self,
 |  | Ucs_AmsTx_Msg_t * | msg_ptr,
 |  | Ucs_AmsTx_CompleteCb_t | tx_complete_fptr
 | ) |  |

Transmits an application message.

Parameters
self | The instance
msg_ptr | Reference to the related Tx message object
tx_complete_fptr | Callback function that is invoked as soon as the transmission was finished and the transmission result is available. The application must assign a callback function if the transmission result is required or the Tx message object uses external payload which needs to be reused or freed by the application. Otherwise the application is allowed to pass NULL.
Note
It is important that msg_ptr is the reference to an object which was previously obtained from Ucs_AmsTx_AllocMsg(). The application must not pass the reference of a self-created Tx message object to this function.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM Invalid parameter is given. Possible reasons are:
  • msg_ptr is NULL
  • destination_address is smaller than 0x10 (reserved for internal communication)
  • data_size of a broad or group-cast message is larger than 45
Either the application must modify the message and retry the function call, or must free the message object via Ucs_AmsTx_FreeUnusedMsg().
UCS_RET_ERR_NOT_INITIALIZED UNICENS is not initialized.
Message objects that have been allocated during initialized state are no longer valid.


UNICENS: Command Interpreter

Topics | Functions
Command Interpreter

Decodes received MOST messages. More...

Topics

Referred Types
Referred types used by the Command Interpreter.

Functions

Ucs_Cmd_Return_t | Ucs_Cmd_AddMsgIdTable (Ucs_Inst_t *self, Ucs_Cmd_MsgId_t *msg_id_tab_ptr)
Add a MessageId Table to the Command Interpreter.
Ucs_Cmd_Return_t | Ucs_Cmd_RemoveMsgIdTable (Ucs_Inst_t *self)
Remove a MessageId Table from the Command Interpreter.
Ucs_Cmd_Return_t | Ucs_Cmd_DecodeMsg (Ucs_Inst_t *self, Ucs_AmsRx_Msg_t *msg_rx_ptr)
Decode an MCM message.

Detailed Description

Decodes received MOST messages.


UNICENS: Referred Types

Data Structures | Macros | Callback Functions | Enumerations
Referred Types
Command Interpreter

Referred types used by the Command Interpreter. More...

Data Structures

struct Ucs_Cmd_MsgId_t
Structure of a single element of the MessageId Table. More...

Macros

#define UCS_CMD_MSGID_TERMINATION 0xFFFFU
Denotes the end of an MessageId Table.

Callback Functions

typedef Ucs_Cmd_Return_t(* Ucs_Cmd_Handler_Function_t )(Ucs_AmsRx_Msg_t *msg_rx_ptr, void *user_ptr)
Type definition of user handler functions.

Enumerations

enum Ucs_Cmd_Return_t {
UCS_CMD_RET_SUCCESS = 0x00,
UCS_CMD_RET_ERR_MSGID_NOTAVAIL = 0x01,
UCS_CMD_RET_ERR_TX_BUSY = 0x02,
UCS_CMD_RET_ERR_APPL = 0x03,
UCS_CMD_RET_ERR_ALREADY_ENTERED = 0x04,
UCS_CMD_RET_ERR_NULL_PTR = 0x05
}
Result codes used for Command Interpreter API functions. More...

Detailed Description

Referred types used by the Command Interpreter.


UNICENS: Ucs_Cmd_MsgId_t Struct Reference

Data Fields
Ucs_Cmd_MsgId_t Struct Reference
Referred Types

Structure of a single element of the MessageId Table. More...

Data Fields

uint16_t msg_id
MessageId.
Ucs_Cmd_Handler_Function_t handler_function_ptr
Pointer to the belonging handler function.

Detailed Description

Structure of a single element of the MessageId Table.

The application provides a MessageId Table which contains all supported MessageIds with their belonging handler functions. The MessageId Table is an array of several Ucs_Cmd_MsgId_t elements. It has to end with a termination entry with the value {UCS_CMD_MSGID_TERMINATION, NULL}.


UNICENS: Ucs_Cmd_MsgId_t::handler_function_ptr

  • Ucs_Cmd_MsgId_t
handler_function_ptr
msg_id
Ucs_Cmd_Handler_Function_t handler_function_ptr

Pointer to the belonging handler function.


UNICENS: Ucs_Cmd_MsgId_t::msg_id

  • Ucs_Cmd_MsgId_t
handler_function_ptr
msg_id
uint16_t msg_id

MessageId.


UNICENS: UCS_CMD_MSGID_TERMINATION

  • Referred Types
Ucs_Cmd_Handler_Function_t
UCS_CMD_MSGID_TERMINATION
Ucs_Cmd_Return_t
#define UCS_CMD_MSGID_TERMINATION 0xFFFFU

Denotes the end of an MessageId Table.


UNICENS: Ucs_Cmd_Handler_Function_t

  • Referred Types
Ucs_Cmd_Handler_Function_t
UCS_CMD_MSGID_TERMINATION
Ucs_Cmd_Return_t
typedef Ucs_Cmd_Return_t(* Ucs_Cmd_Handler_Function_t)(Ucs_AmsRx_Msg_t *msg_rx_ptr, void *user_ptr)

Type definition of user handler functions.

Parameters
msg_rx_ptr | Reference to the received message
user_ptr | User reference provided in Ucs_InitData_t::user_ptr
Returns
Possible return values are shown in the table below.
Value | Description
UCS_CMD_RET_SUCCESS | The handler function succeeded.
UCS_CMD_RET_ERR_TX_BUSY | The handler function could not send an answer because no free Tx Buffer was available.
UCS_CMD_RET_ERR_APPL | An error happened in handler function.
Note
The application must not return other values than the ones listed above.


UNICENS: Ucs_Cmd_Return_t

  • Referred Types
Ucs_Cmd_Handler_Function_t
UCS_CMD_MSGID_TERMINATION
Ucs_Cmd_Return_t
enum Ucs_Cmd_Return_t

Result codes used for Command Interpreter API functions.

Enumerator:
UCS_CMD_RET_SUCCESS

Operation successfully completed

UCS_CMD_RET_ERR_MSGID_NOTAVAIL

MessageId not found

UCS_CMD_RET_ERR_TX_BUSY

No free Tx buffer available

UCS_CMD_RET_ERR_APPL

Application handler function reports custom error

UCS_CMD_RET_ERR_ALREADY_ENTERED

MessageId Table already connected

UCS_CMD_RET_ERR_NULL_PTR

NULL pointer used as argument


UNICENS: Ucs_Cmd_AddMsgIdTable

  • Command Interpreter
Ucs_Cmd_AddMsgIdTable
Ucs_Cmd_DecodeMsg
Ucs_Cmd_RemoveMsgIdTable
Ucs_Cmd_Return_t Ucs_Cmd_AddMsgIdTable | ( | Ucs_Inst_t * | self,
 |  | Ucs_Cmd_MsgId_t * | msg_id_tab_ptr
 | ) |  |

Add a MessageId Table to the Command Interpreter.

Parameters
self | The Ucs instance
msg_id_tab_ptr | Reference to MessageId Table
Returns
Possible return values are shown in the table below.
Value | Description
UCS_CMD_RET_SUCCESS | MessageId Table was successfully added
UCS_CMD_RET_ERR_ALREADY_ENTERED | MessageId Table already added
UCS_CMD_RET_ERR_NULL_PTR | NULL pointer used as argument for MessageId Table reference


UNICENS: Ucs_Cmd_DecodeMsg

  • Command Interpreter
Ucs_Cmd_AddMsgIdTable
Ucs_Cmd_DecodeMsg
Ucs_Cmd_RemoveMsgIdTable
Ucs_Cmd_Return_t Ucs_Cmd_DecodeMsg | ( | Ucs_Inst_t * | self,
 |  | Ucs_AmsRx_Msg_t * | msg_rx_ptr
 | ) |  |

Decode an MCM message.

Function expects that the MessageId Table ends with a termination entry (handler_function_ptr == NULL). If this entry is not present, the search may end in an endless loop.

Parameters
self | Pointer to the Ucs instance
msg_rx_ptr | Reference to the message to decode
Returns
Possible return values are shown in the table below.
Value | Description
UCS_CMD_RET_SUCCESS | Decoding was successful
UCS_CMD_RET_ERR_MSGID_NOTAVAIL | MessageId not found
UCS_CMD_RET_ERR_TX_BUSY | No Tx Buffer available
UCS_CMD_RET_ERR_APPL | Error happened in handler function
UCS_CMD_RET_ERR_NULL_PTR | NULL pointer used as argument for message reference or MessageId Table not available.


UNICENS: Ucs_Cmd_RemoveMsgIdTable

  • Command Interpreter
Ucs_Cmd_AddMsgIdTable
Ucs_Cmd_DecodeMsg
Ucs_Cmd_RemoveMsgIdTable
Ucs_Cmd_Return_t Ucs_Cmd_RemoveMsgIdTable ( Ucs_Inst_t * self )

Remove a MessageId Table from the Command Interpreter.

Parameters
self pointer to the Ucs instance
Returns
Possible return values are shown in the table below.
Value | Description
UCS_CMD_RET_SUCCESS | MessageId Table was successfully removed


UNICENS: Manager

Data Structures | Callback Functions | Enumerations
Manager

The Manager is responsible to force the network to available and handle NodeDiscovery and RoutingManagement by a default logic. More...

Data Structures

struct Ucs_Mgr_InitData_t
The initialization data of the Manager. More...

Callback Functions

typedef void(* Ucs_MgrReportCb_t )(Ucs_MgrReport_t code, uint16_t node_address, Ucs_Rm_Node_t *node_ptr, void *user_ptr)
Optional callback function that reports events on ignored, welcomed and lost nodes.

Enumerations

enum Ucs_MgrReport_t {
UCS_MGR_REP_IGNORED_UNKNOWN = 0,
UCS_MGR_REP_IGNORED_DUPLICATE = 1,
UCS_MGR_REP_AVAILABLE = 2,
UCS_MGR_REP_NOT_AVAILABLE = 3
}
Manager report codes. More...

Detailed Description

The Manager is responsible to force the network to available and handle NodeDiscovery and RoutingManagement by a default logic.


UNICENS: Ucs_Mgr_InitData_t Struct Reference

Data Fields
Ucs_Mgr_InitData_t Struct Reference
Manager

The initialization data of the Manager. More...

Data Fields

bool | enabled
If set to false the application must handle network startup, node discovery and rooting by hand.
uint16_t | packet_bw
The desired packet bandwidth.
Ucs_Rm_Route_t * routes_list_ptr
Reference to a list of routes.
uint16_t | routes_list_size
Number of routes in the list.
Ucs_Rm_Node_t * nodes_list_ptr
Reference to the list of nodes.
uint16_t | nodes_list_size
Number of nodes in the list.
Ucs_MgrReportCb_t report_fptr
Optional callback function notifying node events.

Detailed Description

The initialization data of the Manager.


UNICENS: Ucs_Mgr_InitData_t::enabled

  • Ucs_Mgr_InitData_t
enabled
nodes_list_ptr
nodes_list_size
packet_bw
report_fptr
routes_list_ptr
routes_list_size
bool enabled

If set to false the application must handle network startup, node discovery and rooting by hand.


UNICENS: Ucs_Mgr_InitData_t::nodes_list_ptr

  • Ucs_Mgr_InitData_t
enabled
nodes_list_ptr
nodes_list_size
packet_bw
report_fptr
routes_list_ptr
routes_list_size
Ucs_Rm_Node_t* nodes_list_ptr

Reference to the list of nodes.


UNICENS: Ucs_Mgr_InitData_t::nodes_list_size

  • Ucs_Mgr_InitData_t
enabled
nodes_list_ptr
nodes_list_size
packet_bw
report_fptr
routes_list_ptr
routes_list_size
uint16_t nodes_list_size

Number of nodes in the list.


UNICENS: Ucs_Mgr_InitData_t::packet_bw

  • Ucs_Mgr_InitData_t
enabled
nodes_list_ptr
nodes_list_size
packet_bw
report_fptr
routes_list_ptr
routes_list_size
uint16_t packet_bw

The desired packet bandwidth.

PacketBW


UNICENS: Ucs_Mgr_InitData_t::report_fptr

  • Ucs_Mgr_InitData_t
enabled
nodes_list_ptr
nodes_list_size
packet_bw
report_fptr
routes_list_ptr
routes_list_size
Ucs_MgrReportCb_t report_fptr

Optional callback function notifying node events.


UNICENS: Ucs_Mgr_InitData_t::routes_list_ptr

  • Ucs_Mgr_InitData_t
enabled
nodes_list_ptr
nodes_list_size
packet_bw
report_fptr
routes_list_ptr
routes_list_size
Ucs_Rm_Route_t* routes_list_ptr

Reference to a list of routes.


UNICENS: Ucs_Mgr_InitData_t::routes_list_size

  • Ucs_Mgr_InitData_t
enabled
nodes_list_ptr
nodes_list_size
packet_bw
report_fptr
routes_list_ptr
routes_list_size
uint16_t routes_list_size

Number of routes in the list.


UNICENS: Ucs_MgrReportCb_t

  • Manager
Ucs_MgrReport_t
Ucs_MgrReportCb_t
typedef void(* Ucs_MgrReportCb_t)(Ucs_MgrReport_t code, uint16_t node_address, Ucs_Rm_Node_t *node_ptr, void *user_ptr)

Optional callback function that reports events on ignored, welcomed and lost nodes.

Parameters
code | Report code
node_address | The desired node_address of the node which is defined in it's signature.
node_ptr | Reference to the node object which is part of the nodes_list_ptr. The reference is NULL if code is UCS_MGR_REP_IGNORED_UNKNOWN or UCS_MGR_REP_IGNORED_DUPLICATE.
user_ptr | User reference provided in Ucs_InitData_t::user_ptr.


UNICENS: Ucs_MgrReport_t

  • Manager
Ucs_MgrReport_t
Ucs_MgrReportCb_t
enum Ucs_MgrReport_t

Manager report codes.

Enumerator:
UCS_MGR_REP_IGNORED_UNKNOWN

A discovered node is ignored due to a wrong signature, a missing entry in the nodes_list_ptr, or since the desired node address is not within the following range: 0x200..0x2FF, 0x500..0xEFF.

UCS_MGR_REP_IGNORED_DUPLICATE

A discovered node is ignored due since it is a duplicate of an alredy welcomed node.

UCS_MGR_REP_AVAILABLE

A discovered node was successfully "welcomed" in the network.

UCS_MGR_REP_NOT_AVAILABLE

A previously welcomed node became invalid and is no longer accessible in the network.


UNICENS: Node Discovery

Topics | Callback Functions | Functions
Node Discovery

Node Discovery Service. More...

Topics

Referred Types
Referred Types used by Node Discovery Service.

Callback Functions

typedef Ucs_Nd_CheckResult_t(* | Ucs_Nd_EvalCb_t )(Ucs_Signature_t *signature, void *user_ptr)
Function signature of node evaluation callback used by Node Discovery service.
typedef void(* | Ucs_Nd_ReportCb_t )(Ucs_Nd_ResCode_t code, Ucs_Signature_t *signature, void *user_ptr)
Function signature of result callback used by Node Discovery service.

Functions

Ucs_Return_t | Ucs_Nd_Start (Ucs_Inst_t *self)
Starts the Node Discovery service.
Ucs_Return_t | Ucs_Nd_Stop (Ucs_Inst_t *self)
Stops the Node Discovery service.
Ucs_Return_t | Ucs_Nd_InitAll (Ucs_Inst_t *self)
Initializes all nodes.

Detailed Description

Node Discovery Service.


UNICENS: Referred Types

Enumerations
Referred Types
Node Discovery

Referred Types used by Node Discovery Service. More...

Enumerations

enum Ucs_Nd_ResCode_t {
UCS_ND_RES_WELCOME_SUCCESS = 0x01U,
UCS_ND_RES_UNKNOWN = 0x02U,
UCS_ND_RES_MULTI = 0x03U,
UCS_ND_RES_STOPPED = 0x04U,
UCS_ND_RES_NETOFF = 0x05U,
UCS_ND_RES_ERROR = 0x06U
}
Result values of the Node Discovery service. More...
enum Ucs_Nd_CheckResult_t {
UCS_ND_CHK_WELCOME = 0x01U,
UCS_ND_CHK_UNIQUE = 0x02U,
UCS_ND_CHK_UNKNOWN = 0x03U
}
Result values of the application's evaluation function (type Ucs_Nd_EvalCb_t). More...

Detailed Description

Referred Types used by Node Discovery Service.


UNICENS: Ucs_Nd_CheckResult_t

  • Referred Types
Ucs_Nd_CheckResult_t
Ucs_Nd_ResCode_t
enum Ucs_Nd_CheckResult_t

Result values of the application's evaluation function (type Ucs_Nd_EvalCb_t).

Enumerator:
UCS_ND_CHK_WELCOME

Node is ok, try to add it to the network.

UCS_ND_CHK_UNIQUE

Test if this node is unique.

UCS_ND_CHK_UNKNOWN

The node is unknown, no further action.


UNICENS: Ucs_Nd_ResCode_t

  • Referred Types
Ucs_Nd_CheckResult_t
Ucs_Nd_ResCode_t
enum Ucs_Nd_ResCode_t

Result values of the Node Discovery service.

Enumerator:
UCS_ND_RES_WELCOME_SUCCESS

Node was successfully added to the network.

UCS_ND_RES_UNKNOWN

Node signature is unknown to the application, node will be ignored.

UCS_ND_RES_MULTI

A node with the same signature is already part of the system. The new node will be ignored.

UCS_ND_RES_STOPPED

The Node Discovery service was stopped by API function Ucs_Nd_Stop(). Ucs_Nd_Start() has to be called to start again.

UCS_ND_RES_NETOFF

The Node Discovery service detected a NetOff event and pauses . It resumes automatically as soon as NetOn occurs.

UCS_ND_RES_ERROR

An unexpected error occurred. Node Discovery service was stopped. Ucs_Nd_Start() has to be called to start again.


UNICENS: Ucs_Nd_EvalCb_t

  • Node Discovery
Ucs_Nd_EvalCb_t
Ucs_Nd_InitAll
Ucs_Nd_ReportCb_t
Ucs_Nd_Start
Ucs_Nd_Stop
typedef Ucs_Nd_CheckResult_t(* Ucs_Nd_EvalCb_t)(Ucs_Signature_t *signature, void *user_ptr)

Function signature of node evaluation callback used by Node Discovery service.

The Node Discovery service announces the signature of each node it has found to the application via the evaluation function. In this function the application decides how the Node Discovery service shall proceed with the node. The application maintains two lists:

set_list

Contains the signatures of the nodes the system shall contain

device_list
Contains the signatures of the nodes detected in the system

The evaluation has to follow these rules:

  • If the node is not part of the set_list, it is regarded as unknown (UCS_ND_CHK_UNKNOWN) and will be ignored.
  • If the node is part of the set_list and is not yet in the device_list, the Node Discovery Service shall try to add the node to network (UCS_ND_CHK_WELCOME).
  • If the node is already part of the device_list, there are two possibilities: the node in the device_list experienced a reset or there are two nodes with the same signature. Evaluation result is UCS_ND_CHK_UNIQUE. The Node Discovery service will perform further tests.
Parameters
signature | Signature of the respective node
user_ptr | User reference provided in Ucs_InitData_t::user_ptr
Returns
UCS_ND_CHK_WELCOME Node is ok, try to add it to the network.
UCS_ND_CHK_UNIQUE Test if this node is unique.
UCS_ND_CHK_UNKNOWN Node is unknown, no further action.


UNICENS: Ucs_Nd_ReportCb_t

  • Node Discovery
Ucs_Nd_EvalCb_t
Ucs_Nd_InitAll
Ucs_Nd_ReportCb_t
Ucs_Nd_Start
Ucs_Nd_Stop
typedef void(* Ucs_Nd_ReportCb_t)(Ucs_Nd_ResCode_t code, Ucs_Signature_t *signature, void *user_ptr)

Function signature of result callback used by Node Discovery service.

The Node Discovery service reports the result of each node and some system events by this callback function.

Note
The parameter signature will be NULL, if parameter code is UCS_ND_RES_STOPPED, UCS_ND_RES_NETOFF or UCS_ND_RES_ERROR.
Parameters
code | Result code
signature | Signature of the respective node
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Nd_InitAll

  • Node Discovery
Ucs_Nd_EvalCb_t
Ucs_Nd_InitAll
Ucs_Nd_ReportCb_t
Ucs_Nd_Start
Ucs_Nd_Stop
Ucs_Return_t Ucs_Nd_InitAll ( Ucs_Inst_t * self )

Initializes all nodes.

Note
Must not be used when Node Discovery service is started.
Parameters
self The instance
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized


UNICENS: Ucs_Nd_Start

  • Node Discovery
Ucs_Nd_EvalCb_t
Ucs_Nd_InitAll
Ucs_Nd_ReportCb_t
Ucs_Nd_Start
Ucs_Nd_Stop
Ucs_Return_t Ucs_Nd_Start ( Ucs_Inst_t * self )

Starts the Node Discovery service.

Parameters
self The instance
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_API_LOCKED | Node Discovery was already started


UNICENS: Ucs_Nd_Stop

  • Node Discovery
Ucs_Nd_EvalCb_t
Ucs_Nd_InitAll
Ucs_Nd_ReportCb_t
Ucs_Nd_Start
Ucs_Nd_Stop
Ucs_Return_t Ucs_Nd_Stop ( Ucs_Inst_t * self )

Stops the Node Discovery service.

Parameters
self The instance
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_NOT_AVAILABLE | Node Discovery not running


UNICENS: Programming

Topics | Callback Functions | Functions
Programming

Programming Service. More...

Topics

Referred Types
Referred Types used by Programming Service.

Callback Functions

typedef void(* Ucs_Prg_ReportCb_t )(Ucs_Prg_ResCode_t code, Ucs_Prg_Func_t function, uint8_t ret_len, uint8_t parm[], void *user_ptr)
Function signature of result callback used by Programming service.

Functions

Ucs_Return_t Ucs_Prog_Start (Ucs_Inst_t *self, uint16_t node_id, Ucs_Signature_t *signature, Ucs_Prg_SessionType_t session_type, Ucs_Prg_Command_t *command_list, Ucs_Prg_ReportCb_t result_fptr)

Detailed Description

Programming Service.


UNICENS: Referred Types

Data Structures | Enumerations
Referred Types
Programming

Referred Types used by Programming Service. More...

Data Structures

struct Ucs_Prg_Command_t
Represents a programming task. More...

Enumerations

enum Ucs_Prg_SessionType_t {
UCS_PRG_ST_CS = 0x01U,
UCS_PRG_ST_IS = 0x02U,
UCS_PRG_ST_CS_IS = 0x04U,
UCS_PRG_ST_ERASE_EM = 0x08U,
UCS_PRG_ST_CFG_READ = 0x10U
}
Defines the set of MemIDs and the memory access types. More...
enum Ucs_Prg_MemId_t {
UCS_PRG_MID_CS = 0x00U,
UCS_PRG_MID_IS = 0x01U,
UCS_PRG_MID_CSTEST = 0x0CU,
UCS_PRG_MID_ISTEST = 0x0DU
}
Represents the memory resource to be written. More...
enum Ucs_Prg_ResCode_t {
UCS_PRG_RES_SUCCESS = 0x01U,
UCS_PRG_RES_TIMEOUT = 0x02U,
UCS_PRG_RES_NET_OFF = 0x03U,
UCS_PRG_RES_FKT_SYNCH = 0x04U,
UCS_PRG_RES_FKT_ASYNCH = 0x05U,
UCS_PRG_RES_ERROR = 0x06U
}
Result values of the Programming service. More...
enum Ucs_Prg_Func_t {
UCS_PRG_FKT_DUMMY = 0x00U,
UCS_PRG_FKT_WELCOME = 0x01U,
UCS_PRG_FKT_WELCOME_NOSUCCESS = 0x02U,
UCS_PRG_FKT_MEM_OPEN = 0x03U,
UCS_PRG_FKT_MEM_WRITE = 0x04U,
UCS_PRG_FKT_MEM_CLOSE = 0x05U,
UCS_PRG_FKT_INIT = 0x06U
}
Denotes the function where an error occurred. More...

Detailed Description

Referred Types used by Programming Service.


UNICENS: Ucs_Prg_Command_t Struct Reference

Data Fields
Ucs_Prg_Command_t Struct Reference
Referred Types

Represents a programming task. More...

Data Fields

Ucs_Prg_MemId_t mem_id
Represents the memory resource to be written.
uint32_t | address
Defines the memory location at which the writing operation starts.
uint8_t | unit_length
Sets the number of memory units to be written. Memory units can be unsigned bytes, unsigned words or unsigned masked data depending on the memory type.
uint8_t | data_length
Lenght of data.
uint8_t * | data
Contains the actual data written to the memory resource and formatted as memory units.

Detailed Description

Represents a programming task.


UNICENS: Ucs_Prg_Command_t::address

  • Ucs_Prg_Command_t
address
data
data_length
mem_id
unit_length
uint32_t address

Defines the memory location at which the writing operation starts.


UNICENS: Ucs_Prg_Command_t::data

  • Ucs_Prg_Command_t
address
data
data_length
mem_id
unit_length
uint8_t* data

Contains the actual data written to the memory resource and formatted as memory units.


UNICENS: Ucs_Prg_Command_t::data_length

  • Ucs_Prg_Command_t
address
data
data_length
mem_id
unit_length
uint8_t data_length

Lenght of data.


UNICENS: Ucs_Prg_Command_t::mem_id

  • Ucs_Prg_Command_t
address
data
data_length
mem_id
unit_length
Ucs_Prg_MemId_t mem_id

Represents the memory resource to be written.


UNICENS: Ucs_Prg_Command_t::unit_length

  • Ucs_Prg_Command_t
address
data
data_length
mem_id
unit_length
uint8_t unit_length

Sets the number of memory units to be written. Memory units can be unsigned bytes, unsigned words or unsigned masked data depending on the memory type.


UNICENS: Ucs_Prg_Func_t

  • Referred Types
Ucs_Prg_Func_t
Ucs_Prg_MemId_t
Ucs_Prg_ResCode_t
Ucs_Prg_SessionType_t
enum Ucs_Prg_Func_t

Denotes the function where an error occurred.

Enumerator:
UCS_PRG_FKT_DUMMY

Dummy value, used in case of UCS_PRG_RES_SUCCESS.

UCS_PRG_FKT_WELCOME

Error occurred in the context of function Welcome.

UCS_PRG_FKT_WELCOME_NOSUCCESS

Welcome result was No Success.

UCS_PRG_FKT_MEM_OPEN

Error occurred in the context of function MemorySessionOpen.

UCS_PRG_FKT_MEM_WRITE

Error occurred in the context of function MemoryWrite.

UCS_PRG_FKT_MEM_CLOSE

Error occurred in the context of function MemorySessionClose.

UCS_PRG_FKT_INIT

Error occurred in the context of function Init.


UNICENS: Ucs_Prg_MemId_t

  • Referred Types
Ucs_Prg_Func_t
Ucs_Prg_MemId_t
Ucs_Prg_ResCode_t
Ucs_Prg_SessionType_t
enum Ucs_Prg_MemId_t

Represents the memory resource to be written.

Enumerator:
UCS_PRG_MID_CS

Writes the configuration string.

UCS_PRG_MID_IS

Writes the identification string.

UCS_PRG_MID_CSTEST

Writes the test configuration string.

UCS_PRG_MID_ISTEST

Writes the test identification string.


UNICENS: Ucs_Prg_ResCode_t

  • Referred Types
Ucs_Prg_Func_t
Ucs_Prg_MemId_t
Ucs_Prg_ResCode_t
Ucs_Prg_SessionType_t
enum Ucs_Prg_ResCode_t

Result values of the Programming service.

Enumerator:
UCS_PRG_RES_SUCCESS

Node was successfully programmed.

UCS_PRG_RES_TIMEOUT

Node did not answer timely.

UCS_PRG_RES_NET_OFF

A NetOff event occurred during programming.

UCS_PRG_RES_FKT_SYNCH

The call of the internal API function returned an error, so the command was not sent to the node.

UCS_PRG_RES_FKT_ASYNCH

Node returned an error message as result.

UCS_PRG_RES_ERROR

An unexcpected error occurred. Programming service was stopped.


UNICENS: Ucs_Prg_SessionType_t

  • Referred Types
Ucs_Prg_Func_t
Ucs_Prg_MemId_t
Ucs_Prg_ResCode_t
Ucs_Prg_SessionType_t
enum Ucs_Prg_SessionType_t

Defines the set of MemIDs and the memory access types.

Enumerator:
UCS_PRG_ST_CS

Writes to configuration string.

UCS_PRG_ST_IS

Writes to identification string.

UCS_PRG_ST_CS_IS

Writes to configuration and identification string.

UCS_PRG_ST_ERASE_EM

Erases the error memory.

UCS_PRG_ST_CFG_READ

Reads data from all configuration memories.


UNICENS: Ucs_Prg_ReportCb_t

  • Programming
Ucs_Prg_ReportCb_t
Ucs_Prog_Start
typedef void(* Ucs_Prg_ReportCb_t)(Ucs_Prg_ResCode_t code, Ucs_Prg_Func_t function, uint8_t ret_len, uint8_t parm[], void *user_ptr)

Function signature of result callback used by Programming service.

The Programming service reports the result of programming a certain device by this callback function.

Parameters
code | Result values of the Programming service
function | Signature of the node to be programmed.
ret_len | Length of the error parameter field parm. It is 0 if no error occurred.
parm | Pointer to the parameters of a potential error message.
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Prog_Start

  • Programming
Ucs_Prg_ReportCb_t
Ucs_Prog_Start
Ucs_Return_t Ucs_Prog_Start | ( | Ucs_Inst_t * | self,
 |  | uint16_t | node_id,
 |  | Ucs_Signature_t * | signature,
 |  | Ucs_Prg_SessionType_t | session_type,
 |  | Ucs_Prg_Command_t * | command_list,
 |  | Ucs_Prg_ReportCb_t | result_fptr
 | ) |  |

Starts the Programming service and processes the command list

Parameters
*self | The instance
node_id | The node position address of the the node to be programmed
signature | Signature of the the node to be programmed
session_type | Memory access type
command_list | List of programming tasks. It has to end with a NULL entry.
result_fptr | Result callback
Returns


UNICENS: BackChannel Diagnosis

Topics | Callback Functions | Functions
BackChannel Diagnosis

BackChannel Diagnosis. More...

Topics

Referred Types
Referred Types used by BackChannel Diagnosis.

Callback Functions

typedef void(* Ucs_Bcd_ReportCb_t )(Ucs_Bcd_ResCode_t code, uint8_t segment, void *user_ptr)
Function signature of result callback used by BackChannel Diagnosis.

Functions

Ucs_Return_t Ucs_Bcd_Start (Ucs_Inst_t *self, Ucs_Bcd_ReportCb_t report_fptr)
Starts the BackChannel Diagnosis.

Detailed Description

BackChannel Diagnosis.


UNICENS: Referred Types

Macros | Enumerations
Referred Types
BackChannel Diagnosis

Referred Types used by BackChannel Diagnosis. More...

Macros

#define UCS_BCD_DUMMY_SEGMENT 0xFFU
No evaluable segment information available for BackChannel Diagnosis.

Enumerations

enum Ucs_Bcd_ResCode_t {
UCS_BCD_RES_SUCCESS = 0x01U,
UCS_BCD_RES_NO_RING_BREAK = 0x02U,
UCS_BCD_RES_RING_BREAK = 0x03U,
UCS_BCD_RES_TIMEOUT1 = 0x04U,
UCS_BCD_RES_TIMEOUT2 = 0x05U,
UCS_BCD_RES_ERROR = 0x06U,
UCS_BCD_RES_END = 0x07U
}
Result values of the BackChannel Diagnosis. More...

Detailed Description

Referred Types used by BackChannel Diagnosis.


UNICENS: UCS_BCD_DUMMY_SEGMENT

  • Referred Types
UCS_BCD_DUMMY_SEGMENT
Ucs_Bcd_ResCode_t
#define UCS_BCD_DUMMY_SEGMENT 0xFFU

No evaluable segment information available for BackChannel Diagnosis.


UNICENS: Ucs_Bcd_ResCode_t

  • Referred Types
UCS_BCD_DUMMY_SEGMENT
Ucs_Bcd_ResCode_t
enum Ucs_Bcd_ResCode_t

Result values of the BackChannel Diagnosis.

Enumerator:
UCS_BCD_RES_SUCCESS

current segment is not broken

UCS_BCD_RES_NO_RING_BREAK

TM answered: no ring break.

UCS_BCD_RES_RING_BREAK

Ring break detected in current segment.

UCS_BCD_RES_TIMEOUT1

No communication on back channel.

UCS_BCD_RES_TIMEOUT2

No result from INIC received.

UCS_BCD_RES_ERROR

An unexpected error occurred. BackChannel Diagnosis was stopped.

UCS_BCD_RES_END

BackChannel Diagnosis ended regularly.


UNICENS: Ucs_Bcd_ReportCb_t

  • BackChannel Diagnosis
Ucs_Bcd_ReportCb_t
Ucs_Bcd_Start
typedef void(* Ucs_Bcd_ReportCb_t)(Ucs_Bcd_ResCode_t code, uint8_t segment, void *user_ptr)

Function signature of result callback used by BackChannel Diagnosis.

The BackChannel Diagnosis reports the result of certain segment by this callback function.

Parameters
code | Result code
segment | Number of the segment which was inspected. Numbering starts with 0 denoting the segment following the TimingMaster. The number is increased for each following segment.
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Bcd_Start

  • BackChannel Diagnosis
Ucs_Bcd_ReportCb_t
Ucs_Bcd_Start
Ucs_Return_t Ucs_Bcd_Start | ( | Ucs_Inst_t * | self,
 |  | Ucs_Bcd_ReportCb_t | report_fptr
 | ) |  |

Starts the BackChannel Diagnosis.

Parameters
self | The instance
report_fptr | Callback function presenting reports of the diagnosis
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized


UNICENS: Routing Management

Topics | Data Structures | Callback Functions | Functions
Routing Management

Provides service functions to handle connection routes. More...

Topics

Extended Resources Management
Provides data type to manage MOST data resources.
Referred Types
Referred types used by Routing service functions.

Data Structures

struct Ucs_Rm_InitData_t
The initialization structure of the Routing Management. More...

Callback Functions

typedef void(* | Ucs_Rm_ReportCb_t )(Ucs_Rm_Route_t *route_ptr, Ucs_Rm_RouteInfos_t route_infos, void *user_ptr)
Function signature used for the results and reports of the Routing Manager.
typedef void(* | Ucs_Rm_XrmResDebugCb_t )(Ucs_Xrm_ResourceType_t resource_type, Ucs_Xrm_ResObject_t *resource_ptr, Ucs_Xrm_ResourceInfos_t resource_infos, Ucs_Rm_EndPoint_t *endpoint_inst_ptr, void *user_ptr)
Function signature used for monitoring the XRM resources.

Functions

Ucs_Return_t | Ucs_Rm_Start (Ucs_Inst_t *self, Ucs_Rm_Route_t *routes_list, uint16_t list_size)
Initializes the routing process with the given routes list information and starts the process to handle the route(s).
Ucs_Return_t | Ucs_Rm_SetRouteActive (Ucs_Inst_t *self, Ucs_Rm_Route_t *route_ptr, bool active)
Sets the given route to active respectively inactive and triggers the routing process to handle the route.
Ucs_Return_t | Ucs_Rm_SetNodeAvailable (Ucs_Inst_t *self, Ucs_Rm_Node_t *node_ptr, bool available)
Sets the availability attribute (available or not available) of the given node and triggers the routing process to handle attached route(s).
bool | Ucs_Rm_GetNodeAvailable (Ucs_Inst_t *self, Ucs_Rm_Node_t *node_ptr)
Retrieves the "available" flag information of the given node.
Ucs_Return_t | Ucs_Rm_GetAttachedRoutes (Ucs_Inst_t *self, Ucs_Rm_EndPoint_t *ep_inst, Ucs_Rm_Route_t *ls_found_routes[], uint16_t ls_size)
Retrieves the reference(s) of the route(s) currently attached to the given endpoint and stores It into the (external) table provided by user application.
uint16_t | Ucs_Rm_GetConnectionLabel (Ucs_Inst_t *self, Ucs_Rm_Route_t *route_ptr)
Retrieves the ConnectionLabel of the given route.

Detailed Description

Provides service functions to handle connection routes.


UNICENS: Extended Resources Management

Topics | Macros | Callback Functions
Extended Resources Management
Routing Management

Provides data type to manage MOST data resources. More...

Topics

Additional Streaming Port Functions
Additional Streaming Port functions of the Extended Resource Manager.
XRM Referred Types
Referred types used by XRM service functions.
XRM Configuration Macros
Configurations Macros used by XRM service functions.

Macros

#define UCS_ADDR_LOCAL_DEV 0x0001U
Defines the address of the local device.

Callback Functions

typedef void(* | Ucs_Xrm_Most_PortStatusCb_t )(uint16_t most_port_handle, Ucs_Most_PortAvail_t availability, Ucs_Most_PortAvailInfo_t avail_info, uint16_t free_streaming_bw, void *user_ptr)
Function signature used for the MOST Port status.
typedef void(* | Ucs_Xrm_CheckUnmuteCb_t )(uint16_t node_address, void *user_ptr)
Function signature used for the check unmute callback.

Detailed Description

Provides data type to manage MOST data resources.


UNICENS: Additional Streaming Port Functions

Functions
Additional Streaming Port Functions
Extended Resources Management

Additional Streaming Port functions of the Extended Resource Manager. More...

Functions

Ucs_Return_t | Ucs_Xrm_Stream_SetPortConfig (Ucs_Inst_t *self, uint16_t destination_address, uint8_t index, Ucs_Stream_PortOpMode_t op_mode, Ucs_Stream_PortOption_t port_option, Ucs_Stream_PortClockMode_t clock_mode, Ucs_Stream_PortClockDataDelay_t clock_data_delay, Ucs_Xrm_Stream_PortCfgResCb_t result_fptr)
This function is used to configure a Streaming Port.
Ucs_Return_t | Ucs_Xrm_Stream_GetPortConfig (Ucs_Inst_t *self, uint16_t destination_address, uint8_t index, Ucs_Xrm_Stream_PortCfgResCb_t result_fptr)
This function requests the configurations of a Streaming Port.

Detailed Description

Additional Streaming Port functions of the Extended Resource Manager.


UNICENS: Ucs_Xrm_Stream_GetPortConfig

  • Additional Streaming Port Functions
Ucs_Xrm_Stream_GetPortConfig
Ucs_Xrm_Stream_SetPortConfig
Ucs_Return_t Ucs_Xrm_Stream_GetPortConfig | ( | Ucs_Inst_t * | self,
 |  | uint16_t | destination_address,
 |  | uint8_t | index,
 |  | Ucs_Xrm_Stream_PortCfgResCb_t | result_fptr
 | ) |  |

This function requests the configurations of a Streaming Port.

This function corresponds with the INIC function INIC.StreamPortConfiguration.
Parameters
self | The UNICENS instance pointer
destination_address Device address of the target. Use the UCS_ADDR_LOCAL_DEV macro to target the local device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV
index Streaming Port instance.
Index
result_fptr | Required result callback
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | At least one parameter is wrong
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized

Example

// Main function
void main()
{
(void)Ucs_Xrm_Stream_GetPortConfig(ucs_inst_ptr, 0x555U, 0x0U, &App_XrmStreamPortCfgResCb);
}
// The streaming port result callback function
static void App_XrmStreamPortCfgResCb(uint16_t node_address,
uint8_t index,
Ucs_Stream_PortOpMode_t op_mode,
Ucs_Stream_PortOption_t port_option,
Ucs_Stream_PortClockMode_t clock_mode,
Ucs_Stream_PortClockDataDelay_t clock_data_delay,
Ucs_StdResult_t result,
void *user_ptr)
{
if (result.code == UCS_RES_SUCCESS)
{
// Read Streaming ports configuration here...
}
}


UNICENS: Ucs_Xrm_Stream_SetPortConfig

  • Additional Streaming Port Functions
Ucs_Xrm_Stream_GetPortConfig
Ucs_Xrm_Stream_SetPortConfig
Ucs_Return_t Ucs_Xrm_Stream_SetPortConfig | ( | Ucs_Inst_t * | self,
 |  | uint16_t | destination_address,
 |  | uint8_t | index,
 |  | Ucs_Stream_PortOpMode_t | op_mode,
 |  | Ucs_Stream_PortOption_t | port_option,
 |  | Ucs_Stream_PortClockMode_t | clock_mode,
 |  | Ucs_Stream_PortClockDataDelay_t | clock_data_delay,
 |  | Ucs_Xrm_Stream_PortCfgResCb_t | result_fptr
 | ) |  |

This function is used to configure a Streaming Port.

This function corresponds with the INIC function INIC.StreamPortConfiguration.
Parameters
self | The UNICENS instance pointer
destination_address Device address of the target. Use the UCS_ADDR_LOCAL_DEV macro to target the local device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV
index Streaming Port instance.
Index
op_mode Operation mode of the Streaming Port.
OperationMode
port_option Direction of the Streaming Port.
PortOptions
clock_mode Configuration of the FSY/SCK signals.
ClockMode
clock_data_delay Configuration of the FSY/SCK signals for Generic Streaming.
ClockDataDelay
result_fptr | Required result callback
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | The given UNICENS instance pointer is NULL
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized

Example

// Main function
void main()
{
// ...
Ucs_Xrm_Stream_SetPortConfig (ucs_inst_ptr,
0x555U,
0x0U,
UCS_STREAM_PORT_OP_MODE_GENERIC,
UCS_STREAM_PORT_OPT_IN_OUT,
UCS_STREAM_PORT_CLK_MODE_OUTPUT,
UCS_STREAM_PORT_CLK_DLY_NONE,
&App_XrmStreamPortCfgResCb);
// ...
}
// The streaming port result callback function
static void App_XrmStreamPortCfgResCb(uint16_t node_address,
uint8_t index,
Ucs_Stream_PortOpMode_t op_mode,
Ucs_Stream_PortOption_t port_option,
Ucs_Stream_PortClockMode_t clock_mode,
Ucs_Stream_PortClockDataDelay_t clock_data_delay,
Ucs_StdResult_t result,
void *user_ptr)
{
if (result.code != UCS_RES_SUCCESS)
{
// Do whatever is necessary here...
}
}


UNICENS: XRM Referred Types

Topics | Data Structures | Callback Functions | Enumerations
XRM Referred Types
Extended Resources Management

Referred types used by XRM service functions. More...

Topics

XRM SubTypes
Referred types used in XRM Sockets and Ports description.

Data Structures

struct | Ucs_Xrm_InitData_t
The initialization structure of the Extended Resource Manager. More...
struct | Ucs_Xrm_ResultDetails_t
Detailed information used for Extended Resource Manager results. More...
struct | Ucs_Xrm_Result_t
Result structure of the Extended Resource Manager. More...
struct | Ucs_Xrm_ResIdentity_t
Resources Identity from user point of view. More...
struct | Ucs_Xrm_DefaultCreatedPort_t
Configuration structure of a default created port. This structure is used for ports that are configured via the INIC's Configuration String and are automatically created at startup. More...
struct | Ucs_Xrm_MostSocket_t
Configuration structure of a MOST socket. More...
struct | Ucs_Xrm_MlbPort_t
Configuration structure of a MediaLB port. More...
struct | Ucs_Xrm_MlbSocket_t
Configuration structure of a MediaLB socket. More...
struct | Ucs_Xrm_UsbPort_t
Configuration structure of a USB port. More...
struct | Ucs_Xrm_UsbSocket_t
Configuration structure of a USB socket. More...
struct | Ucs_Xrm_RmckPort_t
Configuration structure of a RMCK port. More...
struct | Ucs_Xrm_StrmPort_t
Configuration structure of a streaming port. More...
struct | Ucs_Xrm_StrmSocket_t
Configuration structure of a streaming data socket. More...
struct | Ucs_Xrm_SyncCon_t
Configuration structure of a synchronous data connection. More...
struct | Ucs_Xrm_DfiPhaseCon_t
Configuration structure of a DiscreteFrame Isochronous streaming phase connection. More...
struct | Ucs_Xrm_Combiner_t
Configuration structure of a combiner resource. More...
struct | Ucs_Xrm_Splitter_t
Configuration structure of a splitter resource. More...
struct | Ucs_Xrm_AvpCon_t
Configuration structure for a A/V Packetized isochronous streaming data connection. More...
struct | Ucs_Xrm_QoSCon_t
Configuration structure for a Quality of Service IP streaming data connection. More...

Callback Functions

typedef void | Ucs_Xrm_ResObject_t
INIC Resource Object used for Extended Resource Manager jobs.
typedef void(* | Ucs_Xrm_Stream_PortCfgResCb_t )(uint16_t node_address, uint8_t index, Ucs_Stream_PortOpMode_t op_mode, Ucs_Stream_PortOption_t port_option, Ucs_Stream_PortClockMode_t clock_mode, Ucs_Stream_PortClockDataDelay_t clock_data_delay, Ucs_StdResult_t result, void *user_ptr)
Function signature of result callback used by Ucs_Xrm_Stream_SetPortConfig() and Ucs_Xrm_Stream_GetPortConfig().
typedef void(* | Ucs_Xrm_ResourceDebugCb_t )(Ucs_Xrm_ResourceType_t resource_type, Ucs_Xrm_ResObject_t *resource_ptr, Ucs_Xrm_ResourceInfos_t resource_infos, void *endpoint_inst_ptr, void *user_ptr)
Function signature used for monitoring the XRM resources.

Enumerations

enum Ucs_Xrm_ResultCode_t {
UCS_XRM_RES_SUCCESS_BUILD = 0x00U,
UCS_XRM_RES_SUCCESS_DESTROY = 0x01U,
UCS_XRM_RES_RC_AUTO_DESTROYED = 0x02U,
UCS_XRM_RES_ERR_CONFIG = 0x03U,
UCS_XRM_RES_ERR_BUILD = 0x04U,
UCS_XRM_RES_ERR_DESTROY = 0x05U,
UCS_XRM_RES_ERR_INV_LIST = 0x06U,
UCS_XRM_RES_ERR_SYNC = 0x07U,
UCS_XRM_RES_UNKNOWN = 0xFFU
}
Result codes of the Extended Resource Manager. More...
enum Ucs_Xrm_ResourceType_t {
UCS_XRM_RC_TYPE_DC_PORT = 0x00U,
UCS_XRM_RC_TYPE_MOST_SOCKET = 0x01U,
UCS_XRM_RC_TYPE_MLB_PORT = 0x02U,
UCS_XRM_RC_TYPE_MLB_SOCKET = 0x03U,
UCS_XRM_RC_TYPE_USB_PORT = 0x04U,
UCS_XRM_RC_TYPE_USB_SOCKET = 0x05U,
UCS_XRM_RC_TYPE_RMCK_PORT = 0x06U,
UCS_XRM_RC_TYPE_STRM_PORT = 0x07U,
UCS_XRM_RC_TYPE_STRM_SOCKET = 0x08U,
UCS_XRM_RC_TYPE_SYNC_CON = 0x09U,
UCS_XRM_RC_TYPE_DFIPHASE_CON = 0x0AU,
UCS_XRM_RC_TYPE_COMBINER = 0x0BU,
UCS_XRM_RC_TYPE_SPLITTER = 0x0CU,
UCS_XRM_RC_TYPE_AVP_CON = 0x0DU,
UCS_XRM_RC_TYPE_QOS_CON = 0x0EU
}
INIC resource types used by the Extended Resource Manager. More...
enum Ucs_Xrm_PortType_t {
UCS_XRM_PORT_TYPE_MLB = 0x0AU,
UCS_XRM_PORT_TYPE_USB = 0x12U,
UCS_XRM_PORT_TYPE_STRM = 0x16U
}
Port types use for default created ports. More...
enum Ucs_Xrm_ResultType_t {
UCS_XRM_RESULT_TYPE_INT = 0x00U,
UCS_XRM_RESULT_TYPE_TGT = 0x01U,
UCS_XRM_RESULT_TYPE_TX = 0x02U
}
This enumerator specifies the kind of result - Internal, Target or Transmission. More...
enum Ucs_Xrm_ResourceInfos_t {
UCS_XRM_INFOS_BUILT = 0x00U,
UCS_XRM_INFOS_DESTROYED = 0x01U,
UCS_XRM_INFOS_ERR_BUILT = 0x02U,
UCS_XRM_INFOS_ERR_DESTROYED = 0x03U
}
This enumerator specifies the type of resources information. More...

Detailed Description

Referred types used by XRM service functions.


UNICENS: XRM SubTypes

Enumerations
XRM SubTypes
XRM Referred Types

Referred types used in XRM Sockets and Ports description. More...

Enumerations

enum Ucs_Avp_IsocPacketSize_t {
UCS_ISOC_PCKT_SIZE_188 = 188U,
UCS_ISOC_PCKT_SIZE_196 = 196U,
UCS_ISOC_PCKT_SIZE_206 = 206U
}
Data packet size of the isochronous channel. More...
enum Ucs_Sync_MuteMode_t {
UCS_SYNC_MUTE_MODE_NO_MUTING = 0x00U,
UCS_SYNC_MUTE_MODE_MUTE_SIGNAL = 0x01U
}
Mute Mode. More...
enum Ucs_SocketDirection_t {
UCS_SOCKET_DIR_INPUT = 0U,
UCS_SOCKET_DIR_OUTPUT = 1U
}
Direction of the data stream from the perspective of the INIC. More...
enum Ucs_Most_SocketDataType_t {
UCS_MOST_SCKT_SYNC_DATA = 0U,
UCS_MOST_SCKT_AV_PACKETIZED = 3U,
UCS_MOST_SCKT_QOS_IP = 4U,
UCS_MOST_SCKT_DISC_FRAME_PHASE = 5U
}
Data type of MOST Sockets. More...
enum Ucs_Mlb_SocketDataType_t {
UCS_MLB_SCKT_SYNC_DATA = 0U,
UCS_MLB_SCKT_CONTROL_DATA = 2U,
UCS_MLB_SCKT_AV_PACKETIZED = 3U,
UCS_MLB_SCKT_QOS_IP = 4U,
UCS_MLB_SCKT_DISC_FRAME_PHASE = 5U,
UCS_MLB_SCKT_IPC_PACKET = 7U
}
Data type of MediaLB Sockets. More...
enum Ucs_Usb_SocketDataType_t {
UCS_USB_SCKT_SYNC_DATA = 0U,
UCS_USB_SCKT_CONTROL_DATA = 2U,
UCS_USB_SCKT_AV_PACKETIZED = 3U,
UCS_USB_SCKT_IPC_PACKET = 7U
}
Data type of USB Sockets. More...
enum Ucs_Usb_PhysicalLayer_t {
UCS_USB_PHY_LAYER_STANDARD = 0U,
UCS_USB_PHY_LAYER_HSCI = 1U
}
Physical interface of the USB Port. More...
enum Ucs_Mlb_ClockConfig_t {
UCS_MLB_CLK_CFG_256_FS = 0U,
UCS_MLB_CLK_CFG_512_FS = 1U,
UCS_MLB_CLK_CFG_1024_FS = 2U,
UCS_MLB_CLK_CFG_2048_FS = 3U,
UCS_MLB_CLK_CFG_3072_FS = 4U,
UCS_MLB_CLK_CFG_4096_FS = 5U,
UCS_MLB_CLK_CFG_6144_FS = 6U,
UCS_MLB_CLK_CFG_8192_FS = 7U,
UCS_MLB_CLK_CFG_WILDCARD = 0xFFU
}
MediaLB clock speed configuration. More...
enum | Ucs_Rmck_PortClockSource_t { UCS_RMCK_PORT_CLK_SRC_NW_SYSTEM = 0x01U }
Source of the RMCK clock. More...
enum | Ucs_Pci_SocketDataType_t { UCS_PCI_SCKT_AV_PACKETIZED = 3U }
Data type of PCIe Sockets. More...
enum | Ucs_Stream_PortOpMode_t { UCS_STREAM_PORT_OP_MODE_GENERIC = 0x00U }
Operation mode of the Streaming Port. More...
enum Ucs_Stream_PortOption_t {
UCS_STREAM_PORT_OPT_IN_OUT = 0x00U,
UCS_STREAM_PORT_OPT_DUAL_IN = 0x01U,
UCS_STREAM_PORT_OPT_DUAL_OUT = 0x02U
}
Direction of the physical pins of the indexed Streaming Port. More...
enum Ucs_Stream_PortClockMode_t {
UCS_STREAM_PORT_CLK_MODE_OUTPUT = 0x00U,
UCS_STREAM_PORT_CLK_MODE_INPUT = 0x01U,
UCS_STREAM_PORT_CLK_MODE_WILD = 0xFFU
}
Indicates if FSY/SCK signals are configured as outputs or inputs. More...
enum Ucs_Stream_PortClockDataDelay_t {
UCS_STREAM_PORT_CLK_DLY_NONE = 0x00U,
UCS_STREAM_PORT_CLK_DLY_DELAYED = 0x01U,
UCS_STREAM_PORT_CLK_DLY_WILD = 0xFFU
}
This setting is only applicable to data pins used for Generic Streaming including any linked pins to Streaming Port B. All data pins share the same FSY / SCK signals, hence this setting applies to all data pins. More...
enum Ucs_Stream_PortClockConfig_t {
UCS_STREAM_PORT_CLK_CFG_8FS = 0x00U,
UCS_STREAM_PORT_CLK_CFG_16FS = 0x01U,
UCS_STREAM_PORT_CLK_CFG_32FS = 0x02U,
UCS_STREAM_PORT_CLK_CFG_64FS = 0x03U,
UCS_STREAM_PORT_CLK_CFG_128FS = 0x04U,
UCS_STREAM_PORT_CLK_CFG_256FS = 0x05U,
UCS_STREAM_PORT_CLK_CFG_512FS = 0x06U,
UCS_STREAM_PORT_CLK_CFG_WILD = 0xFFU
}
Clock speed configuration of the SCK signal. More...
enum | Ucs_Stream_SocketDataType_t { UCS_STREAM_PORT_SCKT_SYNC_DATA = 0x00U }
Data types of Streaming Sockets. More...
enum Ucs_Stream_PortPinId_t {
UCS_STREAM_PORT_PIN_ID_SRXA0 = 0x00U,
UCS_STREAM_PORT_PIN_ID_SRXA1 = 0x01U,
UCS_STREAM_PORT_PIN_ID_SRXB0 = 0x10U,
UCS_STREAM_PORT_PIN_ID_SRXB1 = 0x11U
}
ID of the serial interface pin of the addressed Streaming Port instance to which the socket should be attached to. More...
enum Ucs_Stream_PortDataAlign_t {
UCS_STREAM_PORT_ALGN_LEFT16BIT = 0x00U,
UCS_STREAM_PORT_ALGN_LEFT24BIT = 0x01U,
UCS_STREAM_PORT_ALGN_RIGHT16BIT = 0x02U,
UCS_STREAM_PORT_ALGN_RIGHT24BIT = 0x03U,
UCS_STREAM_PORT_ALGN_SEQ = 0x04U
}
Defines the alignment of the data bytes within the streaming port frame. More...
enum Ucs_Most_PortAvail_t {
UCS_MOST_PORT_AVAIL = 0x01U,
UCS_MOST_PORT_NOT_AVAIL = 0x00U
}
Indicates if the MOST Network Port is available and ready for streaming data connections. More...
enum Ucs_Most_PortAvailInfo_t {
UCS_MOST_PRT_AVL_INF_REGULAR = 0x00U,
UCS_MOST_PRT_AVL_INF_UNSTABLE = 0x10U,
UCS_MOST_PRT_AVL_INF_STABLE = 0x11U
}
Indicates the sub state to parameter Available. More...

Detailed Description

Referred types used in XRM Sockets and Ports description.


UNICENS: Ucs_Avp_IsocPacketSize_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Avp_IsocPacketSize_t

Data packet size of the isochronous channel.

Enumerator:
UCS_ISOC_PCKT_SIZE_188

Standard MPEG2 Transport Stream packet size, no encryption.

UCS_ISOC_PCKT_SIZE_196

DTCP Supplement B, DTCP over MOST.

UCS_ISOC_PCKT_SIZE_206

DTCP Supplement E, DTCP over IP.


UNICENS: Ucs_Mlb_ClockConfig_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Mlb_ClockConfig_t

MediaLB clock speed configuration.

Enumerator:
UCS_MLB_CLK_CFG_256_FS

256 Fs

UCS_MLB_CLK_CFG_512_FS

512 Fs

UCS_MLB_CLK_CFG_1024_FS

1024 Fs

UCS_MLB_CLK_CFG_2048_FS

2048 Fs

UCS_MLB_CLK_CFG_3072_FS

3072 Fs

UCS_MLB_CLK_CFG_4096_FS

4096 Fs

UCS_MLB_CLK_CFG_6144_FS

6144 Fs

UCS_MLB_CLK_CFG_8192_FS

8192 Fs

UCS_MLB_CLK_CFG_WILDCARD

Uses the corresponding parameter in the INIC Configuration String.


UNICENS: Ucs_Mlb_SocketDataType_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Mlb_SocketDataType_t

Data type of MediaLB Sockets.

Enumerator:
UCS_MLB_SCKT_SYNC_DATA

Specifies the synchronous streaming data type.

UCS_MLB_SCKT_CONTROL_DATA

Specifies the control data type.

UCS_MLB_SCKT_AV_PACKETIZED

Specifies the A/V Packetized Isochronous streaming data type.

UCS_MLB_SCKT_QOS_IP

Specifies the Quality of Service IP streaming data type.

UCS_MLB_SCKT_DISC_FRAME_PHASE

Specifies the DiscreteFrame Isochronous streaming phase data type.

UCS_MLB_SCKT_IPC_PACKET

Specifies the IPC packet data type.


UNICENS: Ucs_Most_PortAvail_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Most_PortAvail_t

Indicates if the MOST Network Port is available and ready for streaming data connections.

Enumerator:
UCS_MOST_PORT_AVAIL

MOST Network Port is available and it is possible to have streaming data connections.

UCS_MOST_PORT_NOT_AVAIL

MOST Network Port is not available for streaming data. FreeStreamingBW gets 0. All created sockets on this port get invalid.


UNICENS: Ucs_Most_PortAvailInfo_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Most_PortAvailInfo_t

Indicates the sub state to parameter Available.

Enumerator:
UCS_MOST_PRT_AVL_INF_REGULAR

MOST Network Port is not available for streaming data. This is for instance the case if the MOST network is shut down or Ring Break Diagnosis is running.

UCS_MOST_PRT_AVL_INF_UNSTABLE

Unlocks have been detected at the port and streaming is temporarily not available.

UCS_MOST_PRT_AVL_INF_STABLE

Port is in Stable Lock.


UNICENS: Ucs_Most_SocketDataType_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Most_SocketDataType_t

Data type of MOST Sockets.

Enumerator:
UCS_MOST_SCKT_SYNC_DATA

Specifies the synchronous streaming data type.

UCS_MOST_SCKT_AV_PACKETIZED

Specifies the A/V Packetized Isochronous streaming data type.

UCS_MOST_SCKT_QOS_IP

Specifies the Quality of Service IP streaming data type.

UCS_MOST_SCKT_DISC_FRAME_PHASE

Specifies the DiscreteFrame Isochronous streaming phase data type.


UNICENS: Ucs_Pci_SocketDataType_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Pci_SocketDataType_t

Data type of PCIe Sockets.

Enumerator:
UCS_PCI_SCKT_AV_PACKETIZED

Specifies the A/V Packetized Isochronous streaming data type.


UNICENS: Ucs_Rmck_PortClockSource_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Rmck_PortClockSource_t

Source of the RMCK clock.

Enumerator:
UCS_RMCK_PORT_CLK_SRC_NW_SYSTEM

RMCK is locked to the system clock.


UNICENS: Ucs_SocketDirection_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_SocketDirection_t

Direction of the data stream from the perspective of the INIC.

Enumerator:
UCS_SOCKET_DIR_INPUT

Socket transfers data into INIC.

UCS_SOCKET_DIR_OUTPUT

Socket transfers data out of INIC.


UNICENS: Ucs_Stream_PortClockConfig_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Stream_PortClockConfig_t

Clock speed configuration of the SCK signal.

Enumerator:
UCS_STREAM_PORT_CLK_CFG_8FS

8 x Fs. All data pins must be configured for sequential routing.

UCS_STREAM_PORT_CLK_CFG_16FS

16 x Fs. All data pins must be configured for sequential routing.

UCS_STREAM_PORT_CLK_CFG_32FS

32 x Fs. All data pins must be configured for sequential routing.

UCS_STREAM_PORT_CLK_CFG_64FS

64 x Fs

UCS_STREAM_PORT_CLK_CFG_128FS

128 x Fs

UCS_STREAM_PORT_CLK_CFG_256FS

256 x Fs

UCS_STREAM_PORT_CLK_CFG_512FS

512 x Fs

UCS_STREAM_PORT_CLK_CFG_WILD

Wildcard.


UNICENS: Ucs_Stream_PortClockDataDelay_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Stream_PortClockDataDelay_t

This setting is only applicable to data pins used for Generic Streaming including any linked pins to Streaming Port B. All data pins share the same FSY / SCK signals, hence this setting applies to all data pins.

Enumerator:
UCS_STREAM_PORT_CLK_DLY_NONE

Data is not delayed by a single SCK clock delay.

UCS_STREAM_PORT_CLK_DLY_DELAYED

There is a single SCK clock delay between the start of frame (falling edge of FSY) and the start of the frame data on the data pins.

UCS_STREAM_PORT_CLK_DLY_WILD

Wildcard.


UNICENS: Ucs_Stream_PortClockMode_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Stream_PortClockMode_t

Indicates if FSY/SCK signals are configured as outputs or inputs.

Enumerator:
UCS_STREAM_PORT_CLK_MODE_OUTPUT

INIC drives the FSY/SCK signals as outputs, frequency locked to the network clock.

UCS_STREAM_PORT_CLK_MODE_INPUT

FSY/SCK signals are configured as inputs and are driven from outside the INIC. Use RMCK, frequency locked to the network clock, as reference for clock generation.

UCS_STREAM_PORT_CLK_MODE_WILD

Wildcard.


UNICENS: Ucs_Stream_PortDataAlign_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Stream_PortDataAlign_t

Defines the alignment of the data bytes within the streaming port frame.

Enumerator:
UCS_STREAM_PORT_ALGN_LEFT16BIT

Left-justified, 16 bit, legacy.

UCS_STREAM_PORT_ALGN_LEFT24BIT

Left-justified, 24 bit, legacy.

UCS_STREAM_PORT_ALGN_RIGHT16BIT

Right-justified, 16 bit, legacy.

UCS_STREAM_PORT_ALGN_RIGHT24BIT

Right-justified, 16 bit, legacy.

UCS_STREAM_PORT_ALGN_SEQ

Sequential.


UNICENS: Ucs_Stream_PortOpMode_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Stream_PortOpMode_t

Operation mode of the Streaming Port.

Enumerator:
UCS_STREAM_PORT_OP_MODE_GENERIC

If Index = PortB, data pins are linked to PortA clock configuration.


UNICENS: Ucs_Stream_PortOption_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Stream_PortOption_t

Direction of the physical pins of the indexed Streaming Port.

Enumerator:
UCS_STREAM_PORT_OPT_IN_OUT

Two serial interface pins are available; one for direction IN and one for direction OUT.

UCS_STREAM_PORT_OPT_DUAL_IN

Tow serial interface pins are available for direction IN.

UCS_STREAM_PORT_OPT_DUAL_OUT

Tow serial interface pins are available for direction OUT.


UNICENS: Ucs_Stream_PortPinId_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Stream_PortPinId_t

ID of the serial interface pin of the addressed Streaming Port instance to which the socket should be attached to.

Enumerator:
UCS_STREAM_PORT_PIN_ID_SRXA0

PortA, pin 5.

UCS_STREAM_PORT_PIN_ID_SRXA1

PortA, pin 6.

UCS_STREAM_PORT_PIN_ID_SRXB0

PortB, pin 7.

UCS_STREAM_PORT_PIN_ID_SRXB1

PortB, pin 8.


UNICENS: Ucs_Stream_SocketDataType_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Stream_SocketDataType_t

Data types of Streaming Sockets.

Enumerator:
UCS_STREAM_PORT_SCKT_SYNC_DATA

Specifies the synchronous streaming data type.


UNICENS: Ucs_Sync_MuteMode_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Sync_MuteMode_t

Mute Mode.

Enumerator:
UCS_SYNC_MUTE_MODE_NO_MUTING

No mute monitoring.

UCS_SYNC_MUTE_MODE_MUTE_SIGNAL

Mute signal. The MUTE pin will be asserted if any registered connection may stream corrupted data.


UNICENS: Ucs_Usb_PhysicalLayer_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Usb_PhysicalLayer_t

Physical interface of the USB Port.

Enumerator:
UCS_USB_PHY_LAYER_STANDARD

Standard - USB uses the standard physical interface with analog transceivers for board communication.

UCS_USB_PHY_LAYER_HSCI

HSIC - USB uses the High-Speed Inter-Chip interface without analog transceivers for board communication.


UNICENS: Ucs_Usb_SocketDataType_t

  • XRM SubTypes
Ucs_Avp_IsocPacketSize_t
Ucs_Mlb_ClockConfig_t
Ucs_Mlb_SocketDataType_t
Ucs_Most_PortAvail_t
Ucs_Most_PortAvailInfo_t
Ucs_Most_SocketDataType_t
Ucs_Pci_SocketDataType_t
Ucs_Rmck_PortClockSource_t
Ucs_SocketDirection_t
Ucs_Stream_PortClockConfig_t
Ucs_Stream_PortClockDataDelay_t
Ucs_Stream_PortClockMode_t
Ucs_Stream_PortDataAlign_t
Ucs_Stream_PortOpMode_t
Ucs_Stream_PortOption_t
Ucs_Stream_PortPinId_t
Ucs_Stream_SocketDataType_t
Ucs_Sync_MuteMode_t
Ucs_Usb_PhysicalLayer_t
Ucs_Usb_SocketDataType_t
enum Ucs_Usb_SocketDataType_t

Data type of USB Sockets.

Enumerator:
UCS_USB_SCKT_SYNC_DATA

Specifies the synchronous streaming data type.

UCS_USB_SCKT_CONTROL_DATA

Specifies the control data type.

UCS_USB_SCKT_AV_PACKETIZED

Specifies the A/V Packetized Isochronous streaming data type.

UCS_USB_SCKT_IPC_PACKET

Specifies the IPC packet data type.


UNICENS: Ucs_Xrm_InitData_t Struct Reference

Data Fields
Ucs_Xrm_InitData_t Struct Reference
XRM Referred Types

The initialization structure of the Extended Resource Manager. More...

Data Fields

Ucs_Xrm_Most_PortStatusCb_t most_port_status_fptr
Callback function that reports streaming-related information for the MOST Network Port, including the state of the port and available streaming bandwidth.
Ucs_Xrm_CheckUnmuteCb_t check_unmute_fptr
Callback function that signals the EHC to check the mute pin state of devices before attempting unmute.

Detailed Description

The initialization structure of the Extended Resource Manager.


UNICENS: Ucs_Xrm_InitData_t::check_unmute_fptr

  • Ucs_Xrm_InitData_t
check_unmute_fptr
most_port_status_fptr
Ucs_Xrm_CheckUnmuteCb_t check_unmute_fptr

Callback function that signals the EHC to check the mute pin state of devices before attempting unmute.

Whenever this callback function is called and the EHC has devices muted by the mute signal (INIC's MUTE pin), the EHC should ensure that the mute pin is not asserted and if so, unmute the corresponding devices.


UNICENS: Ucs_Xrm_InitData_t::most_port_status_fptr

  • Ucs_Xrm_InitData_t
check_unmute_fptr
most_port_status_fptr
Ucs_Xrm_Most_PortStatusCb_t most_port_status_fptr

Callback function that reports streaming-related information for the MOST Network Port, including the state of the port and available streaming bandwidth.


UNICENS: Ucs_Xrm_ResultDetails_t Struct Reference

Data Fields
Ucs_Xrm_ResultDetails_t Struct Reference
XRM Referred Types

Detailed information used for Extended Resource Manager results. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Specifies the INIC resource type for which the result has been returned.
uint8_t resource_index
Specifies the table index of the resource object for which the result has been returned.
Ucs_Xrm_ResultType_t result_type
Specifies the type of the current asynchronous result.
Ucs_Return_t int_result
Holds the internal MNS results.
Ucs_StdResult_t inic_result
Holds the INIC results.
Ucs_MsgTxStatus_t tx_result
Holds the transmission error information.

Detailed Description

Detailed information used for Extended Resource Manager results.


UNICENS: Ucs_Xrm_ResultDetails_t::inic_result

  • Ucs_Xrm_ResultDetails_t
inic_result
int_result
resource_index
resource_type
result_type
tx_result
Ucs_StdResult_t inic_result

Holds the INIC results.


UNICENS: Ucs_Xrm_ResultDetails_t::int_result

  • Ucs_Xrm_ResultDetails_t
inic_result
int_result
resource_index
resource_type
result_type
tx_result
Ucs_Return_t int_result

Holds the internal MNS results.


UNICENS: Ucs_Xrm_ResultDetails_t::resource_index

  • Ucs_Xrm_ResultDetails_t
inic_result
int_result
resource_index
resource_type
result_type
tx_result
uint8_t resource_index

Specifies the table index of the resource object for which the result has been returned.


UNICENS: Ucs_Xrm_ResultDetails_t::resource_type

  • Ucs_Xrm_ResultDetails_t
inic_result
int_result
resource_index
resource_type
result_type
tx_result
Ucs_Xrm_ResourceType_t resource_type

Specifies the INIC resource type for which the result has been returned.


UNICENS: Ucs_Xrm_ResultDetails_t::result_type

  • Ucs_Xrm_ResultDetails_t
inic_result
int_result
resource_index
resource_type
result_type
tx_result
Ucs_Xrm_ResultType_t result_type

Specifies the type of the current asynchronous result.

The following briefly describes the different types of results available:

  • UCS_XRM_RESULT_TYPE_INT: internal results, typically standard return codes of MNS used for synchronous response.
    Refer to int_result to get the results.
  • UCS_XRM_RESULT_TYPE_TGT: target results, typically INIC function-specific error from target device.
    Refer to inic_result to get the results.
  • UCS_XRM_RESULT_TYPE_TX: transmission results, typically transmission error on the MOST network.
    Refer to tx_result to get the results.


UNICENS: Ucs_Xrm_ResultDetails_t::tx_result

  • Ucs_Xrm_ResultDetails_t
inic_result
int_result
resource_index
resource_type
result_type
tx_result
Ucs_MsgTxStatus_t tx_result

Holds the transmission error information.


UNICENS: Ucs_Xrm_Result_t Struct Reference

Data Fields
Ucs_Xrm_Result_t Struct Reference
XRM Referred Types

Result structure of the Extended Resource Manager. More...

Data Fields

Ucs_Xrm_ResultCode_t code
Result code.
Ucs_Xrm_ResultDetails_t details
Detailed information on the returned result.

Detailed Description

Result structure of the Extended Resource Manager.


UNICENS: Ucs_Xrm_Result_t::code

  • Ucs_Xrm_Result_t
code
details
Ucs_Xrm_ResultCode_t code

Result code.


UNICENS: Ucs_Xrm_Result_t::details

  • Ucs_Xrm_Result_t
code
details
Ucs_Xrm_ResultDetails_t details

Detailed information on the returned result.


UNICENS: Ucs_Xrm_ResIdentity_t Struct Reference

Data Fields
Ucs_Xrm_ResIdentity_t Struct Reference
XRM Referred Types

Resources Identity from user point of view. More...

Data Fields

Ucs_Xrm_ResObject_t * resource_store
Result code.
uint8_t resource_id
Result code.

Detailed Description

Resources Identity from user point of view.


UNICENS: Ucs_Xrm_ResIdentity_t::resource_id

  • Ucs_Xrm_ResIdentity_t
resource_id
resource_store
uint8_t resource_id

Result code.


UNICENS: Ucs_Xrm_ResIdentity_t::resource_store

  • Ucs_Xrm_ResIdentity_t
resource_id
resource_store
Ucs_Xrm_ResObject_t* resource_store

Result code.


UNICENS: Ucs_Xrm_DefaultCreatedPort_t Struct Reference

Data Fields
Ucs_Xrm_DefaultCreatedPort_t Struct Reference
XRM Referred Types

Configuration structure of a default created port. This structure is used for ports that are configured via the INIC's Configuration String and are automatically created at startup. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
Ucs_Xrm_PortType_t port_type
Type of the hardware port.
uint8_t index
Port instance identifier.

Detailed Description

Configuration structure of a default created port. This structure is used for ports that are configured via the INIC's Configuration String and are automatically created at startup.


UNICENS: Ucs_Xrm_DefaultCreatedPort_t::index

  • Ucs_Xrm_DefaultCreatedPort_t
index
port_type
resource_type
uint8_t index

Port instance identifier.


UNICENS: Ucs_Xrm_DefaultCreatedPort_t::port_type

  • Ucs_Xrm_DefaultCreatedPort_t
index
port_type
resource_type
Ucs_Xrm_PortType_t port_type

Type of the hardware port.


UNICENS: Ucs_Xrm_DefaultCreatedPort_t::resource_type

  • Ucs_Xrm_DefaultCreatedPort_t
index
port_type
resource_type
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_MostSocket_t Struct Reference

Data Fields
Ucs_Xrm_MostSocket_t Struct Reference
XRM Referred Types

Configuration structure of a MOST socket. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
uint16_t | most_port_handle
Port resource handle.
Ucs_SocketDirection_t direction
Direction of data stream.
Ucs_Most_SocketDataType_t data_type
Data type.
uint16_t | bandwidth
Required socket bandwidth.

Detailed Description

Configuration structure of a MOST socket.


UNICENS: Ucs_Xrm_MostSocket_t::bandwidth

  • Ucs_Xrm_MostSocket_t
bandwidth
data_type
direction
most_port_handle
resource_type
uint16_t bandwidth

Required socket bandwidth.

This attribute corresponds with the parameter Bandwidth of the INIC function INIC.MOSTSocketCreate.


UNICENS: Ucs_Xrm_MostSocket_t::data_type

  • Ucs_Xrm_MostSocket_t
bandwidth
data_type
direction
most_port_handle
resource_type
Ucs_Most_SocketDataType_t data_type

Data type.

This attribute corresponds with the parameter DataType of the INIC function INIC.MOSTSocketCreate.


UNICENS: Ucs_Xrm_MostSocket_t::direction

  • Ucs_Xrm_MostSocket_t
bandwidth
data_type
direction
most_port_handle
resource_type
Ucs_SocketDirection_t direction

Direction of data stream.

This attribute corresponds with the parameter Direction of the INIC function INIC.MOSTSocketCreate.


UNICENS: Ucs_Xrm_MostSocket_t::most_port_handle

  • Ucs_Xrm_MostSocket_t
bandwidth
data_type
direction
most_port_handle
resource_type
uint16_t most_port_handle

Port resource handle.

This attribute corresponds with the parameter MOSTPortHandle of the INIC function INIC.MOSTSocketCreate.


UNICENS: Ucs_Xrm_MostSocket_t::resource_type

  • Ucs_Xrm_MostSocket_t
bandwidth
data_type
direction
most_port_handle
resource_type
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_MlbPort_t Struct Reference

Data Fields
Ucs_Xrm_MlbPort_t Struct Reference
XRM Referred Types

Configuration structure of a MediaLB port. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
uint8_t index
MLB port instance.
Ucs_Mlb_ClockConfig_t clock_config
Clock speed configuration.

Detailed Description

Configuration structure of a MediaLB port.


UNICENS: Ucs_Xrm_MlbPort_t::clock_config

  • Ucs_Xrm_MlbPort_t
clock_config
index
resource_type
Ucs_Mlb_ClockConfig_t clock_config

Clock speed configuration.

This attribute corresponds with the parameter ClockConfig of the INIC function INIC.MediaLBPortCreate.


UNICENS: Ucs_Xrm_MlbPort_t::index

  • Ucs_Xrm_MlbPort_t
clock_config
index
resource_type
uint8_t index

MLB port instance.

This attribute corresponds with the parameter Index of the INIC function INIC.MediaLBPortCreate.


UNICENS: Ucs_Xrm_MlbPort_t::resource_type

  • Ucs_Xrm_MlbPort_t
clock_config
index
resource_type
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_MlbSocket_t Struct Reference

Data Fields
Ucs_Xrm_MlbSocket_t Struct Reference
XRM Referred Types

Configuration structure of a MediaLB socket. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | mlb_port_obj_ptr
Reference to the INIC resource object the socket is attached to.
Ucs_SocketDirection_t direction
Direction of data stream.
Ucs_Mlb_SocketDataType_t data_type
Data type.
uint16_t | bandwidth
Required socket bandwidth.
uint16_t | channel_address
MLB channel address.

Detailed Description

Configuration structure of a MediaLB socket.


UNICENS: Ucs_Xrm_MlbSocket_t::bandwidth

  • Ucs_Xrm_MlbSocket_t
bandwidth
channel_address
data_type
direction
mlb_port_obj_ptr
resource_type
uint16_t bandwidth

Required socket bandwidth.

This attribute corresponds with the parameter Bandwidth of the INIC function INIC.MediaLBSocketCreate.


UNICENS: Ucs_Xrm_MlbSocket_t::channel_address

  • Ucs_Xrm_MlbSocket_t
bandwidth
channel_address
data_type
direction
mlb_port_obj_ptr
resource_type
uint16_t channel_address

MLB channel address.

This attribute corresponds with the parameter ChannelAddress of the INIC function INIC.MediaLBSocketCreate.


UNICENS: Ucs_Xrm_MlbSocket_t::data_type

  • Ucs_Xrm_MlbSocket_t
bandwidth
channel_address
data_type
direction
mlb_port_obj_ptr
resource_type
Ucs_Mlb_SocketDataType_t data_type

Data type.

This attribute corresponds with the parameter DataType of the INIC function INIC.MediaLBSocketCreate.


UNICENS: Ucs_Xrm_MlbSocket_t::direction

  • Ucs_Xrm_MlbSocket_t
bandwidth
channel_address
data_type
direction
mlb_port_obj_ptr
resource_type
Ucs_SocketDirection_t direction

Direction of data stream.

This attribute corresponds with the parameter Direction of the INIC function INIC.MediaLBSocketCreate.


UNICENS: Ucs_Xrm_MlbSocket_t::mlb_port_obj_ptr

  • Ucs_Xrm_MlbSocket_t
bandwidth
channel_address
data_type
direction
mlb_port_obj_ptr
resource_type
UCS_XRM_CONST Ucs_Xrm_ResObject_t* mlb_port_obj_ptr

Reference to the INIC resource object the socket is attached to.


UNICENS: Ucs_Xrm_MlbSocket_t::resource_type

  • Ucs_Xrm_MlbSocket_t
bandwidth
channel_address
data_type
direction
mlb_port_obj_ptr
resource_type
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_UsbPort_t Struct Reference

Data Fields
Ucs_Xrm_UsbPort_t Struct Reference
XRM Referred Types

Configuration structure of a USB port. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
uint8_t | index
USB port instance.
Ucs_Usb_PhysicalLayer_t physical_layer
interface of the USB Port’s physical layer.
uint16_t | devices_interfaces
USB devices interfaces mask.
uint8_t | streaming_if_ep_out_count
OUT Endpoints inside the streaming interface.
uint8_t | streaming_if_ep_in_count
IN Endpoints inside the streaming interface.

Detailed Description

Configuration structure of a USB port.


UNICENS: Ucs_Xrm_UsbPort_t::devices_interfaces

  • Ucs_Xrm_UsbPort_t
devices_interfaces
index
physical_layer
resource_type
streaming_if_ep_in_count
streaming_if_ep_out_count
uint16_t devices_interfaces

USB devices interfaces mask.

This attribute corresponds with the parameter DeviceInterfaces of the INIC function INIC.USBPortCreate.


UNICENS: Ucs_Xrm_UsbPort_t::index

  • Ucs_Xrm_UsbPort_t
devices_interfaces
index
physical_layer
resource_type
streaming_if_ep_in_count
streaming_if_ep_out_count
uint8_t index

USB port instance.

This attribute corresponds with the parameter Index of the INIC function INIC.USBPortCreate.


UNICENS: Ucs_Xrm_UsbPort_t::physical_layer

  • Ucs_Xrm_UsbPort_t
devices_interfaces
index
physical_layer
resource_type
streaming_if_ep_in_count
streaming_if_ep_out_count
Ucs_Usb_PhysicalLayer_t physical_layer

interface of the USB Port’s physical layer.

This attribute corresponds with the parameter PhysicalLayer of the INIC function INIC.USBPortCreate.


UNICENS: Ucs_Xrm_UsbPort_t::resource_type

  • Ucs_Xrm_UsbPort_t
devices_interfaces
index
physical_layer
resource_type
streaming_if_ep_in_count
streaming_if_ep_out_count
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_UsbPort_t::streaming_if_ep_in_count

  • Ucs_Xrm_UsbPort_t
devices_interfaces
index
physical_layer
resource_type
streaming_if_ep_in_count
streaming_if_ep_out_count
uint8_t streaming_if_ep_in_count

IN Endpoints inside the streaming interface.

This attribute corresponds with the parameter StreamingIfEpInCount of the INIC function INIC.USBPortCreate.


UNICENS: Ucs_Xrm_UsbPort_t::streaming_if_ep_out_count

  • Ucs_Xrm_UsbPort_t
devices_interfaces
index
physical_layer
resource_type
streaming_if_ep_in_count
streaming_if_ep_out_count
uint8_t streaming_if_ep_out_count

OUT Endpoints inside the streaming interface.

This attribute corresponds with the parameter StreamingIfEpOutCount of the INIC function INIC.USBPortCreate.


UNICENS: Ucs_Xrm_UsbSocket_t Struct Reference

Data Fields
Ucs_Xrm_UsbSocket_t Struct Reference
XRM Referred Types

Configuration structure of a USB socket. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | usb_port_obj_ptr
Reference to the INIC resource object the socket is attached to.
Ucs_SocketDirection_t direction
Direction of the data stream.
Ucs_Usb_SocketDataType_t data_type
Data type.
uint8_t | end_point_addr
Address of a USB Endpoint.
uint16_t | frames_per_transfer
Number of MOST network frames/packets per one USB transaction.

Detailed Description

Configuration structure of a USB socket.


UNICENS: Ucs_Xrm_UsbSocket_t::data_type

  • Ucs_Xrm_UsbSocket_t
data_type
direction
end_point_addr
frames_per_transfer
resource_type
usb_port_obj_ptr
Ucs_Usb_SocketDataType_t data_type

Data type.

This attribute corresponds with the parameter DataType of the INIC function INIC.USBSocketCreate.


UNICENS: Ucs_Xrm_UsbSocket_t::direction

  • Ucs_Xrm_UsbSocket_t
data_type
direction
end_point_addr
frames_per_transfer
resource_type
usb_port_obj_ptr
Ucs_SocketDirection_t direction

Direction of the data stream.

This attribute corresponds with the parameter Direction of the INIC function INIC.USBSocketCreate.


UNICENS: Ucs_Xrm_UsbSocket_t::end_point_addr

  • Ucs_Xrm_UsbSocket_t
data_type
direction
end_point_addr
frames_per_transfer
resource_type
usb_port_obj_ptr
uint8_t end_point_addr

Address of a USB Endpoint.

This attribute corresponds with the parameter EndpointAddress of the INIC function INIC.USBSocketCreate.


UNICENS: Ucs_Xrm_UsbSocket_t::frames_per_transfer

  • Ucs_Xrm_UsbSocket_t
data_type
direction
end_point_addr
frames_per_transfer
resource_type
usb_port_obj_ptr
uint16_t frames_per_transfer

Number of MOST network frames/packets per one USB transaction.

This attribute corresponds with the parameter FramesPerTransfer of the INIC function INIC.USBSocketCreate.


UNICENS: Ucs_Xrm_UsbSocket_t::resource_type

  • Ucs_Xrm_UsbSocket_t
data_type
direction
end_point_addr
frames_per_transfer
resource_type
usb_port_obj_ptr
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_UsbSocket_t::usb_port_obj_ptr

  • Ucs_Xrm_UsbSocket_t
data_type
direction
end_point_addr
frames_per_transfer
resource_type
usb_port_obj_ptr
UCS_XRM_CONST Ucs_Xrm_ResObject_t* usb_port_obj_ptr

Reference to the INIC resource object the socket is attached to.


UNICENS: Ucs_Xrm_RmckPort_t Struct Reference

Data Fields
Ucs_Xrm_RmckPort_t Struct Reference
XRM Referred Types

Configuration structure of a RMCK port. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
uint8_t | index
RMCK Port instance.
Ucs_Rmck_PortClockSource_t clock_source
Source of the RMCK clock.
uint16_t | divisor
Divisor of the clock source.

Detailed Description

Configuration structure of a RMCK port.


UNICENS: Ucs_Xrm_RmckPort_t::clock_source

  • Ucs_Xrm_RmckPort_t
clock_source
divisor
index
resource_type
Ucs_Rmck_PortClockSource_t clock_source

Source of the RMCK clock.

This attribute corresponds with the parameter ClockSource of the INIC function INIC.RMCKPortCreate.


UNICENS: Ucs_Xrm_RmckPort_t::divisor

  • Ucs_Xrm_RmckPort_t
clock_source
divisor
index
resource_type
uint16_t divisor

Divisor of the clock source.

This attribute corresponds with the parameter Divisor of the INIC function INIC.RMCKPortCreate.


UNICENS: Ucs_Xrm_RmckPort_t::index

  • Ucs_Xrm_RmckPort_t
clock_source
divisor
index
resource_type
uint8_t index

RMCK Port instance.

This attribute corresponds with the parameter Index of the INIC function INIC.RMCKPortCreate.


UNICENS: Ucs_Xrm_RmckPort_t::resource_type

  • Ucs_Xrm_RmckPort_t
clock_source
divisor
index
resource_type
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_StrmPort_t Struct Reference

Data Fields
Ucs_Xrm_StrmPort_t Struct Reference
XRM Referred Types

Configuration structure of a streaming port. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
uint8_t index
Streaming Port instance.
Ucs_Stream_PortClockConfig_t clock_config
Clock speed configuration.
Ucs_Stream_PortDataAlign_t data_alignment
Alignment of the data bytes.

Detailed Description

Configuration structure of a streaming port.


UNICENS: Ucs_Xrm_StrmPort_t::clock_config

  • Ucs_Xrm_StrmPort_t
clock_config
data_alignment
index
resource_type
Ucs_Stream_PortClockConfig_t clock_config

Clock speed configuration.

This attribute corresponds with the parameter ClockConfig of the INIC function INIC.StreamPortCreate.


UNICENS: Ucs_Xrm_StrmPort_t::data_alignment

  • Ucs_Xrm_StrmPort_t
clock_config
data_alignment
index
resource_type
Ucs_Stream_PortDataAlign_t data_alignment

Alignment of the data bytes.

This attribute corresponds with the parameter DataAlignment of the INIC function INIC.StreamPortCreate.


UNICENS: Ucs_Xrm_StrmPort_t::index

  • Ucs_Xrm_StrmPort_t
clock_config
data_alignment
index
resource_type
uint8_t index

Streaming Port instance.

This attribute corresponds with the parameter Index of the INIC function INIC.StreamPortCreate.


UNICENS: Ucs_Xrm_StrmPort_t::resource_type

  • Ucs_Xrm_StrmPort_t
clock_config
data_alignment
index
resource_type
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_StrmSocket_t Struct Reference

Data Fields
Ucs_Xrm_StrmSocket_t Struct Reference
XRM Referred Types

Configuration structure of a streaming data socket. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | stream_port_obj_ptr
Reference to the INIC resource object the socket is attached to.
Ucs_SocketDirection_t direction
Direction of the data stream.
Ucs_Stream_SocketDataType_t data_type
Data type.
uint16_t | bandwidth
Required socket bandwidth in bytes.
Ucs_Stream_PortPinId_t stream_pin_id
ID of the serial interface pin.

Detailed Description

Configuration structure of a streaming data socket.


UNICENS: Ucs_Xrm_StrmSocket_t::bandwidth

  • Ucs_Xrm_StrmSocket_t
bandwidth
data_type
direction
resource_type
stream_pin_id
stream_port_obj_ptr
uint16_t bandwidth

Required socket bandwidth in bytes.

This attribute corresponds with the parameter Bandwidth of the INIC function INIC.StreamSocketCreate.


UNICENS: Ucs_Xrm_StrmSocket_t::data_type

  • Ucs_Xrm_StrmSocket_t
bandwidth
data_type
direction
resource_type
stream_pin_id
stream_port_obj_ptr
Ucs_Stream_SocketDataType_t data_type

Data type.

This attribute corresponds with the parameter DataType of the INIC function INIC.StreamSocketCreate.


UNICENS: Ucs_Xrm_StrmSocket_t::direction

  • Ucs_Xrm_StrmSocket_t
bandwidth
data_type
direction
resource_type
stream_pin_id
stream_port_obj_ptr
Ucs_SocketDirection_t direction

Direction of the data stream.

This attribute corresponds with the parameter Direction of the INIC function INIC.StreamSocketCreate.


UNICENS: Ucs_Xrm_StrmSocket_t::resource_type

  • Ucs_Xrm_StrmSocket_t
bandwidth
data_type
direction
resource_type
stream_pin_id
stream_port_obj_ptr
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_StrmSocket_t::stream_pin_id

  • Ucs_Xrm_StrmSocket_t
bandwidth
data_type
direction
resource_type
stream_pin_id
stream_port_obj_ptr
Ucs_Stream_PortPinId_t stream_pin_id

ID of the serial interface pin.

This attribute corresponds with the parameter StreamPinID of the INIC function INIC.StreamSocketCreate.


UNICENS: Ucs_Xrm_StrmSocket_t::stream_port_obj_ptr

  • Ucs_Xrm_StrmSocket_t
bandwidth
data_type
direction
resource_type
stream_pin_id
stream_port_obj_ptr
UCS_XRM_CONST Ucs_Xrm_ResObject_t* stream_port_obj_ptr

Reference to the INIC resource object the socket is attached to.


UNICENS: Ucs_Xrm_SyncCon_t Struct Reference

Data Fields
Ucs_Xrm_SyncCon_t Struct Reference
XRM Referred Types

Configuration structure of a synchronous data connection. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | socket_in_obj_ptr
Reference to the INIC resource object that specifies the socket that is the starting point of the link. Must be a socket of type Input.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | socket_out_obj_ptr
Reference to the INIC resource object that specifies the socket that is the ending point of the link. Must be a socket of type Output.
Ucs_Sync_MuteMode_t mute_mode
Mode of operation of mute.
uint16_t | offset
Offset from where the socket data should be routed from a splitter.

Detailed Description

Configuration structure of a synchronous data connection.


UNICENS: Ucs_Xrm_SyncCon_t::mute_mode

  • Ucs_Xrm_SyncCon_t
mute_mode
offset
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
Ucs_Sync_MuteMode_t mute_mode

Mode of operation of mute.

This attribute corresponds with the parameter MuteMode of the INIC function INIC.SyncCreate.


UNICENS: Ucs_Xrm_SyncCon_t::offset

  • Ucs_Xrm_SyncCon_t
mute_mode
offset
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
uint16_t offset

Offset from where the socket data should be routed from a splitter.

This attribute corresponds with the parameter Offset of the INIC function INIC.SyncCreate.


UNICENS: Ucs_Xrm_SyncCon_t::resource_type

  • Ucs_Xrm_SyncCon_t
mute_mode
offset
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_SyncCon_t::socket_in_obj_ptr

  • Ucs_Xrm_SyncCon_t
mute_mode
offset
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
UCS_XRM_CONST Ucs_Xrm_ResObject_t* socket_in_obj_ptr

Reference to the INIC resource object that specifies the socket that is the starting point of the link. Must be a socket of type Input.


UNICENS: Ucs_Xrm_SyncCon_t::socket_out_obj_ptr

  • Ucs_Xrm_SyncCon_t
mute_mode
offset
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
UCS_XRM_CONST Ucs_Xrm_ResObject_t* socket_out_obj_ptr

Reference to the INIC resource object that specifies the socket that is the ending point of the link. Must be a socket of type Output.


UNICENS: Ucs_Xrm_DfiPhaseCon_t Struct Reference

Data Fields
Ucs_Xrm_DfiPhaseCon_t Struct Reference
XRM Referred Types

Configuration structure of a DiscreteFrame Isochronous streaming phase connection. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | socket_in_obj_ptr
Reference to the INIC resource object that specifies the socket that is the starting point of the link. Must be a socket of type Input.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | socket_out_obj_ptr
Reference to the INIC resource object that specifies the socket that is the ending point of the link. Must be a socket of type Output.

Detailed Description

Configuration structure of a DiscreteFrame Isochronous streaming phase connection.


UNICENS: Ucs_Xrm_DfiPhaseCon_t::resource_type

  • Ucs_Xrm_DfiPhaseCon_t
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_DfiPhaseCon_t::socket_in_obj_ptr

  • Ucs_Xrm_DfiPhaseCon_t
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
UCS_XRM_CONST Ucs_Xrm_ResObject_t* socket_in_obj_ptr

Reference to the INIC resource object that specifies the socket that is the starting point of the link. Must be a socket of type Input.


UNICENS: Ucs_Xrm_DfiPhaseCon_t::socket_out_obj_ptr

  • Ucs_Xrm_DfiPhaseCon_t
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
UCS_XRM_CONST Ucs_Xrm_ResObject_t* socket_out_obj_ptr

Reference to the INIC resource object that specifies the socket that is the ending point of the link. Must be a socket of type Output.


UNICENS: Ucs_Xrm_Combiner_t Struct Reference

Data Fields
Ucs_Xrm_Combiner_t Struct Reference
XRM Referred Types

Configuration structure of a combiner resource. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | port_socket_obj_ptr
Reference to the INIC resource object that specifies the synchronous socket.
uint16_t | most_port_handle
Port resource handle.
uint16_t | bytes_per_frame
Total number of data bytes to be transferred each MOST network frame.

Detailed Description

Configuration structure of a combiner resource.


UNICENS: Ucs_Xrm_Combiner_t::bytes_per_frame

  • Ucs_Xrm_Combiner_t
bytes_per_frame
most_port_handle
port_socket_obj_ptr
resource_type
uint16_t bytes_per_frame

Total number of data bytes to be transferred each MOST network frame.

This attribute corresponds with the parameter BytesPerFrame of the INIC function INIC.CombinerCreate.


UNICENS: Ucs_Xrm_Combiner_t::most_port_handle

  • Ucs_Xrm_Combiner_t
bytes_per_frame
most_port_handle
port_socket_obj_ptr
resource_type
uint16_t most_port_handle

Port resource handle.

This attribute corresponds with the parameter MOSTPortHandle of the INIC function INIC.CombinerCreate.


UNICENS: Ucs_Xrm_Combiner_t::port_socket_obj_ptr

  • Ucs_Xrm_Combiner_t
bytes_per_frame
most_port_handle
port_socket_obj_ptr
resource_type
UCS_XRM_CONST Ucs_Xrm_ResObject_t* port_socket_obj_ptr

Reference to the INIC resource object that specifies the synchronous socket.


UNICENS: Ucs_Xrm_Combiner_t::resource_type

  • Ucs_Xrm_Combiner_t
bytes_per_frame
most_port_handle
port_socket_obj_ptr
resource_type
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_Splitter_t Struct Reference

Data Fields
Ucs_Xrm_Splitter_t Struct Reference
XRM Referred Types

Configuration structure of a splitter resource. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | socket_in_obj_ptr
Reference to the INIC resource object that specifies the synchronous socket.
uint16_t | most_port_handle
Port resource handle.
uint16_t | bytes_per_frame
Total number of data bytes to be transferred each MOST network frame.

Detailed Description

Configuration structure of a splitter resource.


UNICENS: Ucs_Xrm_Splitter_t::bytes_per_frame

  • Ucs_Xrm_Splitter_t
bytes_per_frame
most_port_handle
resource_type
socket_in_obj_ptr
uint16_t bytes_per_frame

Total number of data bytes to be transferred each MOST network frame.

This attribute corresponds with the parameter BytesPerFrame of the INIC function INIC.SplitterCreate.


UNICENS: Ucs_Xrm_Splitter_t::most_port_handle

  • Ucs_Xrm_Splitter_t
bytes_per_frame
most_port_handle
resource_type
socket_in_obj_ptr
uint16_t most_port_handle

Port resource handle.

This attribute corresponds with the parameter MOSTPortHandle of the INIC function INIC.SplitterCreate.


UNICENS: Ucs_Xrm_Splitter_t::resource_type

  • Ucs_Xrm_Splitter_t
bytes_per_frame
most_port_handle
resource_type
socket_in_obj_ptr
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_Splitter_t::socket_in_obj_ptr

  • Ucs_Xrm_Splitter_t
bytes_per_frame
most_port_handle
resource_type
socket_in_obj_ptr
UCS_XRM_CONST Ucs_Xrm_ResObject_t* socket_in_obj_ptr

Reference to the INIC resource object that specifies the synchronous socket.


UNICENS: Ucs_Xrm_AvpCon_t Struct Reference

Data Fields
Ucs_Xrm_AvpCon_t Struct Reference
XRM Referred Types

Configuration structure for a A/V Packetized isochronous streaming data connection. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | socket_in_obj_ptr
Reference to the INIC resource object that specifies the socket that is the starting point of the link. Must be a socket of type Input.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | socket_out_obj_ptr
Reference to the INIC resource object that specifies the socket that is the ending point of the link. Must be a socket of type Output.
Ucs_Avp_IsocPacketSize_t isoc_packet_size
Size of data packets.

Detailed Description

Configuration structure for a A/V Packetized isochronous streaming data connection.


UNICENS: Ucs_Xrm_AvpCon_t::isoc_packet_size

  • Ucs_Xrm_AvpCon_t
isoc_packet_size
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
Ucs_Avp_IsocPacketSize_t isoc_packet_size

Size of data packets.

This attribute corresponds with the parameter IsocPacketSize of the INIC function INIC.AVPacketizedCreate.


UNICENS: Ucs_Xrm_AvpCon_t::resource_type

  • Ucs_Xrm_AvpCon_t
isoc_packet_size
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_AvpCon_t::socket_in_obj_ptr

  • Ucs_Xrm_AvpCon_t
isoc_packet_size
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
UCS_XRM_CONST Ucs_Xrm_ResObject_t* socket_in_obj_ptr

Reference to the INIC resource object that specifies the socket that is the starting point of the link. Must be a socket of type Input.


UNICENS: Ucs_Xrm_AvpCon_t::socket_out_obj_ptr

  • Ucs_Xrm_AvpCon_t
isoc_packet_size
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
UCS_XRM_CONST Ucs_Xrm_ResObject_t* socket_out_obj_ptr

Reference to the INIC resource object that specifies the socket that is the ending point of the link. Must be a socket of type Output.


UNICENS: Ucs_Xrm_QoSCon_t Struct Reference

Data Fields
Ucs_Xrm_QoSCon_t Struct Reference
XRM Referred Types

Configuration structure for a Quality of Service IP streaming data connection. More...

Data Fields

Ucs_Xrm_ResourceType_t resource_type
Type of the INIC resource object.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | socket_in_obj_ptr
Reference to the INIC resource object that specifies the socket that is the starting point of the link. Must be a socket of type Input.
UCS_XRM_CONST Ucs_Xrm_ResObject_t * | socket_out_obj_ptr
Reference to the INIC resource object that specifies the socket that is the ending point of the link. Must be a socket of type Output.

Detailed Description

Configuration structure for a Quality of Service IP streaming data connection.


UNICENS: Ucs_Xrm_QoSCon_t::resource_type

  • Ucs_Xrm_QoSCon_t
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
Ucs_Xrm_ResourceType_t resource_type

Type of the INIC resource object.


UNICENS: Ucs_Xrm_QoSCon_t::socket_in_obj_ptr

  • Ucs_Xrm_QoSCon_t
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
UCS_XRM_CONST Ucs_Xrm_ResObject_t* socket_in_obj_ptr

Reference to the INIC resource object that specifies the socket that is the starting point of the link. Must be a socket of type Input.


UNICENS: Ucs_Xrm_QoSCon_t::socket_out_obj_ptr

  • Ucs_Xrm_QoSCon_t
resource_type
socket_in_obj_ptr
socket_out_obj_ptr
UCS_XRM_CONST Ucs_Xrm_ResObject_t* socket_out_obj_ptr

Reference to the INIC resource object that specifies the socket that is the ending point of the link. Must be a socket of type Output.


UNICENS: Ucs_Xrm_ResObject_t

  • XRM Referred Types
Ucs_Xrm_PortType_t
Ucs_Xrm_ResObject_t
Ucs_Xrm_ResourceDebugCb_t
Ucs_Xrm_ResourceInfos_t
Ucs_Xrm_ResourceType_t
Ucs_Xrm_ResultCode_t
Ucs_Xrm_ResultType_t
Ucs_Xrm_Stream_PortCfgResCb_t
typedef void Ucs_Xrm_ResObject_t

INIC Resource Object used for Extended Resource Manager jobs.

Attention
This resource object must be terminated with a NULL pointer to mark the end of the list.


UNICENS: Ucs_Xrm_ResourceDebugCb_t

  • XRM Referred Types
Ucs_Xrm_PortType_t
Ucs_Xrm_ResObject_t
Ucs_Xrm_ResourceDebugCb_t
Ucs_Xrm_ResourceInfos_t
Ucs_Xrm_ResourceType_t
Ucs_Xrm_ResultCode_t
Ucs_Xrm_ResultType_t
Ucs_Xrm_Stream_PortCfgResCb_t
typedef void(* Ucs_Xrm_ResourceDebugCb_t)(Ucs_Xrm_ResourceType_t resource_type, Ucs_Xrm_ResObject_t *resource_ptr, Ucs_Xrm_ResourceInfos_t resource_infos, void *endpoint_inst_ptr, void *user_ptr)

Function signature used for monitoring the XRM resources.

Parameters
resource_type | The XRM resource type to be looked for
resource_ptr | Reference to the resource to be looked for
resource_infos | Resource information
endpoint_inst_ptr | Reference to the endpoint object that encapsulates the given resource.
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Xrm_Stream_PortCfgResCb_t

  • XRM Referred Types
Ucs_Xrm_PortType_t
Ucs_Xrm_ResObject_t
Ucs_Xrm_ResourceDebugCb_t
Ucs_Xrm_ResourceInfos_t
Ucs_Xrm_ResourceType_t
Ucs_Xrm_ResultCode_t
Ucs_Xrm_ResultType_t
Ucs_Xrm_Stream_PortCfgResCb_t
typedef void(* Ucs_Xrm_Stream_PortCfgResCb_t)(uint16_t node_address, uint8_t index, Ucs_Stream_PortOpMode_t op_mode, Ucs_Stream_PortOption_t port_option, Ucs_Stream_PortClockMode_t clock_mode, Ucs_Stream_PortClockDataDelay_t clock_data_delay, Ucs_StdResult_t result, void *user_ptr)

Function signature of result callback used by Ucs_Xrm_Stream_SetPortConfig() and Ucs_Xrm_Stream_GetPortConfig().

The arguments of the result callback function correspond with the INIC's result for the function INIC.StreamPortConfiguration.
Parameters
node_address | The node address from which the results come
index Streaming Port instance.
Index
op_mode Operation mode of the Streaming Port.
OperationMode
port_option Direction of the physical pins of the indexed Streaming Port.
PortOption
clock_mode Configuration of the FSY/SCK signals.
ClockMode
clock_data_delay Configuration of the FSY/SCK signals for Generic Streaming.
ClockDataDelay
result | Returned result of the operation
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Xrm_PortType_t

  • XRM Referred Types
Ucs_Xrm_PortType_t
Ucs_Xrm_ResObject_t
Ucs_Xrm_ResourceDebugCb_t
Ucs_Xrm_ResourceInfos_t
Ucs_Xrm_ResourceType_t
Ucs_Xrm_ResultCode_t
Ucs_Xrm_ResultType_t
Ucs_Xrm_Stream_PortCfgResCb_t
enum Ucs_Xrm_PortType_t

Port types use for default created ports.

Enumerator:
UCS_XRM_PORT_TYPE_MLB

MediaLB Port.

UCS_XRM_PORT_TYPE_USB

USB Port.

UCS_XRM_PORT_TYPE_STRM

Streaming Port.


UNICENS: Ucs_Xrm_ResourceInfos_t

  • XRM Referred Types
Ucs_Xrm_PortType_t
Ucs_Xrm_ResObject_t
Ucs_Xrm_ResourceDebugCb_t
Ucs_Xrm_ResourceInfos_t
Ucs_Xrm_ResourceType_t
Ucs_Xrm_ResultCode_t
Ucs_Xrm_ResultType_t
Ucs_Xrm_Stream_PortCfgResCb_t
enum Ucs_Xrm_ResourceInfos_t

This enumerator specifies the type of resources information.

Enumerator:
UCS_XRM_INFOS_BUILT

Signals that the resource is built.

UCS_XRM_INFOS_DESTROYED

Signals that the resource is destroyed.

UCS_XRM_INFOS_ERR_BUILT

Signals that XRM fails to build the resource.

UCS_XRM_INFOS_ERR_DESTROYED

Signals that XRM fails to destroy the resource.


UNICENS: Ucs_Xrm_ResourceType_t

  • XRM Referred Types
Ucs_Xrm_PortType_t
Ucs_Xrm_ResObject_t
Ucs_Xrm_ResourceDebugCb_t
Ucs_Xrm_ResourceInfos_t
Ucs_Xrm_ResourceType_t
Ucs_Xrm_ResultCode_t
Ucs_Xrm_ResultType_t
Ucs_Xrm_Stream_PortCfgResCb_t
enum Ucs_Xrm_ResourceType_t

INIC resource types used by the Extended Resource Manager.

Enumerator:
UCS_XRM_RC_TYPE_DC_PORT

Default created port.

UCS_XRM_RC_TYPE_MOST_SOCKET

MOST socket.

UCS_XRM_RC_TYPE_MLB_PORT

MediaLB port.

UCS_XRM_RC_TYPE_MLB_SOCKET

MediaLB socket.

UCS_XRM_RC_TYPE_USB_PORT

USB port.

UCS_XRM_RC_TYPE_USB_SOCKET

USB socket.

UCS_XRM_RC_TYPE_RMCK_PORT

RMCK port.

UCS_XRM_RC_TYPE_STRM_PORT

Streaming port.

UCS_XRM_RC_TYPE_STRM_SOCKET

Streaming socket.

UCS_XRM_RC_TYPE_SYNC_CON

Synchronous data connection.

UCS_XRM_RC_TYPE_DFIPHASE_CON

DiscreteFrame Isochronous streaming phase connection.

UCS_XRM_RC_TYPE_COMBINER

Combiner.

UCS_XRM_RC_TYPE_SPLITTER

Splitter.

UCS_XRM_RC_TYPE_AVP_CON

A/V packetized isochronous streaming data connection.

UCS_XRM_RC_TYPE_QOS_CON

Quality of Service IP streaming data connection.


UNICENS: Ucs_Xrm_ResultCode_t

  • XRM Referred Types
Ucs_Xrm_PortType_t
Ucs_Xrm_ResObject_t
Ucs_Xrm_ResourceDebugCb_t
Ucs_Xrm_ResourceInfos_t
Ucs_Xrm_ResourceType_t
Ucs_Xrm_ResultCode_t
Ucs_Xrm_ResultType_t
Ucs_Xrm_Stream_PortCfgResCb_t
enum Ucs_Xrm_ResultCode_t

Result codes of the Extended Resource Manager.

Enumerator:
UCS_XRM_RES_SUCCESS_BUILD

Build of connection succeeded.

UCS_XRM_RES_SUCCESS_DESTROY

Destruction of connection succeeded.

UCS_XRM_RES_RC_AUTO_DESTROYED

Invalid resources have been successfully destroyed.

UCS_XRM_RES_ERR_CONFIG

Invalid user settings in the XRM configuration file.

The number of jobs or resources exceeds the maximum allowed in your XRM configuration file.

UCS_XRM_RES_ERR_BUILD

Build of connection failed due to a function-specific error found on target device or a transmission error on the MOST network.

The result_type section in Ucs_Xrm_ResultDetails_t will provide you with more detailed information concerning the error type.

UCS_XRM_RES_ERR_DESTROY

Destruction of connection failed due to a function-specific error found on target device or a transmission error on the MOST network.

The result_type section in Ucs_Xrm_ResultDetails_t will provide you with more detailed information concerning the error type.

UCS_XRM_RES_ERR_INV_LIST

Request of invalid resources failed due to a function-specific error found on target device or a transmission error on the MOST network.

The result_type section in Ucs_Xrm_ResultDetails_t will provide you with more detailed information concerning the error type.

UCS_XRM_RES_ERR_SYNC

The remote synchronization of target device failed due to a function-specific error a transmission error on the MOST network.

The result_type section in Ucs_Xrm_ResultDetails_t will provide you with more detailed information concerning the error type.

UCS_XRM_RES_UNKNOWN

Result is unknown.


UNICENS: Ucs_Xrm_ResultType_t

  • XRM Referred Types
Ucs_Xrm_PortType_t
Ucs_Xrm_ResObject_t
Ucs_Xrm_ResourceDebugCb_t
Ucs_Xrm_ResourceInfos_t
Ucs_Xrm_ResourceType_t
Ucs_Xrm_ResultCode_t
Ucs_Xrm_ResultType_t
Ucs_Xrm_Stream_PortCfgResCb_t
enum Ucs_Xrm_ResultType_t

This enumerator specifies the kind of result - Internal, Target or Transmission.

Enumerator:
UCS_XRM_RESULT_TYPE_INT

Specifies the internal results, typically standard return codes of MNS used for synchronous response.

UCS_XRM_RESULT_TYPE_TGT

Specifies the target results, typically INIC function-specific error from target device.

UCS_XRM_RESULT_TYPE_TX

Specifies the transmission error information on the MOST network.


UNICENS: XRM Configuration Macros

Macros
XRM Configuration Macros
Extended Resources Management

Configurations Macros used by XRM service functions. More...

Macros

#define | UCS_NUM_REMOTE_DEVICES 0U
Customer assignment for number of remote devices required by Resources Management modules.
#define | UCS_XRM_NUM_JOBS
Defines the size of the internal job list.
#define | UCS_XRM_NUM_RESOURCES
Defines the number of provided resources.

Detailed Description

Configurations Macros used by XRM service functions.


UNICENS: UCS_NUM_REMOTE_DEVICES

  • XRM Configuration Macros
UCS_NUM_REMOTE_DEVICES
UCS_XRM_NUM_JOBS
UCS_XRM_NUM_RESOURCES
#define UCS_NUM_REMOTE_DEVICES 0U

Customer assignment for number of remote devices required by Resources Management modules.

If the macro is not defined, the UNICENS library will use a default value of 0. The user can overwrite this default value by defining the macro. Valid values are in the range from 0 to 63.


UNICENS: UCS_XRM_NUM_JOBS

  • XRM Configuration Macros
UCS_NUM_REMOTE_DEVICES
UCS_XRM_NUM_JOBS
UCS_XRM_NUM_RESOURCES
#define UCS_XRM_NUM_JOBS

Defines the size of the internal job list.

The number of XRM jobs to execute. The value is used to specify the size of the internal job list. The definition of this macro must be part of the XRM configuration file ucs_xrm_cfg.h. Valid range: 1..254. Default value: 1.


UNICENS: UCS_XRM_NUM_RESOURCES

  • XRM Configuration Macros
UCS_NUM_REMOTE_DEVICES
UCS_XRM_NUM_JOBS
UCS_XRM_NUM_RESOURCES
#define UCS_XRM_NUM_RESOURCES

Defines the number of provided resources.

The number of required resources depends on the defined XRM jobs. The definition of the public macro UCS_XRM_NUM_RESOURCES must be part of the XRM configuration file ucs_xrm_cfg.h. Valid range: 1..254. Default value: 8.


UNICENS: UCS_ADDR_LOCAL_DEV

  • Extended Resources Management
UCS_ADDR_LOCAL_DEV
Ucs_Xrm_CheckUnmuteCb_t
Ucs_Xrm_Most_PortStatusCb_t
#define UCS_ADDR_LOCAL_DEV 0x0001U

Defines the address of the local device.

This macro is used to define the address of the local device. It should be used by the application to trigger jobs on the local device.


UNICENS: Ucs_Xrm_CheckUnmuteCb_t

  • Extended Resources Management
UCS_ADDR_LOCAL_DEV
Ucs_Xrm_CheckUnmuteCb_t
Ucs_Xrm_Most_PortStatusCb_t
typedef void(* Ucs_Xrm_CheckUnmuteCb_t)(uint16_t node_address, void *user_ptr)

Function signature used for the check unmute callback.

Whenever this callback function is called and the EHC has sink connections muted by the mute pin, the application has to ensure that this mute pin is not asserted before attempting unmute.

Parameters
node_address The node address of the device to be looked for.


UNICENS: Ucs_Xrm_Most_PortStatusCb_t

  • Extended Resources Management
UCS_ADDR_LOCAL_DEV
Ucs_Xrm_CheckUnmuteCb_t
Ucs_Xrm_Most_PortStatusCb_t
typedef void(* Ucs_Xrm_Most_PortStatusCb_t)(uint16_t most_port_handle, Ucs_Most_PortAvail_t availability, Ucs_Most_PortAvailInfo_t avail_info, uint16_t free_streaming_bw, void *user_ptr)

Function signature used for the MOST Port status.

This callback function is called to report streaming-related information for a MOST Port.

Parameters
most_port_handle | Port resource handle.
availability | State of the MOST port related to streaming connections.
avail_info | Sub state to parameter availability.
free_streaming_bw | Free streaming bandwidth for the dedicated MOST Port.
user_ptr | User reference provided in Ucs_InitData_t::user_ptr.


UNICENS: Referred Types

Data Structures | Enumerations
Referred Types
Routing Management

Referred types used by Routing service functions. More...

Data Structures

struct | Ucs_Rm_Node_t
Configuration structure of a Node. More...
struct | Ucs_Rm_EndPoint_t
Configuration structure of a Connection EndPoint. More...
struct | Ucs_Rm_Route_t
Configuration structure of a Route. More...

Enumerations

enum Ucs_Rm_EndPointType_t {
UCS_RM_EP_SOURCE = 0x00U,
UCS_RM_EP_SINK = 0x01U
}
This enumerator specifies the type of an EndPoint object. More...
enum Ucs_Rm_RouteInfos_t {
UCS_RM_ROUTE_INFOS_BUILT = 0x00U,
UCS_RM_ROUTE_INFOS_DESTROYED = 0x01U,
UCS_RM_ROUTE_INFOS_SUSPENDED = 0x02U,
UCS_RM_ROUTE_INFOS_PROCESS_STOP = 0x03U
}
This enumerator specifies the possible route information returned via User callback function of Ucs_Rm_Start(). More...

Detailed Description

Referred types used by Routing service functions.


UNICENS: Ucs_Rm_Node_t Struct Reference

Data Fields
Ucs_Rm_Node_t Struct Reference
Referred Types

Configuration structure of a Node. More...

Data Fields

Ucs_Signature_t * signature_ptr
node signature.
Ucs_Ns_Script_t * script_list_ptr
Reference to a list of configuration scripts.
uint8_t | script_list_size
size of the scripts table.
Ucs_Rm_NodeInt_t | internal_infos
Internal information of this node object.

Detailed Description

Configuration structure of a Node.

Attention
Use the UCS_ADDR_LOCAL_DEV macro to address your local device when specifying routes to/from It.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV


UNICENS: Ucs_Rm_Node_t::internal_infos

  • Ucs_Rm_Node_t
internal_infos
script_list_ptr
script_list_size
signature_ptr
Ucs_Rm_NodeInt_t internal_infos

Internal information of this node object.


UNICENS: Ucs_Rm_Node_t::script_list_ptr

  • Ucs_Rm_Node_t
internal_infos
script_list_ptr
script_list_size
signature_ptr
Ucs_Ns_Script_t* script_list_ptr

Reference to a list of configuration scripts.


UNICENS: Ucs_Rm_Node_t::script_list_size

  • Ucs_Rm_Node_t
internal_infos
script_list_ptr
script_list_size
signature_ptr
uint8_t script_list_size

size of the scripts table.


UNICENS: Ucs_Rm_Node_t::signature_ptr

  • Ucs_Rm_Node_t
internal_infos
script_list_ptr
script_list_size
signature_ptr
Ucs_Signature_t* signature_ptr

node signature.


UNICENS: Ucs_Rm_EndPoint_t Struct Reference

Data Fields
Ucs_Rm_EndPoint_t Struct Reference
Referred Types

Configuration structure of a Connection EndPoint. More...

Data Fields

Ucs_Rm_EndPointType_t endpoint_type
Type of the endpoint object.
Ucs_Xrm_ResObject_t ** jobs_list_ptr
Reference to a job list.
Ucs_Rm_Node_t * node_obj_ptr
Reference to a node object.
Ucs_Rm_EndPointInt_t internal_infos
Internal information of this endpoint object.

Detailed Description

Configuration structure of a Connection EndPoint.


UNICENS: Ucs_Rm_EndPoint_t::endpoint_type

  • Ucs_Rm_EndPoint_t
endpoint_type
internal_infos
jobs_list_ptr
node_obj_ptr
Ucs_Rm_EndPointType_t endpoint_type

Type of the endpoint object.


UNICENS: Ucs_Rm_EndPoint_t::internal_infos

  • Ucs_Rm_EndPoint_t
endpoint_type
internal_infos
jobs_list_ptr
node_obj_ptr
Ucs_Rm_EndPointInt_t internal_infos

Internal information of this endpoint object.


UNICENS: Ucs_Rm_EndPoint_t::jobs_list_ptr

  • Ucs_Rm_EndPoint_t
endpoint_type
internal_infos
jobs_list_ptr
node_obj_ptr
Ucs_Xrm_ResObject_t** jobs_list_ptr

Reference to a job list.


UNICENS: Ucs_Rm_EndPoint_t::node_obj_ptr

  • Ucs_Rm_EndPoint_t
endpoint_type
internal_infos
jobs_list_ptr
node_obj_ptr
Ucs_Rm_Node_t* node_obj_ptr

Reference to a node object.


UNICENS: Ucs_Rm_Route_t Struct Reference

Data Fields
Ucs_Rm_Route_t Struct Reference
Referred Types

Configuration structure of a Route. More...

Data Fields

Ucs_Rm_EndPoint_t * source_endpoint_ptr
Reference to a Source Endpoint object.
Ucs_Rm_EndPoint_t * sink_endpoint_ptr
Reference to a Sink Endpoint object.
uint8_t | active
Route activity. Specifies whether the route is active yet or not.
uint16_t | route_id
User-defined route identifier.
Ucs_Rm_RouteInt_t | internal_infos
Internal information of the route object.

Detailed Description

Configuration structure of a Route.


UNICENS: Ucs_Rm_Route_t::active

  • Ucs_Rm_Route_t
active
internal_infos
route_id
sink_endpoint_ptr
source_endpoint_ptr
uint8_t active

Route activity. Specifies whether the route is active yet or not.


UNICENS: Ucs_Rm_Route_t::internal_infos

  • Ucs_Rm_Route_t
active
internal_infos
route_id
sink_endpoint_ptr
source_endpoint_ptr
Ucs_Rm_RouteInt_t internal_infos

Internal information of the route object.


UNICENS: Ucs_Rm_Route_t::route_id

  • Ucs_Rm_Route_t
active
internal_infos
route_id
sink_endpoint_ptr
source_endpoint_ptr
uint16_t route_id

User-defined route identifier.


UNICENS: Ucs_Rm_Route_t::sink_endpoint_ptr

  • Ucs_Rm_Route_t
active
internal_infos
route_id
sink_endpoint_ptr
source_endpoint_ptr
Ucs_Rm_EndPoint_t* sink_endpoint_ptr

Reference to a Sink Endpoint object.


UNICENS: Ucs_Rm_Route_t::source_endpoint_ptr

  • Ucs_Rm_Route_t
active
internal_infos
route_id
sink_endpoint_ptr
source_endpoint_ptr
Ucs_Rm_EndPoint_t* source_endpoint_ptr

Reference to a Source Endpoint object.


UNICENS: Ucs_Rm_EndPointType_t

  • Referred Types
Ucs_Rm_EndPointType_t
Ucs_Rm_RouteInfos_t
enum Ucs_Rm_EndPointType_t

This enumerator specifies the type of an EndPoint object.

Enumerator:
UCS_RM_EP_SOURCE

Specifies the source endpoint.

UCS_RM_EP_SINK

Specifies the sink endpoint.


UNICENS: Ucs_Rm_RouteInfos_t

  • Referred Types
Ucs_Rm_EndPointType_t
Ucs_Rm_RouteInfos_t
enum Ucs_Rm_RouteInfos_t

This enumerator specifies the possible route information returned via User callback function of Ucs_Rm_Start().

Enumerator:
UCS_RM_ROUTE_INFOS_BUILT

Specifies that the route has been built.

UCS_RM_ROUTE_INFOS_DESTROYED

Specifies that the route has been destroyed.

UCS_RM_ROUTE_INFOS_SUSPENDED

Specifies that the route has been suspended.

UCS_RM_ROUTE_INFOS_PROCESS_STOP

Specifies that the route cannot be processed anymore because of UNICENS Termination.


UNICENS: Ucs_Rm_InitData_t Struct Reference

Data Fields
Ucs_Rm_InitData_t Struct Reference
Routing Management

The initialization structure of the Routing Management. More...

Data Fields

Ucs_Xrm_InitData_t xrm
Initialization structure of the Extended Resource Manager.
Ucs_Rm_ReportCb_t report_fptr
Optional report callback function pointer for all routes.
Ucs_Rm_XrmResDebugCb_t debug_resource_status_fptr
Callback function that acts as a debug interface for XRM resources. The user application has the possibility to monitor the specified XRM resources.

Detailed Description

The initialization structure of the Routing Management.


UNICENS: Ucs_Rm_InitData_t::debug_resource_status_fptr

  • Ucs_Rm_InitData_t
debug_resource_status_fptr
report_fptr
xrm
Ucs_Rm_XrmResDebugCb_t debug_resource_status_fptr

Callback function that acts as a debug interface for XRM resources. The user application has the possibility to monitor the specified XRM resources.

Example

Ucs_InitData_t ucs_init_data;
(void)Ucs_SetDefaultConfig(&ucs_init_data);
// Routing Management init section.
ucs_init_data.rm.debug_resource_status_fptr = &App_OnDebuggingXrmResources;
// Debug interface for the XRM resources
void App_OnDebuggingXrmResources (Ucs_Xrm_ResourceType_t resource_type, Ucs_Xrm_ResObject_t *resource_ptr, Ucs_Xrm_ResourceInfos_t resource_infos, Ucs_Rm_EndPoint_t * endpoint_inst_ptr, void *user_ptr)
{
switch (resource_infos)
{
case UCS_XRM_INFOS_BUILT:
// Resource has been built
break;
case UCS_XRM_INFOS_DESTROYED:
// resource has been destroyed
break;
case UCS_XRM_INFOS_ERR_BUILT:
//Resource cannot be built
break;
default:
// Resource cannot be destroyed
break;
}
}


UNICENS: Ucs_Rm_InitData_t::report_fptr

  • Ucs_Rm_InitData_t
debug_resource_status_fptr
report_fptr
xrm
Ucs_Rm_ReportCb_t report_fptr

Optional report callback function pointer for all routes.

Note
The passed result callback function does not only report the result of the build operation but also monitors the status of the created routes during their whole lifetime. That is, the callback function also reports the various states of a route (Refer to Ucs_Rm_RouteInfos_t for more infos). Furthermore the result of Ucs_Rm_SetRouteActive() function call is reported by this result callback function.

Example

Ucs_InitData_t ucs_init_data;
(void)Ucs_SetDefaultConfig(&ucs_init_data);
// Routing Management init section.
ucs_init_data.rm.report_fptr = &App_OnRoutingResult;
// The report callback function for all routes
static void App_OnRoutingResult(uint16_t route_id, Ucs_Rm_RouteInfos_t route_infos, void *user_ptr)
{
// Do whatever is necessary here
switch (route_infos)
{
case UCS_RM_ROUTE_INFOS_BUILT:
// Route has been built
break;
case UCS_RM_ROUTE_INFOS_DESTROYED:
// Route has been destroyed
break;
case UCS_RM_ROUTE_INFOS_PROCESS_STOP:
// Route cannot be processed anymore due to UNICENS Termination
break;
default:
// Route has been suspended
break;
}
}


UNICENS: Ucs_Rm_InitData_t::xrm

  • Ucs_Rm_InitData_t
debug_resource_status_fptr
report_fptr
xrm
Ucs_Xrm_InitData_t xrm

Initialization structure of the Extended Resource Manager.

Example

Ucs_InitData_t ucs_init_data;
(void)Ucs_SetDefaultConfig(&ucs_init_data);
// Routing Management init section.
ucs_init_data.rm.xrm.most_port_status_fptr = &App_MostPortStatusCb;
ucs_init_data.rm.xrm.check_unmute_fptr = &App_CheckUnmuteStatusCb;
ucs_init_data.rm.xrm.debug_resource_status_fptr = &App_OnDebuggingXrmResources;
// Handle MOST Port Status event here
void App_MostPortStatusCb(uint16_t most_port_handle,
Ucs_Most_PortAvail_t availability,
Ucs_Most_PortAvailInfo_t avail_info,
uint16_t free_streaming_bw)
{
// Do what needs to be..
}
// Handle the Mute Pin check here
void App_CheckUnmuteStatusCb (uint16_t node_address)
{
// Check the state of the mute pin here before unmuting
}
// Debug interface for the XRM resources
void App_OnDebuggingXrmResources (Ucs_Xrm_ResourceType_t resource_type, Ucs_Xrm_ResObject_t *resource_ptr, Ucs_Xrm_ResourceInfos_t resource_infos, void *user_ptr)
{
switch (resource_infos)
{
case UCS_XRM_INFOS_BUILT:
// Resource has been built
break;
case UCS_XRM_INFOS_DESTROYED:
// resource has been destroyed
break;
case UCS_XRM_INFOS_ERR_BUILT:
//Resource cannot be built
break;
default:
// Resource cannot be destroyed
break;
}
}


UNICENS: Ucs_Rm_ReportCb_t

  • Routing Management
Ucs_Rm_GetAttachedRoutes
Ucs_Rm_GetConnectionLabel
Ucs_Rm_GetNodeAvailable
Ucs_Rm_ReportCb_t
Ucs_Rm_SetNodeAvailable
Ucs_Rm_SetRouteActive
Ucs_Rm_Start
Ucs_Rm_XrmResDebugCb_t
typedef void(* Ucs_Rm_ReportCb_t)(Ucs_Rm_Route_t *route_ptr, Ucs_Rm_RouteInfos_t route_infos, void *user_ptr)

Function signature used for the results and reports of the Routing Manager.

Parameters
route_ptr | Reference to the route to be looked for
route_infos | Information about the current route id.
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Rm_XrmResDebugCb_t

  • Routing Management
Ucs_Rm_GetAttachedRoutes
Ucs_Rm_GetConnectionLabel
Ucs_Rm_GetNodeAvailable
Ucs_Rm_ReportCb_t
Ucs_Rm_SetNodeAvailable
Ucs_Rm_SetRouteActive
Ucs_Rm_Start
Ucs_Rm_XrmResDebugCb_t
typedef void(* Ucs_Rm_XrmResDebugCb_t)(Ucs_Xrm_ResourceType_t resource_type, Ucs_Xrm_ResObject_t *resource_ptr, Ucs_Xrm_ResourceInfos_t resource_infos, Ucs_Rm_EndPoint_t *endpoint_inst_ptr, void *user_ptr)

Function signature used for monitoring the XRM resources.

Parameters
resource_type | The XRM resource type to be looked for
resource_ptr | Reference to the resource to be looked for
resource_infos | Resource information
endpoint_inst_ptr | Reference to the endpoint object that encapsulates the resource.
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Rm_GetAttachedRoutes

  • Routing Management
Ucs_Rm_GetAttachedRoutes
Ucs_Rm_GetConnectionLabel
Ucs_Rm_GetNodeAvailable
Ucs_Rm_ReportCb_t
Ucs_Rm_SetNodeAvailable
Ucs_Rm_SetRouteActive
Ucs_Rm_Start
Ucs_Rm_XrmResDebugCb_t
Ucs_Return_t Ucs_Rm_GetAttachedRoutes | ( | Ucs_Inst_t * | self,
 |  | Ucs_Rm_EndPoint_t * | ep_inst,
 |  | Ucs_Rm_Route_t * | ls_found_routes[],
 |  | uint16_t | ls_size
 | ) |  |

Retrieves the reference(s) of the route(s) currently attached to the given endpoint and stores It into the (external) table provided by user application.

Thus, User application should provide an external reference to an empty routes table where the potential routes will be stored. That is, user application is responsible to allocate enough space to store the found routes. Refer to the Note below for more details.

Parameters
self | The UNICENS instance pointer.
ep_inst | Reference to the endpoint instance to be looked for.
ls_found_routes | List to store references to the found routes. It should be allocated by user application.
ls_size | Size of the provided list.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | At least one parameter is NULL.
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized
Note
The function will add a NULL pointer to the external table (provided by user application) to mark the end of the found routes. This can be helpful when user application doesn't exactly known the number of routes referred to the endpoint. That is, User application should allocate enough space to store the found routes plus the NULL-terminated pointer. Otherwise, the number of associated routes found will precisely equal the size of the list.

Example

// Source and Sink Endpoints
static Ucs_Rm_EndPoint_t endpoint_src = { UCS_RM_EP_SOURCE, &xrm_job_out[0], &node_src };
static Ucs_Rm_EndPoint_t endpoint_sink_west = { UCS_RM_EP_SINK, &xrm_job_in_w[0], &node_west };
static Ucs_Rm_EndPoint_t endpoint_sink_east = { UCS_RM_EP_SINK, &xrm_job_in_e[0], &node_east };
// Routes Specification
static Ucs_Rm_Route_t route_66_west[] = { {&endpoint_src, &endpoint_sink_west, is_active, 0x066U} };
static Ucs_Rm_Route_t route_66_east[] = { {&endpoint_src, &endpoint_sink_east, is_active, 0xE66U} };
// Main function
void main(uint8_t argc, char *argv[])
{
Ucs_Rm_Route_t * found_routes_ls[3];
Ucs_Return_t ret_value;
// Starts routes processing
(void)Ucs_Rm_Start(ucs_inst_ptr, &routes_list[0], routes_list_size);
// ...
// Retrieve routes references to the given endpoint
ret_value = Ucs_Rm_GetAttachedRoutes(ucs_inst_ptr, &endpoint_src, found_routes_ls, 3U);
if (ret_value == UCS_RET_SUCCESS)
{
uint8_t k = 0U;
//printf("\rEp{0x%X}: Related route id(s) --> ", &endpoint_src);
do
{
//printf("{0x%X} ", found_routes_ls[k]->route_id);
k++;
} while ((k < 3U) && (found_routes_ls[k] != NULL));
//printf("\r\n");
}
else
{
// Do whatever is necessary to be done
}
}


UNICENS: Ucs_Rm_GetConnectionLabel

  • Routing Management
Ucs_Rm_GetAttachedRoutes
Ucs_Rm_GetConnectionLabel
Ucs_Rm_GetNodeAvailable
Ucs_Rm_ReportCb_t
Ucs_Rm_SetNodeAvailable
Ucs_Rm_SetRouteActive
Ucs_Rm_Start
Ucs_Rm_XrmResDebugCb_t
uint16_t Ucs_Rm_GetConnectionLabel | ( | Ucs_Inst_t * | self,
 |  | Ucs_Rm_Route_t * | route_ptr
 | ) |  |

Retrieves the ConnectionLabel of the given route.

Parameters
self | The UNICENS instance pointer.
route_ptr | Reference to the route to be looked for.
Returns
The ConnectionLabel of the route. The ConnectionLabel value falls within the range [0x000C...0x017F] when route is built. Otherwise, 0 is returned.

Example

// Source and Sink Endpoints
static Ucs_Rm_EndPoint_t endpoint_src = { UCS_RM_EP_SOURCE, &xrm_job_out[0], &node_src };
static Ucs_Rm_EndPoint_t endpoint_sink = { UCS_RM_EP_SINK, &xrm_job_in[0], &node_sink };
// Routes Specification
static Ucs_Rm_Route_t route_66[] = { {&endpoint_src, &endpoint_sink, is_active, 0x066U} };
// Main function
void main(uint8_t argc, char *argv[])
{
uint16_t rt66_cl;
bool rt66_is_built;
// Starts routes processing
(void)Ucs_Rm_Start(ucs_inst_ptr, &route_66[0], 1U);
// ...
// Retrieve "ConnectionLabel" of route_66.
if (rt66_is_built)
{
rt66_cl = Ucs_Rm_GetConnectionLabel(ucs_inst_ptr, &route_66[0]);
//printf("CL:route_0x%02X --> {0x%X}\r\n", (&route_66[0])->route_id, rt66_cl);
}
}


UNICENS: Ucs_Rm_GetNodeAvailable

  • Routing Management
Ucs_Rm_GetAttachedRoutes
Ucs_Rm_GetConnectionLabel
Ucs_Rm_GetNodeAvailable
Ucs_Rm_ReportCb_t
Ucs_Rm_SetNodeAvailable
Ucs_Rm_SetRouteActive
Ucs_Rm_Start
Ucs_Rm_XrmResDebugCb_t
bool Ucs_Rm_GetNodeAvailable | ( | Ucs_Inst_t * | self,
 |  | Ucs_Rm_Node_t * | node_ptr
 | ) |  |

Retrieves the "available" flag information of the given node.

This function can be used to check whether the given node has been set to "available" or "not available".

Parameters
self | The UNICENS instance pointer.
node_ptr | Reference to the node to be looked for.
Returns
The "availability" flag of the given node.

Example

// Main function
void main(uint8_t argc, char *argv[])
{
// ...
if (Ucs_Rm_GetNodeAvailable(ucs_inst_ptr, &slim_mic_node))
{
// Do whatever is necessary to be done
}
}


UNICENS: Ucs_Rm_SetNodeAvailable

  • Routing Management
Ucs_Rm_GetAttachedRoutes
Ucs_Rm_GetConnectionLabel
Ucs_Rm_GetNodeAvailable
Ucs_Rm_ReportCb_t
Ucs_Rm_SetNodeAvailable
Ucs_Rm_SetRouteActive
Ucs_Rm_Start
Ucs_Rm_XrmResDebugCb_t
Ucs_Return_t Ucs_Rm_SetNodeAvailable | ( | Ucs_Inst_t * | self,
 |  | Ucs_Rm_Node_t * | node_ptr,
 |  | bool | available
 | ) |  |

Sets the availability attribute (available or not available) of the given node and triggers the routing process to handle attached route(s).

In case of available the function starts the routing process that checks whether there are endpoints to build on this node. In case of unavailable the function informs sub modules like XRM to check whether there are resources to release and simultaneously unlock suspended routes that link to this node.

Parameters
self | The UNICENS instance
node_ptr | Reference to the node to be looked for.
available | Specifies whether the node is available or not
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_ALREADY_SET | Node is already set to "available" or "not available"
UCS_RET_ERR_PARAM | At least one parameter is NULL.
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized
UCS_RET_ERR_NOT_AVAILABLE | The function cannot be processed because the network is not available
Note
All nodes present in the routing system will be automatically set to Unavailable after the network has been shutdown respectively after transition from Available to Not available. This in turn means that the user has to set the corresponding nodes to Available after network started up respectively after the network transition from NotAvailable to Available.

Example

// Sets the amplifier node to "available" or "not available"
static void App_SetAmplNodeAvailability(bool available)
{
Ucs_Return_t ret_value;
ret_value = Ucs_Rm_SetNodeAvailable(ucs_inst_ptr, &ampl_node, available);
if (ret_value != UCS_RET_SUCCESS)
{
// Do whatever is necessary here
}
}
// Main function
void main(uint8_t argc, char *argv[])
{
// ...
if (amplifier_programming_completed)
{
App_SetAmplNodeAvailability(true);
}
// ...
if (amplifier_is_unavailable)
{
App_SetAmplNodeAvailability(false);
}
}


UNICENS: Ucs_Rm_SetRouteActive

  • Routing Management
Ucs_Rm_GetAttachedRoutes
Ucs_Rm_GetConnectionLabel
Ucs_Rm_GetNodeAvailable
Ucs_Rm_ReportCb_t
Ucs_Rm_SetNodeAvailable
Ucs_Rm_SetRouteActive
Ucs_Rm_Start
Ucs_Rm_XrmResDebugCb_t
Ucs_Return_t Ucs_Rm_SetRouteActive | ( | Ucs_Inst_t * | self,
 |  | Ucs_Rm_Route_t * | route_ptr,
 |  | bool | active
 | ) |  |

Sets the given route to active respectively inactive and triggers the routing process to handle the route.

When setting a route to active the routing process will start building the route and all related resources and return the result to the user callback function (Refer to Routing Management Init Structure). When setting a route to inactive the routing process will start destroying the route and all related resources and return the result to the user callback function.

Parameters
self | The UNICENS instance.
route_ptr | Reference to the routes to be destroyed.
active | Specifies whether the route should be activated or not. true is active and false inactive.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | At least one parameter is NULL.
UCS_RET_ERR_ALREADY_SET | The given route is already active or inactive
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized
Note
The build up or the destruction of a route can take some times in case the routing process may need to perform retries when uncritical errors occur (e.g.: transmission error, processing error, etc.) or when certain conditions are not met yet (e.g. network not available, node not available, etc.). By the way, the maximum number of retries is 0xFF and the minimum time between the retries is 50ms. This results in a minimum time of ca. 13s to get a route built or suspended (if the maximum retries are reached).
Attention
To suit your specific system needs and setup, change the default values of the following Resources Management macros:
  • UCS_NUM_REMOTE_DEVICES in ucs_cfg.h
  • UCS_XRM_NUM_JOBS in ucs_xrm_cfg.h
  • UCS_XRM_NUM_RESOURCES in ucs_xrm_cfg.h
Use the UCS_ADDR_LOCAL_DEV macro to address the local device when specifying connection routes to or from this device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV

Example

// The report callback function for all routes
static void App_OnRoutingResult(uint16_t route_id, Ucs_Rm_RouteInfos_t route_infos, void *user_ptr)
{
// Print whatever needs to be printed here
}
// Activates or deactivates the route with Index 2 of the routes list.
static void App_SetRouteId2_OnOff(bool active)
{
Ucs_Return_t ret_value;
ret_value = Ucs_Rm_SetRouteActive(ucs_inst_ptr, &routes_list[2], active);
if (ret_value != UCS_RET_SUCCESS)
{
// Do whatever is necessary
}
}
// Main function
void main(uint8_t argc, char *argv[])
{
// Starts routes processing
Ucs_Rm_Start(ucs_inst_ptr, &routes_list[0], routes_list_size);
// ...
if (mic2_btn_pressed)
{
App_SetRouteId2_OnOff(true);
}
else
{
App_SetRouteId2_OnOff(false);
}
}


UNICENS: Ucs_Rm_Start

  • Routing Management
Ucs_Rm_GetAttachedRoutes
Ucs_Rm_GetConnectionLabel
Ucs_Rm_GetNodeAvailable
Ucs_Rm_ReportCb_t
Ucs_Rm_SetNodeAvailable
Ucs_Rm_SetRouteActive
Ucs_Rm_Start
Ucs_Rm_XrmResDebugCb_t
Ucs_Return_t Ucs_Rm_Start | ( | Ucs_Inst_t * | self,
 |  | Ucs_Rm_Route_t * | routes_list,
 |  | uint16_t | list_size
 | ) |  |

Initializes the routing process with the given routes list information and starts the process to handle the route(s).

When calling this function the routing management will be initialized and the process to handle the given routes list started. The result of each route is reported via the reference to the user callback function report_fptr in Ucs_InitData_t (if It has been set by user).

Parameters
self | The UNICENS instance pointer.
routes_list | List of routes to be handled.
list_size | Size of the given routes list.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | At least one parameter is NULL
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized
Note
This function must be called once and can only be called once. Otherwise, the function returns the error code UCS_RET_ERR_API_LOCKED.
The build up of routes can take some times in case the routing process may need to perform retries when uncritical errors occur (e.g.: transmission error, processing error, etc.) or when certain conditions are not met yet (e.g. network not available, node not available, etc.). By the way, the maximum number of retries is 0xFF and the minimum time between the retries is 50ms.
Attention
To suit your specific system needs and setup, change the default values of the following Resources Management macros:
  • UCS_NUM_REMOTE_DEVICES in ucs_cfg.h
  • UCS_XRM_NUM_JOBS in ucs_xrm_cfg.h
  • UCS_XRM_NUM_RESOURCES in ucs_xrm_cfg.h
Use the UCS_ADDR_LOCAL_DEV macro to address the local device when specifying connection routes to or from this device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV

Example

// Forward declaration of result callback function
static void App_OnRoutingResult(uint16_t route_id, Ucs_Rm_RouteInfos_t route_infos, void *user_ptr);
// Set route Activity Flag
static uint8_t is_active = 0x01U;
// XRM jobs lists
static Ucs_Xrm_ResObject_t * xrm_job_out[] = { &Xrm_Most_Sckt_Out, &Xrm_Usb_Port_1, &Xrm_Usb_Sckt_In, &Xrm_Sync_Conn_1, NULL };
static Ucs_Xrm_ResObject_t * xrm_job_in [] = { &Xrm_Most_Sckt_In, &Xrm_Usb_Port_2, &Xrm_Usb_Sckt_Out, &Xrm_Sync_Conn_2, NULL };
// Signatures specification
Ucs_Signature_t src_sig = { 0x555U };
Ucs_Signature_t sink_sig = { 0x556U };
// Nodes objects
static Ucs_Rm_Node_t node_src = { &src_sig };
static Ucs_Rm_Node_t node_sink = { &sink_sig };
// Source and Sink Endpoints
static Ucs_Rm_EndPoint_t endpoint_src = { UCS_RM_EP_SOURCE, &xrm_job_out[0], &node_src };
static Ucs_Rm_EndPoint_t endpoint_sink = { UCS_RM_EP_SINK, &xrm_job_in[0], &node_sink };
// Routes Specification
static Ucs_Rm_Route_t route_66[] = { {&endpoint_src, &endpoint_sink, is_active, 66U} };
// Main function
void main ()
{
Ucs_InitData_t ucs_init_data;
(void)Ucs_SetDefaultConfig(&ucs_init_data);
ucs_init_data.rm.report_fptr = &App_OnRoutingResult;
// Starts routes processing
Ucs_Return_t ret_value = Ucs_Rm_Start(ucs_inst_ptr, &route_66[0], 1U);
if (ret_value != UCS_RET_SUCCESS)
{
// Do whatever is necessary here
}
// Set corresponding Nodes to "available" if they are ready
// (void)Ucs_Rm_SetNodeAvailable(ucs_inst_ptr, &node_src, true);
// (void)Ucs_Rm_SetNodeAvailable(ucs_inst_ptr, &node_sink, true);
}
// The report callback function for all routes
static void App_OnRoutingResult(Ucs_Rm_Route_t* route_ptr, Ucs_Rm_RouteInfos_t route_infos, void *user_ptr)
{
// Do whatever is necessary here
switch (route_infos)
{
case UCS_RM_ROUTE_INFOS_BUILT:
// Route has been built
break;
case UCS_RM_ROUTE_INFOS_DESTROYED:
// Route has been destroyed
break;
case UCS_RM_ROUTE_INFOS_PROCESS_STOP:
// Route cannot be processed anymore due to UNICENS Termination
break;
default:
// Route has been suspended.
break;
}
}


UNICENS: Node Scripting

Data Structures | Callback Functions | Enumerations | Functions
Node Scripting

Provides service function to allow execution of custom scripts in remote Nodes. More...

Data Structures

struct | Ucs_Ns_ConfigMsg_t
Structure of a ConfigMsg used in Node-Script. More...
struct | Ucs_Ns_Script_t
Structure of a node-script used to configure a remote node. More...

Callback Functions

typedef void(* Ucs_Ns_ResultCb_t )(Ucs_Rm_Node_t *node_ptr, Ucs_Ns_ResultCode_t result, void *ucs_user_ptr)
Function signature used for the results of the Scripting Manager.

Enumerations

enum Ucs_Ns_ResultCode_t {
UCS_NS_RES_SUCCESS = 0x00U,
UCS_NS_RES_ERROR = 0x01U
}
Result codes of the Node Script Management. More...

Functions

Ucs_Return_t Ucs_Ns_Run (Ucs_Inst_t *self, Ucs_Rm_Node_t *node_ptr, Ucs_Ns_ResultCb_t result_fptr)
Runs the script(s) contained in the given node.

Detailed Description

Provides service function to allow execution of custom scripts in remote Nodes.


UNICENS: Ucs_Ns_ConfigMsg_t Struct Reference

Data Fields
Ucs_Ns_ConfigMsg_t Struct Reference
Node Scripting

Structure of a ConfigMsg used in Node-Script. More...

Data Fields

uint8_t | FBlockId
FBlockId of the config msg.
uint8_t | InstId
InstId of the config msg.
uint16_t | FunktId
FunktId of the config msg.
uint8_t | OpCode
OpCode of the config msg.
uint8_t | DataLen
Data length.
uint8_t * | DataPtr
Reference to the Data.

Detailed Description

Structure of a ConfigMsg used in Node-Script.


UNICENS: Ucs_Ns_ConfigMsg_t::DataLen

  • Ucs_Ns_ConfigMsg_t
DataLen
DataPtr
FBlockId
FunktId
InstId
OpCode
uint8_t DataLen

Data length.


UNICENS: Ucs_Ns_ConfigMsg_t::DataPtr

  • Ucs_Ns_ConfigMsg_t
DataLen
DataPtr
FBlockId
FunktId
InstId
OpCode
uint8_t* DataPtr

Reference to the Data.


UNICENS: Ucs_Ns_ConfigMsg_t::FBlockId

  • Ucs_Ns_ConfigMsg_t
DataLen
DataPtr
FBlockId
FunktId
InstId
OpCode
uint8_t FBlockId

FBlockId of the config msg.


UNICENS: Ucs_Ns_ConfigMsg_t::FunktId

  • Ucs_Ns_ConfigMsg_t
DataLen
DataPtr
FBlockId
FunktId
InstId
OpCode
uint16_t FunktId

FunktId of the config msg.


UNICENS: Ucs_Ns_ConfigMsg_t::InstId

  • Ucs_Ns_ConfigMsg_t
DataLen
DataPtr
FBlockId
FunktId
InstId
OpCode
uint8_t InstId

InstId of the config msg.


UNICENS: Ucs_Ns_ConfigMsg_t::OpCode

  • Ucs_Ns_ConfigMsg_t
DataLen
DataPtr
FBlockId
FunktId
InstId
OpCode
uint8_t OpCode

OpCode of the config msg.


UNICENS: Ucs_Ns_Script_t Struct Reference

Data Fields
Ucs_Ns_Script_t Struct Reference
Node Scripting

Structure of a node-script used to configure a remote node. More...

Data Fields

uint16_t pause
Specifies the pause which shall be set before sending the configuration message.
Ucs_Ns_ConfigMsg_t * send_cmd
Command to be transmitted.
Ucs_Ns_ConfigMsg_t * exp_result
Expected result.

Detailed Description

Structure of a node-script used to configure a remote node.

Attention
The Node Scripting module is designed and intended for the use of I2C and GPIO commands only. That is, using the Scripting for any other FBlock INIC commands (for example MOST, MediaLB, USB, Streaming, Connections, etc.) is expressly prohibited.


UNICENS: Ucs_Ns_Script_t::exp_result

  • Ucs_Ns_Script_t
exp_result
pause
send_cmd
Ucs_Ns_ConfigMsg_t* exp_result

Expected result.


UNICENS: Ucs_Ns_Script_t::pause

  • Ucs_Ns_Script_t
exp_result
pause
send_cmd
uint16_t pause

Specifies the pause which shall be set before sending the configuration message.


UNICENS: Ucs_Ns_Script_t::send_cmd

  • Ucs_Ns_Script_t
exp_result
pause
send_cmd
Ucs_Ns_ConfigMsg_t* send_cmd

Command to be transmitted.


UNICENS: Ucs_Ns_ResultCb_t

  • Node Scripting
Ucs_Ns_ResultCb_t
Ucs_Ns_ResultCode_t
Ucs_Ns_Run
typedef void(* Ucs_Ns_ResultCb_t)(Ucs_Rm_Node_t *node_ptr, Ucs_Ns_ResultCode_t result, void *ucs_user_ptr)

Function signature used for the results of the Scripting Manager.

Parameters
node_ptr | Reference to the node instance
result | Result of the scripting operation.
ucs_user_ptr | User reference for API callback functions.


UNICENS: Ucs_Ns_ResultCode_t

  • Node Scripting
Ucs_Ns_ResultCb_t
Ucs_Ns_ResultCode_t
Ucs_Ns_Run
enum Ucs_Ns_ResultCode_t

Result codes of the Node Script Management.

Enumerator:
UCS_NS_RES_SUCCESS

Transmission of script(s) was successful.

UCS_NS_RES_ERROR

Transmission of script(s) failed.


UNICENS: Ucs_Ns_Run

  • Node Scripting
Ucs_Ns_ResultCb_t
Ucs_Ns_ResultCode_t
Ucs_Ns_Run
Ucs_Return_t Ucs_Ns_Run | ( | Ucs_Inst_t * | self,
 |  | Ucs_Rm_Node_t * | node_ptr,
 |  | Ucs_Ns_ResultCb_t | result_fptr
 | ) |  |

Runs the script(s) contained in the given node.

The function starts the process to transmit the script(s) contained in the given node and checks for the expected results (specified by customer). The Node Scripting module will start a timer of 2600ms before sending the Tx command of each script. That is, if no incoming messages match the expected result of the script during this time the result code UCS_NS_RES_ERROR is returned via the Ucs_Ns_ResultCb_t user callback function. This error code is also get when the script module couldn't perform the device synchronization of the remote device. Otherwise, if an incoming message matches the expected result, UCS_NS_RES_SUCCESS is returned.
The function will return UCS_RET_ERR_API_LOCKED when attempting to execute a script in a node that is currently busy with other(s) previous script(s). Ucs_Ns_Run() is namely locked for a Node when running script(s) on this node and unlocked after reporting the operation's result. However processing scripts can be executed on different nodes in parallel.

Parameters
self | The UNICENS instance
node_ptr | Reference to the node instance.
result_fptr | Reference to the result function pointer
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_NOT_AVAILABLE No internal resources allocated for the given node.
Check if value of UCS_NUM_REMOTE_DEVICES is less than
the current number of remote devices in network.
UCS_RET_ERR_PARAM | At least one parameter is NULL.
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized
UCS_RET_ERR_BUFFER_OVERFLOW | No TxBuffer Handles available
UCS_RET_ERR_API_LOCKED | The API is locked.
Attention
The Node Scripting module is designed and intended for the use of I2C and GPIO commands only. That is, using the Scripting for any other FBlock INIC commands (for example MOST, MediaLB, USB, Streaming, Connections, etc.) is expressly prohibited.

Example

// Forward declaration of result callback function
static void App_OnScriptingResult(uint16_t node_address, Ucs_Ns_ResultCode_t result, void *user_ptr);
// Configuration Msg specification
static uint8_t tx_data [] = { 0x00, 0x40, 0x01, 0x01 };
static uint8_t rx_data [] = { 0x0F, 0x00 };
static Ucs_Ns_ConfigMsg_t tx_msg = { 0x00, 0x00, 0x6C1, 0x2, 4U, &tx_data };
static Ucs_Ns_ConfigMsg_t rx_msg = { 0x00, 0x01, 0x6C1, 0xC, 2U, &rx_data };
// Scripts specification
static Ucs_Ns_Script_t script_x = { 100U, &tx_msg, &rx_msg };
// Signature specification
Ucs_Signature_t sig_200 = { 200U };
// Nodes objects Specification
static Ucs_Rm_Node_t node_200 = { &sig_200, &script_x, 1U, 0U };
// Main function
void main(uint8_t argc, char *argv[])
{
// ...
if (node200_discovered)
{
(void)Ucs_Ns_Run(ucs_inst_ptr, &node_200, &App_OnScriptingResult);
}
// ...
}
// The result callback function
static void App_OnScriptingResult(Ucs_Rm_Node_t * node_ptr, Ucs_Ns_ResultCode_t result, void *user_ptr)
{
switch (result)
{
case UCS_NS_RES_SUCCESS:
// Node can be set to "Available" for example
Ucs_Rm_SetNodeAvailable(ucs_inst_ptr, node_ptr, true);
break;
case UCS_NS_RES_ERROR:
default:
// Do whatever is necessary here
break;
}
}


UNICENS: Peripheral Bus Interface

Topics
Peripheral Bus Interface

Provides service functions to manage data communication over the peripheral bus interfaces I2C and GPIO. More...

Topics

GPIO
Provides service functions to handle data communication over GPIO.
I2C
Provides service functions to handle data communication over I2C.

Detailed Description

Provides service functions to manage data communication over the peripheral bus interfaces I2C and GPIO.


UNICENS: GPIO

Topics | Data Structures | Functions
GPIO
Peripheral Bus Interface

Provides service functions to handle data communication over GPIO. More...

Topics

GPIO Referred Types
Referred types used by the Extended Resource Manager.

Data Structures

struct Ucs_Gpio_InitData_t
The initialization structure of the GPIO Module. More...

Functions

Ucs_Return_t | Ucs_Gpio_CreatePort (Ucs_Inst_t *self, uint16_t destination_address, uint8_t index, uint16_t debounce_time, Ucs_Gpio_CreatePortResCb_t result_fptr)
Creates the GPIO port with its associated port instance identifier.
Ucs_Return_t | Ucs_Gpio_SetPinMode (Ucs_Inst_t *self, uint16_t destination_address, uint16_t gpio_port_handle, uint8_t pin, Ucs_Gpio_PinMode_t mode, Ucs_Gpio_ConfigPinModeResCb_t result_fptr)
Configures the pin mode of the given GPIO port.
Ucs_Return_t | Ucs_Gpio_GetPinMode (Ucs_Inst_t *self, uint16_t destination_address, uint16_t gpio_port_handle, Ucs_Gpio_ConfigPinModeResCb_t result_fptr)
Retrieves the pin mode configuration of the given GPIO port.
Ucs_Return_t | Ucs_Gpio_WritePort (Ucs_Inst_t *self, uint16_t destination_address, uint16_t gpio_port_handle, uint16_t mask, uint16_t data, Ucs_Gpio_PinStateResCb_t result_fptr)
Writes data to the given GPIO port.
Ucs_Return_t | Ucs_Gpio_ReadPort (Ucs_Inst_t *self, uint16_t destination_address, uint16_t gpio_port_handle, Ucs_Gpio_PinStateResCb_t result_fptr)
Reads the pin state of the given GPIO port.

Detailed Description

Provides service functions to handle data communication over GPIO.


UNICENS: GPIO Referred Types

Data Structures | Callback Functions | Enumerations
GPIO Referred Types
GPIO

Referred types used by the Extended Resource Manager. More...

Data Structures

struct | Ucs_Gpio_ResultDetails_t
Detailed information used for GPIO results. More...
struct | Ucs_Gpio_Result_t
Result structure of the GPIO Module. More...

Callback Functions

typedef void(* | Ucs_Gpio_CreatePortResCb_t )(uint16_t node_address, uint16_t gpio_port_handle, Ucs_Gpio_Result_t result, void *user_ptr)
Function signature of result callback used by Ucs_Gpio_CreatePort()
typedef void(* | Ucs_Gpio_ConfigPinModeResCb_t )(uint16_t node_address, uint16_t gpio_port_handle, Ucs_Gpio_PinConfiguration_t pin_cfg_list[], uint8_t list_sz, Ucs_Gpio_Result_t result, void *user_ptr)
Function signature of result callback used by Ucs_Gpio_SetPinMode() and Ucs_Gpio_GetPinMode().
typedef void(* | Ucs_Gpio_PinStateResCb_t )(uint16_t node_address, uint16_t gpio_port_handle, uint16_t current_state, uint16_t sticky_state, Ucs_Gpio_Result_t result, void *user_ptr)
Function signature of result callback used by Ucs_Gpio_WritePort() and Ucs_Gpio_ReadPort().
typedef void(* | Ucs_Gpio_TriggerEventResultCb_t )(uint16_t node_address, uint16_t gpio_port_handle, uint16_t rising_edges, uint16_t falling_edges, uint16_t levels, void *user_ptr)
Function signature of result callback used by Gpio_TriggerEvents()

Enumerations

enum Ucs_Gpio_PinMode_t {
UCS_GPIO_UNAVAILABLE = 0x00U,
UCS_GPIO_UNUSED = 0x01U,
UCS_GPIO_INPUT = 0x10U,
UCS_GPIO_IN_STICKY_HL = 0x11U,
UCS_GPIO_IN_STICKY_LL = 0x12U,
UCS_GPIO_IN_TRIGGER_RE = 0x13U,
UCS_GPIO_IN_TRIGGER_FE = 0x14U,
UCS_GPIO_IN_TRIGGER_HL = 0x16U,
UCS_GPIO_IN_TRIGGER_LL = 0x17U,
UCS_GPIO_IN_DEBOUNCED = 0x30U,
UCS_GPIO_IN_DB_TRIGGER_RE = 0x33U,
UCS_GPIO_IN_DB_TRIGGER_FE = 0x34U,
UCS_GPIO_IN_DB_TRIGGER_HL = 0x36U,
UCS_GPIO_IN_DB_TRIGGER_LL = 0x37U,
UCS_GPIO_OUT_DEFAULT_LOW = 0x40U,
UCS_GPIO_OUT_DEFAULT_HIGH = 0x41U,
UCS_GPIO_OUT_OPEN_DRAIN = 0x50U,
UCS_GPIO_OUT_OD_TRIGGER_RE = 0x53U,
UCS_GPIO_OUT_OD_TRIGGER_FE = 0x54U,
UCS_GPIO_OUT_OD_TRIGGER_HL = 0x56U,
UCS_GPIO_OUT_OD_TRIGGER_LL = 0x57U
}
The mode of the GPIO pin. More...
enum Ucs_Gpio_ResultCode_t {
UCS_GPIO_RES_SUCCESS = 0x00U,
UCS_GPIO_RES_ERR_CMD = 0x01U,
UCS_GPIO_RES_ERR_SYNC = 0x02U
}
Result codes of the GPIO Module. More...
enum Ucs_Gpio_ResultType_t {
UCS_GPIO_RESULT_TYPE_TGT = 0x00U,
UCS_GPIO_RESULT_TYPE_TX = 0x01U
}
This enumerator specifies the kind of result - Target or Transmission. More...

Detailed Description

Referred types used by the Extended Resource Manager.


UNICENS: Ucs_Gpio_ResultDetails_t Struct Reference

Data Fields
Ucs_Gpio_ResultDetails_t Struct Reference
GPIO Referred Types

Detailed information used for GPIO results. More...

Data Fields

Ucs_Gpio_ResultType_t result_type
Specifies the type of the current asynchronous result.
Ucs_MsgTxStatus_t tx_result
Holds the status of the transmission.
Ucs_StdResult_t inic_result
Holds the results of the target device.

Detailed Description

Detailed information used for GPIO results.


UNICENS: Ucs_Gpio_ResultDetails_t::inic_result

  • Ucs_Gpio_ResultDetails_t
inic_result
result_type
tx_result
Ucs_StdResult_t inic_result

Holds the results of the target device.


UNICENS: Ucs_Gpio_ResultDetails_t::result_type

  • Ucs_Gpio_ResultDetails_t
inic_result
result_type
tx_result
Ucs_Gpio_ResultType_t result_type

Specifies the type of the current asynchronous result.

The following briefly describes the different types of results available:

  • UCS_GPIO_RESULT_TYPE_TGT: target results, typically INIC function-specific error found on target device.
    Refer to inic_result to get the detailed information.
  • UCS_GPIO_RESULT_TYPE_TX: transmission results, typically transmission error on the MOST network.
    Refer to tx_result to get the transmission information.


UNICENS: Ucs_Gpio_ResultDetails_t::tx_result

  • Ucs_Gpio_ResultDetails_t
inic_result
result_type
tx_result
Ucs_MsgTxStatus_t tx_result

Holds the status of the transmission.


UNICENS: Ucs_Gpio_Result_t Struct Reference

Data Fields
Ucs_Gpio_Result_t Struct Reference
GPIO Referred Types

Result structure of the GPIO Module. More...

Data Fields

Ucs_Gpio_ResultCode_t code
Result code.
Ucs_Gpio_ResultDetails_t details
Detailed information on the returned result.

Detailed Description

Result structure of the GPIO Module.


UNICENS: Ucs_Gpio_Result_t::code

  • Ucs_Gpio_Result_t
code
details
Ucs_Gpio_ResultCode_t code

Result code.


UNICENS: Ucs_Gpio_Result_t::details

  • Ucs_Gpio_Result_t
code
details
Ucs_Gpio_ResultDetails_t details

Detailed information on the returned result.


UNICENS: Ucs_Gpio_ConfigPinModeResCb_t

  • GPIO Referred Types
Ucs_Gpio_ConfigPinModeResCb_t
Ucs_Gpio_CreatePortResCb_t
Ucs_Gpio_PinMode_t
Ucs_Gpio_PinStateResCb_t
Ucs_Gpio_ResultCode_t
Ucs_Gpio_ResultType_t
Ucs_Gpio_TriggerEventResultCb_t
typedef void(* Ucs_Gpio_ConfigPinModeResCb_t)(uint16_t node_address, uint16_t gpio_port_handle, Ucs_Gpio_PinConfiguration_t pin_cfg_list[], uint8_t list_sz, Ucs_Gpio_Result_t result, void *user_ptr)

Function signature of result callback used by Ucs_Gpio_SetPinMode() and Ucs_Gpio_GetPinMode().

Parameters
node_address | The node address of the device from where the results come
gpio_port_handle | The port resource handle.
pin | The pin that has been configured.
mode | The mode of the GPIO pin.
result | The operation result
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Gpio_CreatePortResCb_t

  • GPIO Referred Types
Ucs_Gpio_ConfigPinModeResCb_t
Ucs_Gpio_CreatePortResCb_t
Ucs_Gpio_PinMode_t
Ucs_Gpio_PinStateResCb_t
Ucs_Gpio_ResultCode_t
Ucs_Gpio_ResultType_t
Ucs_Gpio_TriggerEventResultCb_t
typedef void(* Ucs_Gpio_CreatePortResCb_t)(uint16_t node_address, uint16_t gpio_port_handle, Ucs_Gpio_Result_t result, void *user_ptr)

Function signature of result callback used by Ucs_Gpio_CreatePort()

Parameters
node_address | The node address of the device from where the results come
gpio_port_handle | The port resource handle.
result | The operation result
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Gpio_PinStateResCb_t

  • GPIO Referred Types
Ucs_Gpio_ConfigPinModeResCb_t
Ucs_Gpio_CreatePortResCb_t
Ucs_Gpio_PinMode_t
Ucs_Gpio_PinStateResCb_t
Ucs_Gpio_ResultCode_t
Ucs_Gpio_ResultType_t
Ucs_Gpio_TriggerEventResultCb_t
typedef void(* Ucs_Gpio_PinStateResCb_t)(uint16_t node_address, uint16_t gpio_port_handle, uint16_t current_state, uint16_t sticky_state, Ucs_Gpio_Result_t result, void *user_ptr)

Function signature of result callback used by Ucs_Gpio_WritePort() and Ucs_Gpio_ReadPort().

Parameters
node_address | The node address of the device from where the results come
gpio_port_handle | The port resource handle.
current_state | The current state of the GPIO pin
sticky_state | The sticky state of all GPIO pins configured as sticky inputs.
result | The operation result
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Gpio_TriggerEventResultCb_t

  • GPIO Referred Types
Ucs_Gpio_ConfigPinModeResCb_t
Ucs_Gpio_CreatePortResCb_t
Ucs_Gpio_PinMode_t
Ucs_Gpio_PinStateResCb_t
Ucs_Gpio_ResultCode_t
Ucs_Gpio_ResultType_t
Ucs_Gpio_TriggerEventResultCb_t
typedef void(* Ucs_Gpio_TriggerEventResultCb_t)(uint16_t node_address, uint16_t gpio_port_handle, uint16_t rising_edges, uint16_t falling_edges, uint16_t levels, void *user_ptr)

Function signature of result callback used by Gpio_TriggerEvents()

Parameters
node_address | The node address of the device from where the results come
gpio_port_handle | The port resource handle.
rising_edges | The GPIO pins on which a rising-edge trigger condition was detected
falling_edges | The GPIO pins on which a falling-edge trigger condition was detected
levels | The GPIO pins on which a logic level condition was detected
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_Gpio_PinMode_t

  • GPIO Referred Types
Ucs_Gpio_ConfigPinModeResCb_t
Ucs_Gpio_CreatePortResCb_t
Ucs_Gpio_PinMode_t
Ucs_Gpio_PinStateResCb_t
Ucs_Gpio_ResultCode_t
Ucs_Gpio_ResultType_t
Ucs_Gpio_TriggerEventResultCb_t
enum Ucs_Gpio_PinMode_t

The mode of the GPIO pin.

Enumerator:
UCS_GPIO_UNAVAILABLE

Unavailable Mode.

UCS_GPIO_UNUSED

Unused Mode.

UCS_GPIO_INPUT

Input Mode.

UCS_GPIO_IN_STICKY_HL

InputStickyHighLevel Mode.

UCS_GPIO_IN_STICKY_LL

InputStickyLowLevel Mode.

UCS_GPIO_IN_TRIGGER_RE

InputTriggerRisingEdge Mode.

UCS_GPIO_IN_TRIGGER_FE

InputTriggerFallingEdge Mode.

UCS_GPIO_IN_TRIGGER_HL

InputTriggerHighLevel Mode.

UCS_GPIO_IN_TRIGGER_LL

InputTriggerLowLevel Mode.

UCS_GPIO_IN_DEBOUNCED

InputDebounced Mode.

UCS_GPIO_IN_DB_TRIGGER_RE

InputDebouncedTriggerRisingEdge Mode.

UCS_GPIO_IN_DB_TRIGGER_FE

InputDebouncedTriggerFallingEdge Mode.

UCS_GPIO_IN_DB_TRIGGER_HL

InputDebouncedTriggerHighLevel Mode.

UCS_GPIO_IN_DB_TRIGGER_LL

InputDebouncedTriggerLowLevel Mode.

UCS_GPIO_OUT_DEFAULT_LOW

OutputDefaultLow Mode.

UCS_GPIO_OUT_DEFAULT_HIGH

OutputDefaultHigh Mode.

UCS_GPIO_OUT_OPEN_DRAIN

OutputOpenDrain Mode.

UCS_GPIO_OUT_OD_TRIGGER_RE

OutputOpenDrainTriggerRisingEdge Mode.

UCS_GPIO_OUT_OD_TRIGGER_FE

OutputOpenDrainTriggerFallingEdge Mode.

UCS_GPIO_OUT_OD_TRIGGER_HL

OutputOpenDrainTriggerHighLevel Mode.

UCS_GPIO_OUT_OD_TRIGGER_LL

OutputOpenDrainTriggerLowLevel Mode.


UNICENS: Ucs_Gpio_ResultCode_t

  • GPIO Referred Types
Ucs_Gpio_ConfigPinModeResCb_t
Ucs_Gpio_CreatePortResCb_t
Ucs_Gpio_PinMode_t
Ucs_Gpio_PinStateResCb_t
Ucs_Gpio_ResultCode_t
Ucs_Gpio_ResultType_t
Ucs_Gpio_TriggerEventResultCb_t
enum Ucs_Gpio_ResultCode_t

Result codes of the GPIO Module.

Enumerator:
UCS_GPIO_RES_SUCCESS

GPIO command succeeded.

UCS_GPIO_RES_ERR_CMD

GPIO command failed due to an INIC function-specific error or a transmission error on the MOST network.

The result_type section in Ucs_Gpio_ResultDetails_t will provide you with more detailed information concerning the error type.

UCS_GPIO_RES_ERR_SYNC

Remote synchronization of target device failed.

The inic_result section in Ucs_Gpio_ResultDetails_t will provide you with more detailed information concerning this error code.


UNICENS: Ucs_Gpio_ResultType_t

  • GPIO Referred Types
Ucs_Gpio_ConfigPinModeResCb_t
Ucs_Gpio_CreatePortResCb_t
Ucs_Gpio_PinMode_t
Ucs_Gpio_PinStateResCb_t
Ucs_Gpio_ResultCode_t
Ucs_Gpio_ResultType_t
Ucs_Gpio_TriggerEventResultCb_t
enum Ucs_Gpio_ResultType_t

This enumerator specifies the kind of result - Target or Transmission.

Enumerator:
UCS_GPIO_RESULT_TYPE_TGT

Specifies the target results, typically INIC function-specific error from target device.

UCS_GPIO_RESULT_TYPE_TX

Specifies the transmission error information that occurred on the MOST network.


UNICENS: Ucs_Gpio_InitData_t Struct Reference

Data Fields
Ucs_Gpio_InitData_t Struct Reference
GPIO

The initialization structure of the GPIO Module. More...

Data Fields

Ucs_Gpio_TriggerEventResultCb_t trigger_event_status_fptr
Callback function that reports trigger events information of the GPIO Port.

Detailed Description

The initialization structure of the GPIO Module.

Example

Ucs_InitData_t ucs_init_data;
(void)Ucs_SetDefaultConfig(&ucs_init_data)
// Resources Management init section.
ucs_init_data.gpio.trigger_event_status_fptr = &App_GpioTriggerEventStatusCb;
// Handle the GPIO trigger events here
void App_GpioTriggerEventStatusCb(uint16_t node_address,
uint16_t gpio_port_handle,
uint16_t rising_edges,
uint16_t falling_edges,
uint16_t levels,
void * user_ptr)
{
// Do what needs to be..
}


UNICENS: Ucs_Gpio_InitData_t::trigger_event_status_fptr

  • Ucs_Gpio_InitData_t
trigger_event_status_fptr
Ucs_Gpio_TriggerEventResultCb_t trigger_event_status_fptr

Callback function that reports trigger events information of the GPIO Port.


UNICENS: Ucs_Gpio_CreatePort

  • GPIO
Ucs_Gpio_CreatePort
Ucs_Gpio_GetPinMode
Ucs_Gpio_ReadPort
Ucs_Gpio_SetPinMode
Ucs_Gpio_WritePort
Ucs_Return_t Ucs_Gpio_CreatePort | ( | Ucs_Inst_t * | self,
 |  | uint16_t | destination_address,
 |  | uint8_t | index,
 |  | uint16_t | debounce_time,
 |  | Ucs_Gpio_CreatePortResCb_t | result_fptr
 | ) |  |

Creates the GPIO port with its associated port instance identifier.

This function corresponds with the INIC function INIC.GPIOPortCreate.
Parameters
self | The UNICENS instance pointer
destination_address Address of the target device. Use the UCS_ADDR_LOCAL_DEV macro to target the local device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV
index The index of the GPIO Port instance.
Index
debounce_time The timeout for the GPIO debounce timer (in ms).
DebounceTime
result_fptr | Required result callback function pointer.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | At least one parameter is wrong
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized

Example

// Main function
void main()
{
Ucs_Return_t result = Ucs_Gpio_CreatePort(UCS_ADDR_LOCAL_DEV, 0x00U, 0x0003U, &App_GpioCreatePortResCb);
if (result != UCS_RET_SUCCESS)
{
// Error handling here
}
}
// The GPIO CreatePort event handler function
// Handle GpioCreatePort event
static void App_GpioCreatePortResCb(uint16_t device_id, uint16_t port_handle, Ucs_Gpio_Result_t result, void * user_ptr)
{
if (result.code == UCS_GPIO_RES_SUCCESS)
{
// Store received port handle
}
else
{
// Error handling here
}
}


UNICENS: Ucs_Gpio_GetPinMode

  • GPIO
Ucs_Gpio_CreatePort
Ucs_Gpio_GetPinMode
Ucs_Gpio_ReadPort
Ucs_Gpio_SetPinMode
Ucs_Gpio_WritePort
Ucs_Return_t Ucs_Gpio_GetPinMode | ( | Ucs_Inst_t * | self,
 |  | uint16_t | destination_address,
 |  | uint16_t | gpio_port_handle,
 |  | Ucs_Gpio_ConfigPinModeResCb_t | result_fptr
 | ) |  |

Retrieves the pin mode configuration of the given GPIO port.

This function corresponds with the INIC function INIC.GPIOPortPinMode.
Parameters
self | The UNICENS instance pointer
destination_address Address of the target device. Use the UCS_ADDR_LOCAL_DEV macro to target the local device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV
gpio_port_handle The GPIO Port resource handle.
GPIOPortHandle
result_fptr | Required result callback function pointer.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | At least one parameter is wrong
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized

Example

// Main function
void main()
{
// Read configuration of GPIO pins
Ucs_Return_t result = Ucs_Gpio_GetPinMode(0x222U, 0x1D00, &App_GpioConfigPinModeResCb);
if (result != UCS_RET_SUCCESS)
{
// Error handling here
}
}
// The event handler function
// Handle GpioConfigPinMode event
static void App_GpioConfigPinModeResCb(uint16_t device_id, uint16_t port_handle, Ucs_Gpio_PinConfiguration_t pin_cfg_list[], uint8_t list_sz, Ucs_Gpio_Result_t result, void * user_ptr)
{
if (result.code == UCS_GPIO_RES_SUCCESS)
{
uint8_t i;
for (i = 0U; i < list_sz; i++)
{
// Configuration list of all GPIO pins
// Do what needs to be..
}
}
else
{
// Error handling here
}
}


UNICENS: Ucs_Gpio_ReadPort

  • GPIO
Ucs_Gpio_CreatePort
Ucs_Gpio_GetPinMode
Ucs_Gpio_ReadPort
Ucs_Gpio_SetPinMode
Ucs_Gpio_WritePort
Ucs_Return_t Ucs_Gpio_ReadPort | ( | Ucs_Inst_t * | self,
 |  | uint16_t | destination_address,
 |  | uint16_t | gpio_port_handle,
 |  | Ucs_Gpio_PinStateResCb_t | result_fptr
 | ) |  |

Reads the pin state of the given GPIO port.

This function corresponds with the INIC function INIC.GPIOPortPinState.
Parameters
self | The UNICENS instance pointer
destination_address Address of the target device. Use the UCS_ADDR_LOCAL_DEV macro to target the local device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV
gpio_port_handle The GPIO Port resource handle.
GPIOPortHandle
result_fptr | Required result callback function pointer.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | At least one parameter is wrong
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized

Example

// Main function
void main()
{
Ucs_Return_t result = Ucs_Gpio_ReadPort(UCS_ADDR_LOCAL_DEV, 0x1D00, &App_GpioReadPortResCb);
if (result != UCS_RET_SUCCESS)
{
// Error handling here
}
}
// The event handler function
// Handle GpioReadPort event
static void App_GpioReadPortResCb(uint16_t device_id, uint16_t port_handle, uint16_t current_state, uint16_t sticky_state, Ucs_Gpio_Result_t result)
{
if (result.code == UCS_GPIO_RES_SUCCESS)
{
// Do what needs to be..
}
else
{
// Error handling here
}
}


UNICENS: Ucs_Gpio_SetPinMode

  • GPIO
Ucs_Gpio_CreatePort
Ucs_Gpio_GetPinMode
Ucs_Gpio_ReadPort
Ucs_Gpio_SetPinMode
Ucs_Gpio_WritePort
Ucs_Return_t Ucs_Gpio_SetPinMode | ( | Ucs_Inst_t * | self,
 |  | uint16_t | destination_address,
 |  | uint16_t | gpio_port_handle,
 |  | uint8_t | pin,
 |  | Ucs_Gpio_PinMode_t | mode,
 |  | Ucs_Gpio_ConfigPinModeResCb_t | result_fptr
 | ) |  |

Configures the pin mode of the given GPIO port.

This function corresponds with the INIC function INIC.GPIOPortPinMode.
Parameters
self | The UNICENS instance pointer
destination_address Address of the target device. Use the UCS_ADDR_LOCAL_DEV macro to target the local device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV
gpio_port_handle The GPIO Port resource handle.
GPIOPortHandle
pin The GPIO pin that is to be configured.
Pin
mode The mode of the GPIO pin.
Mode
result_fptr | Required result callback function pointer.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | At least one parameter is wrong
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized

Example

// Main function
void main()
{
// Set configuration of GPIO pin no. 3
Ucs_Return_t result = Ucs_Gpio_SetPinMode(0x221U, 0x1D00, 0x03U, UCS_GPIO_OUT_DEFAULT_LOW, &App_GpioConfigPinModeResCb);
if (result != UCS_RET_SUCCESS)
{
// Error handling here
}
}
// The event handler function
// Handle GpioConfigPinMode event
static void App_GpioConfigPinModeResCb(uint16_t device_id, uint16_t port_handle, Ucs_Gpio_PinConfiguration_t pin_cfg_list[], uint8_t list_sz, Ucs_Gpio_Result_t result, void * user_ptr)
{
if (result.code == UCS_GPIO_RES_SUCCESS)
{
uint8_t i;
for (i = 0U; i < list_sz; i++)
{
// Configuration list of all GPIO pins
// Check configuration of GPIO pin no. 3 here
if (pin_cfg_list[i].pin == 3 && pin_cfg_list[i].mode != UCS_GPIO_OUT_DEFAULT_LOW)
{
// Error handling
}
}
}
else
{
// Error handling here
}
}


UNICENS: Ucs_Gpio_WritePort

  • GPIO
Ucs_Gpio_CreatePort
Ucs_Gpio_GetPinMode
Ucs_Gpio_ReadPort
Ucs_Gpio_SetPinMode
Ucs_Gpio_WritePort
Ucs_Return_t Ucs_Gpio_WritePort | ( | Ucs_Inst_t * | self,
 |  | uint16_t | destination_address,
 |  | uint16_t | gpio_port_handle,
 |  | uint16_t | mask,
 |  | uint16_t | data,
 |  | Ucs_Gpio_PinStateResCb_t | result_fptr
 | ) |  |

Writes data to the given GPIO port.

This function corresponds with the INIC function INIC.GPIOPortPinState.
Parameters
self | The UNICENS instance pointer
destination_address Address of the target device. Use the UCS_ADDR_LOCAL_DEV macro to target the local device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV
gpio_port_handle The GPIO Port resource handle.
GPIOPortHandle
mask The GPIO pin to be written.
Mask
data The state of the GPIO pin to be written.
Data
result_fptr | Required result callback function pointer.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | At least one parameter is wrong
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized

Example

// Main function
void main()
{
Ucs_Return_t result = Ucs_Gpio_WritePort(0x555U, 0x1D00, 0x0039U, 0x0038U, &App_GpioWritePortResCb);
if (result != UCS_RET_SUCCESS)
{
// Error handling here
}
}
// The event handler function
// Handle GpioWritePort event
static void App_GpioWritePortResCb(uint16_t device_id, uint16_t port_handle, uint16_t current_state, uint16_t sticky_state, Ucs_Gpio_Result_t result, void * user_ptr)
{
if (result.code == UCS_GPIO_RES_SUCCESS)
{
// Do what needs to be..
}
else
{
// Error handling here
switch(result.details.result_type)
{
case UCS_GPIO_RESULT_TYPE_TGT:
// Handle the target results
break;
case UCS_GPIO_RESULT_TYPE_TX:
// Handle transmission error
break;
}
}
}


UNICENS: I2C

Topics | Data Structures | Functions
I2C
Peripheral Bus Interface

Provides service functions to handle data communication over I2C. More...

Topics

I2C Referred Types
Referred types used by the Extended Resource Manager.

Data Structures

struct Ucs_I2c_InitData_t
The initialization structure of the I2C Module. More...

Functions

Ucs_Return_t | Ucs_I2c_CreatePort (Ucs_Inst_t *self, uint16_t destination_address, uint8_t index, Ucs_I2c_Speed_t speed, uint8_t i2c_int_mask, Ucs_I2c_CreatePortResCb_t result_fptr)
Creates an I2C Port with its associated parameter.
Ucs_Return_t | Ucs_I2c_WritePort (Ucs_Inst_t *self, uint16_t destination_address, uint16_t port_handle, Ucs_I2c_TrMode_t mode, uint8_t block_count, uint8_t slave_address, uint16_t timeout, uint8_t data_len, uint8_t *data_ptr, Ucs_I2c_WritePortResCb_t result_fptr)
Writes a block of bytes to an I2C device at a specified I2C address.
Ucs_Return_t | Ucs_I2c_ReadPort (Ucs_Inst_t *self, uint16_t destination_address, uint16_t port_handle, uint8_t slave_address, uint8_t data_len, uint16_t timeout, Ucs_I2c_ReadPortResCb_t result_fptr)
Reads a block of bytes from an I2C device at a specified I2C address.

Detailed Description

Provides service functions to handle data communication over I2C.


UNICENS: I2C Referred Types

Data Structures | Callback Functions | Enumerations
I2C Referred Types
I2C

Referred types used by the Extended Resource Manager. More...

Data Structures

struct | Ucs_I2c_ResultDetails_t
Detailed information used for I2C results. More...
struct | Ucs_I2c_Result_t
Result structure of the I2C Module. More...

Callback Functions

typedef void(* | Ucs_I2c_CreatePortResCb_t )(uint16_t node_address, uint16_t i2c_port_handle, Ucs_I2c_Result_t result, void *user_ptr)
Callback function type to retrieve the result of the I2c_CreatePort function.
typedef void(* | Ucs_I2c_WritePortResCb_t )(uint16_t node_address, uint16_t i2c_port_handle, uint8_t i2c_slave_address, uint8_t data_len, Ucs_I2c_Result_t result, void *user_ptr)
Callback function type to retrieve the result of the Gpio_ConfigPinMode function.
typedef void(* | Ucs_I2c_ReadPortResCb_t )(uint16_t node_address, uint16_t i2c_port_handle, uint8_t i2c_slave_address, uint8_t data_len, uint8_t data_ptr[], Ucs_I2c_Result_t result, void *user_ptr)
Callback function type to retrieve the result of the Gpio_ConfigPinMode function.
typedef void(* | Ucs_I2c_IntEventReportCb_t )(uint16_t node_address, void *user_ptr)
Callback function type to report the I2C interrupt event.

Enumerations

enum Ucs_I2c_Speed_t {
UCS_I2C_SLOW_MODE = 0x00U,
UCS_I2C_FAST_MODE = 0x01U
}
The speed grade of the I2C Port. More...
enum Ucs_I2c_TrMode_t {
UCS_I2C_DEFAULT_MODE = 0x00U,
UCS_I2C_REPEATED_MODE = 0x01U,
UCS_I2C_BURST_MODE = 0x02U
}
The write transfer mode. More...
enum Ucs_I2c_ResultCode_t {
UCS_I2C_RES_SUCCESS = 0x00U,
UCS_I2C_RES_ERR_CMD = 0x01U,
UCS_I2C_RES_ERR_SYNC = 0x02U
}
Result codes of the I2C Module. More...
enum Ucs_I2c_ResultType_t {
UCS_I2C_RESULT_TYPE_TGT = 0x00U,
UCS_I2C_RESULT_TYPE_TX = 0x01U
}
This enumerator specifies the kind of result - Target or Transmission. More...

Detailed Description

Referred types used by the Extended Resource Manager.


UNICENS: Ucs_I2c_ResultDetails_t Struct Reference

Data Fields
Ucs_I2c_ResultDetails_t Struct Reference
I2C Referred Types

Detailed information used for I2C results. More...

Data Fields

Ucs_I2c_ResultType_t result_type
Specifies the type of the current asynchronous result.
Ucs_MsgTxStatus_t tx_result
Holds the status of the transmission.
Ucs_StdResult_t inic_result
Holds the results of the target device.

Detailed Description

Detailed information used for I2C results.


UNICENS: Ucs_I2c_ResultDetails_t::inic_result

  • Ucs_I2c_ResultDetails_t
inic_result
result_type
tx_result
Ucs_StdResult_t inic_result

Holds the results of the target device.


UNICENS: Ucs_I2c_ResultDetails_t::result_type

  • Ucs_I2c_ResultDetails_t
inic_result
result_type
tx_result
Ucs_I2c_ResultType_t result_type

Specifies the type of the current asynchronous result.

The following briefly describes the different types of results available:

  • UCS_I2C_RESULT_TYPE_TGT: target results, typically INIC function-specific error found on target device.
    Refer to inic_result to get the detailed information.
  • UCS_I2C_RESULT_TYPE_TX: transmission results, typically transmission error on the MOST network.
    Refer to tx_result to get the transmission information.


UNICENS: Ucs_I2c_ResultDetails_t::tx_result

  • Ucs_I2c_ResultDetails_t
inic_result
result_type
tx_result
Ucs_MsgTxStatus_t tx_result

Holds the status of the transmission.


UNICENS: Ucs_I2c_Result_t Struct Reference

Data Fields
Ucs_I2c_Result_t Struct Reference
I2C Referred Types

Result structure of the I2C Module. More...

Data Fields

Ucs_I2c_ResultCode_t code
Result code.
Ucs_I2c_ResultDetails_t details
Detailed information on the returned result.

Detailed Description

Result structure of the I2C Module.


UNICENS: Ucs_I2c_Result_t::code

  • Ucs_I2c_Result_t
code
details
Ucs_I2c_ResultCode_t code

Result code.


UNICENS: Ucs_I2c_Result_t::details

  • Ucs_I2c_Result_t
code
details
Ucs_I2c_ResultDetails_t details

Detailed information on the returned result.


UNICENS: Ucs_I2c_CreatePortResCb_t

  • I2C Referred Types
Ucs_I2c_CreatePortResCb_t
Ucs_I2c_IntEventReportCb_t
Ucs_I2c_ReadPortResCb_t
Ucs_I2c_ResultCode_t
Ucs_I2c_ResultType_t
Ucs_I2c_Speed_t
Ucs_I2c_TrMode_t
Ucs_I2c_WritePortResCb_t
typedef void(* Ucs_I2c_CreatePortResCb_t)(uint16_t node_address, uint16_t i2c_port_handle, Ucs_I2c_Result_t result, void *user_ptr)

Callback function type to retrieve the result of the I2c_CreatePort function.

Parameters
node_address | The node address of the device from where the results come
i2c_port_handle | The port resource handle.
result | The operation result
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_I2c_IntEventReportCb_t

  • I2C Referred Types
Ucs_I2c_CreatePortResCb_t
Ucs_I2c_IntEventReportCb_t
Ucs_I2c_ReadPortResCb_t
Ucs_I2c_ResultCode_t
Ucs_I2c_ResultType_t
Ucs_I2c_Speed_t
Ucs_I2c_TrMode_t
Ucs_I2c_WritePortResCb_t
typedef void(* Ucs_I2c_IntEventReportCb_t)(uint16_t node_address, void *user_ptr)

Callback function type to report the I2C interrupt event.

Parameters
node_address | The node address of the device from where the interrupt comes
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_I2c_ReadPortResCb_t

  • I2C Referred Types
Ucs_I2c_CreatePortResCb_t
Ucs_I2c_IntEventReportCb_t
Ucs_I2c_ReadPortResCb_t
Ucs_I2c_ResultCode_t
Ucs_I2c_ResultType_t
Ucs_I2c_Speed_t
Ucs_I2c_TrMode_t
Ucs_I2c_WritePortResCb_t
typedef void(* Ucs_I2c_ReadPortResCb_t)(uint16_t node_address, uint16_t i2c_port_handle, uint8_t i2c_slave_address, uint8_t data_len, uint8_t data_ptr[], Ucs_I2c_Result_t result, void *user_ptr)

Callback function type to retrieve the result of the Gpio_ConfigPinMode function.

Parameters
node_address | The node address of the device from where the results come
i2c_port_handle | The port resource handle.
i2c_slave_address | The 7-bit I2C Port slave address of the peripheral from which the data have been read.
data_len | The number of bytes read from the address.
data_ptr | The reference to the data list.
result | The operation result
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_I2c_WritePortResCb_t

  • I2C Referred Types
Ucs_I2c_CreatePortResCb_t
Ucs_I2c_IntEventReportCb_t
Ucs_I2c_ReadPortResCb_t
Ucs_I2c_ResultCode_t
Ucs_I2c_ResultType_t
Ucs_I2c_Speed_t
Ucs_I2c_TrMode_t
Ucs_I2c_WritePortResCb_t
typedef void(* Ucs_I2c_WritePortResCb_t)(uint16_t node_address, uint16_t i2c_port_handle, uint8_t i2c_slave_address, uint8_t data_len, Ucs_I2c_Result_t result, void *user_ptr)

Callback function type to retrieve the result of the Gpio_ConfigPinMode function.

Parameters
node_address | The node address of the device from where the results come
i2c_port_handle | The port resource handle.
i2c_slave_address | The 7-bit I2C Port slave address of the peripheral to be read.
data_len | The number of bytes wrote to the I2C address.
result | The operation result
user_ptr | User reference provided in Ucs_InitData_t::user_ptr


UNICENS: Ucs_I2c_ResultCode_t

  • I2C Referred Types
Ucs_I2c_CreatePortResCb_t
Ucs_I2c_IntEventReportCb_t
Ucs_I2c_ReadPortResCb_t
Ucs_I2c_ResultCode_t
Ucs_I2c_ResultType_t
Ucs_I2c_Speed_t
Ucs_I2c_TrMode_t
Ucs_I2c_WritePortResCb_t
enum Ucs_I2c_ResultCode_t

Result codes of the I2C Module.

Enumerator:
UCS_I2C_RES_SUCCESS

I2C command succeeded.

UCS_I2C_RES_ERR_CMD

I2C command failed due to an INIC function-specific error or a transmission error on the MOST network.

The result_type section in Ucs_I2c_ResultDetails_t will provide you with more detailed information concerning the error type.

UCS_I2C_RES_ERR_SYNC

Remote synchronization of target device failed.

The inic_result section in Ucs_I2c_ResultDetails_t will provide you with more detailed information concerning the error code.


UNICENS: Ucs_I2c_ResultType_t

  • I2C Referred Types
Ucs_I2c_CreatePortResCb_t
Ucs_I2c_IntEventReportCb_t
Ucs_I2c_ReadPortResCb_t
Ucs_I2c_ResultCode_t
Ucs_I2c_ResultType_t
Ucs_I2c_Speed_t
Ucs_I2c_TrMode_t
Ucs_I2c_WritePortResCb_t
enum Ucs_I2c_ResultType_t

This enumerator specifies the kind of result - Target or Transmission.

Enumerator:
UCS_I2C_RESULT_TYPE_TGT

Specifies the target results, typically INIC function-specific error from target device.

UCS_I2C_RESULT_TYPE_TX

Specifies the transmission error information that occurred on the MOST network.


UNICENS: Ucs_I2c_Speed_t

  • I2C Referred Types
Ucs_I2c_CreatePortResCb_t
Ucs_I2c_IntEventReportCb_t
Ucs_I2c_ReadPortResCb_t
Ucs_I2c_ResultCode_t
Ucs_I2c_ResultType_t
Ucs_I2c_Speed_t
Ucs_I2c_TrMode_t
Ucs_I2c_WritePortResCb_t
enum Ucs_I2c_Speed_t

The speed grade of the I2C Port.

Enumerator:
UCS_I2C_SLOW_MODE

Speed grade of the port is 100 kHz.

UCS_I2C_FAST_MODE

Speed grade of the port is 400 kHz.


UNICENS: Ucs_I2c_TrMode_t

  • I2C Referred Types
Ucs_I2c_CreatePortResCb_t
Ucs_I2c_IntEventReportCb_t
Ucs_I2c_ReadPortResCb_t
Ucs_I2c_ResultCode_t
Ucs_I2c_ResultType_t
Ucs_I2c_Speed_t
Ucs_I2c_TrMode_t
Ucs_I2c_WritePortResCb_t
enum Ucs_I2c_TrMode_t

The write transfer mode.

Enumerator:
UCS_I2C_DEFAULT_MODE

Default mode of the I2C write transfer.

UCS_I2C_REPEATED_MODE

Repeated Mode of the I2C write transfer.

UCS_I2C_BURST_MODE

Burst mode of the I2C write transfer.


UNICENS: Ucs_I2c_InitData_t Struct Reference

Data Fields
Ucs_I2c_InitData_t Struct Reference
I2C

The initialization structure of the I2C Module. More...

Data Fields

Ucs_I2c_IntEventReportCb_t interrupt_status_fptr
Callback function that reports the I2C interrupt.

Detailed Description

The initialization structure of the I2C Module.

Example

Ucs_InitData_t ucs_init_data;
(void)Ucs_SetDefaultConfig(&ucs_init_data)
// Resources Management init section.
ucs_init_data.i2c.interrupt_status_fptr = &App_I2cIntStatusCb;
// Handle the I2C interrupt event here
void App_I2cIntStatusCb (uint16_t node_address, void * user_ptr)
{
// Do what needs to be..
}


UNICENS: Ucs_I2c_InitData_t::interrupt_status_fptr

  • Ucs_I2c_InitData_t
interrupt_status_fptr
Ucs_I2c_IntEventReportCb_t interrupt_status_fptr

Callback function that reports the I2C interrupt.


UNICENS: Ucs_I2c_CreatePort

  • I2C
Ucs_I2c_CreatePort
Ucs_I2c_ReadPort
Ucs_I2c_WritePort
Ucs_Return_t Ucs_I2c_CreatePort | ( | Ucs_Inst_t * | self,
 |  | uint16_t | destination_address,
 |  | uint8_t | index,
 |  | Ucs_I2c_Speed_t | speed,
 |  | uint8_t | i2c_int_mask,
 |  | Ucs_I2c_CreatePortResCb_t | result_fptr
 | ) |  |

Creates an I2C Port with its associated parameter.

This function corresponds with the INIC function INIC.I2CPortCreate.
Parameters
self | The UNICENS instance pointer
destination_address Address of the target device. Use the UCS_ADDR_LOCAL_DEV macro to target the local device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV
index I2C Port instance.
Index
speed The speed grade of the I2C Port.
Speed
i2c_int_mask | The bit mask corresponding to the I2C-interrupt on the GPIO Port.
result_fptr | Required result callback function pointer.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | At least one parameter is NULL
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized
Attention
The below points should be considered in order to receive the notification of the I2C interrupt:
  • The Ucs_I2c_IntEventReportCb_t callback function should be registered in the Ucs_InitData_t init structure.
  • The GPIO port has to be be opened and the I2C interrupt pin associated with that port configured correctly.

Example

#define I2C_INT_PIN_MASK ((uint8_t)0x01)
// Main function
void main()
{
Ucs_Return_t result = Ucs_I2c_CreatePort(0x556U, 0x00U, UCS_I2C_FAST_MODE, I2C_INT_PIN_MASK, &App_I2cCreatePortResCb);
if (result != UCS_RET_SUCCESS)
{
// Error handling here
}
}
// Handle I2cCreatePort event
static void App_I2cCreatePortResCb(uint16_t device_id, uint16_t port_handle, Ucs_I2c_Result_t result, void * user_ptr)
{
if (result.code == UCS_I2C_RES_SUCCESS)
{
// Store received port handle
}
else
{
// Error handling here
}
}


UNICENS: Ucs_I2c_ReadPort

  • I2C
Ucs_I2c_CreatePort
Ucs_I2c_ReadPort
Ucs_I2c_WritePort
Ucs_Return_t Ucs_I2c_ReadPort | ( | Ucs_Inst_t * | self,
 |  | uint16_t | destination_address,
 |  | uint16_t | port_handle,
 |  | uint8_t | slave_address,
 |  | uint8_t | data_len,
 |  | uint16_t | timeout,
 |  | Ucs_I2c_ReadPortResCb_t | result_fptr
 | ) |  |

Reads a block of bytes from an I2C device at a specified I2C address.

This function corresponds with the INIC function INIC.I2CPortRead.
Parameters
self | The UNICENS instance pointer
destination_address Address of the target device. Use the UCS_ADDR_LOCAL_DEV macro to target the local device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV
port_handle Port resource handle.
I2CPortHandle
slave_address The 7-bit I2C slave address of the peripheral to be read.
SlaveAddress
data_len Number of bytes to be read from the address.
Length
timeout The timeout for the I2C Port read.
Timeout
result_fptr | Required result callback function pointer.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | At least one parameter is wrong
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized

Example

// Main function
void main()
{
Ucs_Return_t result = Ucs_I2c_ReadPort(0x14U, 0x0F00U, 0x20U, 5U, 0x0FU, &App_I2cReadPortResCb);
if (result != UCS_RET_SUCCESS)
{
// Error handling here
}
}
// The event handler function
// Handle I2cReadPort event
static void App_I2cReadPortResCb(uint16_t device_id, uint16_t port_handle, uint8_t slave_address, uint8_t data_len, uint8_t data_ptr[], Ucs_I2c_Result_t result, void * user_ptr)
{
if (result.code == UCS_I2C_RES_SUCCESS)
{
// Do what needs to be..
}
else
{
// Error handling here
}
}


UNICENS: Ucs_I2c_WritePort

  • I2C
Ucs_I2c_CreatePort
Ucs_I2c_ReadPort
Ucs_I2c_WritePort
Ucs_Return_t Ucs_I2c_WritePort | ( | Ucs_Inst_t * | self,
 |  | uint16_t | destination_address,
 |  | uint16_t | port_handle,
 |  | Ucs_I2c_TrMode_t | mode,
 |  | uint8_t | block_count,
 |  | uint8_t | slave_address,
 |  | uint16_t | timeout,
 |  | uint8_t | data_len,
 |  | uint8_t * | data_ptr,
 |  | Ucs_I2c_WritePortResCb_t | result_fptr
 | ) |  |

Writes a block of bytes to an I2C device at a specified I2C address.

This function corresponds with the INIC function INIC.I2CPortWrite.
Parameters
self | The UNICENS instance pointer
destination_address Address of the target device. Use the UCS_ADDR_LOCAL_DEV macro to target the local device.
The following address ranges are supported:
  • [0x10 ... 0x2FF]
  • [0x500 ... 0xFEF]
  • UCS_ADDR_LOCAL_DEV
port_handle Port resource handle.
I2CPortHandle
mode The write transfer mode.
Mode
block_count The number of blocks to be written to the I2C address. If parameter mode is not set to Burst Mode, the value of block_count has to be set to 0. Otherwise the valid range of this parameter goes from 1 to 30.
BlockCount
slave_address The 7-bit I2C slave address of the peripheral to be read.
SlaveAddress
timeout The timeout for the I2C Port write.
Timeout
data_len | The total number of bytes to be written to the addressed I2C peripheral. Even if parameter mode is set to Burst Mode, the data_len shall correspond to the whole size of the burst transfer. That is, the data_len shall equal the size of a block times the block_count value.
data_ptr | Reference to the data to be written.
result_fptr | Required result callback function pointer.
Returns
Possible return values are shown in the table below.
Value | Description
UCS_RET_SUCCESS | No error
UCS_RET_ERR_PARAM | At least one parameter is wrong
UCS_RET_ERR_BUFFER_OVERFLOW | No message buffer available
UCS_RET_ERR_API_LOCKED | API is currently locked
UCS_RET_ERR_NOT_INITIALIZED | UNICENS is not initialized

Example

uint8_t myData[] = {0x4U, 0x3U, 0x2U, 0x1U, 0x0U, 0x4U, 0x3U, 0x2U, 0x1U, 0x0U, 0x05U, 0x05U};
// Main function
void main()
{
Ucs_Return_t result = Ucs_I2c_WritePort(0x15U, 0x0F00U, UCS_I2C_BURST_MODE, 4U, 0x20U, 0x0FU, 12U, myData, &App_I2cWritePortResCb);
if (result != UCS_RET_SUCCESS)
{
// Error handling here
}
}
// The event handler function
// Handle I2cWritePort event
static void App_I2cWritePortResCb(uint16_t device_id, uint16_t port_handle, uint8_t i2c_slave_address, uint8_t data_len, Ucs_I2c_Result_t result, void * user_ptr)
{
if (result.code == UCS_I2C_RES_SUCCESS)
{
// Do what needs to be..
}
else
{
// Error handling here
switch(result.details.result_type)
{
case UCS_I2C_RESULT_TYPE_TGT:
// Handle the target results
break;
case UCS_I2C_RESULT_TYPE_TX:
default:
// Handle transmission error
break;
}
}
}


UNICENS: Miscellaneous

Macros
Miscellaneous

Miscellaneous features. More...

Macros

#define | UCS_VERSION_MAJOR _PPP_MNS_REV_1
UNICENS Major Version Number.
#define | UCS_VERSION_MINOR _PPP_MNS_REV_2
UNICENS Minor Version Number.
#define | UCS_VERSION_RELEASE _PPP_MNS_REV_3
UNICENS Release Version Number.
#define | UCS_VERSION_BUILD _PPP_MNS_REV_5
UNICENS Build Number.

Detailed Description

Miscellaneous features.


UNICENS: UCS_VERSION_BUILD

  • Miscellaneous
UCS_VERSION_BUILD
UCS_VERSION_MAJOR
UCS_VERSION_MINOR
UCS_VERSION_RELEASE
#define UCS_VERSION_BUILD _PPP_MNS_REV_5

UNICENS Build Number.


UNICENS: UCS_VERSION_MAJOR

  • Miscellaneous
UCS_VERSION_BUILD
UCS_VERSION_MAJOR
UCS_VERSION_MINOR
UCS_VERSION_RELEASE
#define UCS_VERSION_MAJOR _PPP_MNS_REV_1

UNICENS Major Version Number.


UNICENS: UCS_VERSION_MINOR

  • Miscellaneous
UCS_VERSION_BUILD
UCS_VERSION_MAJOR
UCS_VERSION_MINOR
UCS_VERSION_RELEASE
#define UCS_VERSION_MINOR _PPP_MNS_REV_2

UNICENS Minor Version Number.


UNICENS: UCS_VERSION_RELEASE

  • Miscellaneous
UCS_VERSION_BUILD
UCS_VERSION_MAJOR
UCS_VERSION_MINOR
UCS_VERSION_RELEASE
#define UCS_VERSION_RELEASE _PPP_MNS_REV_3

UNICENS Release Version Number.


UNICENS: Low-Level Driver

Topics | Callback Functions
Low-Level Driver

Provides an interface for Port Message Exchange with the INIC. More...

Topics

Low-Level Driver API
Function pointers to be used by the low-level driver.
Referred Types
Referred types used by the low-level driver interface.

Callback Functions

typedef void(* | Ucs_Lld_StartCb_t )(Ucs_Lld_Api_t *api_ptr, void *inst_ptr, void *lld_user_ptr)
Notifies the LLD to start transmitting and receiving messages.
typedef void(* | Ucs_Lld_StopCb_t )(void *lld_user_ptr)
Notifies the LLD to stop/abort transmitting and receiving messages.
typedef void(* | Ucs_Lld_ResetInicCb_t )(void *lld_user_ptr)
Notifies the LLD to reset the INIC.
typedef void(* | Ucs_Lld_RxMsgAvailableCb_t )(void *lld_user_ptr)
Callback function which is invoked as soon as port message objects are available again.
typedef void(* | Ucs_Lld_TxTransmitCb_t )(Ucs_Lld_TxMsg_t *msg_ptr, void *lld_user_ptr)
Callback function which is invoked to transmit a single message to the INIC.

Detailed Description

Provides an interface for Port Message Exchange with the INIC.

UNICENS provides a certain set of functions which are only dedicated to the low-level driver. The low-level driver API is a set of functions which shall be used by the low-level driver. The low-level driver callbacks is a set of function that shall be implemented by the low-level driver. The low-level driver callbacks shall be assigned to the UNICENS initialization structure. During initialization UNICENS invokes the callback start_fptr and passes the low-level driver API as pointer to Ucs_Lld_Api_t.


UNICENS: Low-Level Driver API

Data Structures | Callback Functions
Low-Level Driver API
Low-Level Driver

Function pointers to be used by the low-level driver. More...

Data Structures

struct Ucs_Lld_Api_t
Initialization required for one communication channel (control or packet) More...

Callback Functions

typedef Ucs_Lld_RxMsg_t *(* | Ucs_Lld_RxAllocateCb_t )(void *inst_ptr, uint16_t buffer_size)
Allocates an Rx message object.
typedef void(* | Ucs_Lld_RxFreeUnusedCb_t )(void *inst_ptr, Ucs_Lld_RxMsg_t *msg_ptr)
Frees an unused Rx message object.
typedef void(* | Ucs_Lld_RxReceiveCb_t )(void *inst_ptr, Ucs_Lld_RxMsg_t *msg_ptr)
Pass an Rx message to UNICENS.
typedef void(* | Ucs_Lld_TxReleaseCb_t )(void *inst_ptr, Ucs_Lld_TxMsg_t *msg_ptr)
Notifies that the LLD no longer needs to access the Tx message object.

Detailed Description

Function pointers to be used by the low-level driver.


UNICENS: Ucs_Lld_Api_t Struct Reference

Data Fields
Ucs_Lld_Api_t Struct Reference
Low-Level Driver API

Initialization required for one communication channel (control or packet) More...

Data Fields

Ucs_Lld_RxAllocateCb_t rx_allocate_fptr
Allocates an Rx message object.
Ucs_Lld_RxFreeUnusedCb_t rx_free_unused_fptr
Frees an unused Rx message object.
Ucs_Lld_RxReceiveCb_t rx_receive_fptr
Pass an Rx message to the UNICENS library.
Ucs_Lld_TxReleaseCb_t tx_release_fptr
Notifies that the LLD no longer needs to access the Tx message object.

Detailed Description

Initialization required for one communication channel (control or packet)


UNICENS: Ucs_Lld_Api_t::rx_allocate_fptr

  • Ucs_Lld_Api_t
rx_allocate_fptr
rx_free_unused_fptr
rx_receive_fptr
tx_release_fptr
Ucs_Lld_RxAllocateCb_t rx_allocate_fptr

Allocates an Rx message object.


UNICENS: Ucs_Lld_Api_t::rx_free_unused_fptr

  • Ucs_Lld_Api_t
rx_allocate_fptr
rx_free_unused_fptr
rx_receive_fptr
tx_release_fptr
Ucs_Lld_RxFreeUnusedCb_t rx_free_unused_fptr

Frees an unused Rx message object.


UNICENS: Ucs_Lld_Api_t::rx_receive_fptr

  • Ucs_Lld_Api_t
rx_allocate_fptr
rx_free_unused_fptr
rx_receive_fptr
tx_release_fptr
Ucs_Lld_RxReceiveCb_t rx_receive_fptr

Pass an Rx message to the UNICENS library.


UNICENS: Ucs_Lld_Api_t::tx_release_fptr

  • Ucs_Lld_Api_t
rx_allocate_fptr
rx_free_unused_fptr
rx_receive_fptr
tx_release_fptr
Ucs_Lld_TxReleaseCb_t tx_release_fptr

Notifies that the LLD no longer needs to access the Tx message object.


UNICENS: Ucs_Lld_RxAllocateCb_t

  • Low-Level Driver API
Ucs_Lld_RxAllocateCb_t
Ucs_Lld_RxFreeUnusedCb_t
Ucs_Lld_RxReceiveCb_t
Ucs_Lld_TxReleaseCb_t
typedef Ucs_Lld_RxMsg_t*(* Ucs_Lld_RxAllocateCb_t)(void *inst_ptr, uint16_t buffer_size)

Allocates an Rx message object.

Parameters
inst_ptr | Reference to an internal UNICENS handler
buffer_size | The size in bytes of the received Rx message. Valid values: 6..72.
Returns
The Rx message object or NULL if no message object is available. In the latter case the low-level driver can wait until Ucs_Lld_RxMsgAvailableCb_t() is invoked. The low-level driver is allowed to pre-allocate Rx messages with the maximum size of 72 bytes. After writing received data into Ucs_Lld_RxMsg_t::data_ptr the low-level driver must set Ucs_Lld_RxMsg_t::data_size to the actual message size.
Warning
The function will also return NULL if the requested buffer_size exceeds the valid range. In such a case the UNICENS cannot guarantee that Ucs_Lld_RxMsgAvailableCb_t() is called as expected. Received messages exceeding the valid range must be discarded by the LLD.


UNICENS: Ucs_Lld_RxFreeUnusedCb_t

  • Low-Level Driver API
Ucs_Lld_RxAllocateCb_t
Ucs_Lld_RxFreeUnusedCb_t
Ucs_Lld_RxReceiveCb_t
Ucs_Lld_TxReleaseCb_t
typedef void(* Ucs_Lld_RxFreeUnusedCb_t)(void *inst_ptr, Ucs_Lld_RxMsg_t *msg_ptr)

Frees an unused Rx message object.

Parameters
inst_ptr | Reference to internal UNICENS handler
msg_ptr | Reference to the unused Rx message object


UNICENS: Ucs_Lld_RxReceiveCb_t

  • Low-Level Driver API
Ucs_Lld_RxAllocateCb_t
Ucs_Lld_RxFreeUnusedCb_t
Ucs_Lld_RxReceiveCb_t
Ucs_Lld_TxReleaseCb_t
typedef void(* Ucs_Lld_RxReceiveCb_t)(void *inst_ptr, Ucs_Lld_RxMsg_t *msg_ptr)

Pass an Rx message to UNICENS.

Parameters
inst_ptr | Reference to internal UNICENS handler
msg_ptr | Reference to the Rx message object containing the received message.


UNICENS: Ucs_Lld_TxReleaseCb_t

  • Low-Level Driver API
Ucs_Lld_RxAllocateCb_t
Ucs_Lld_RxFreeUnusedCb_t
Ucs_Lld_RxReceiveCb_t
Ucs_Lld_TxReleaseCb_t
typedef void(* Ucs_Lld_TxReleaseCb_t)(void *inst_ptr, Ucs_Lld_TxMsg_t *msg_ptr)

Notifies that the LLD no longer needs to access the Tx message object.

Parameters
inst_ptr | Reference to internal UNICENS handler
msg_ptr | Reference to the Tx message object which is no longer accessed by the low-level driver


UNICENS: Referred Types

Data Structures
Referred Types
Low-Level Driver

Referred types used by the low-level driver interface. More...

Data Structures

struct | Ucs_Lld_TxMsg_t
Tx message object providing the raw port message byte stream. More...
struct | Ucs_Lld_RxMsg_t
Rx message object pointing to the raw port message byte stream. More...
struct | Ucs_Lld_Callbacks_t
Set of functions implemented by the low-level driver. More...
struct | Ucs_Mem_Buffer_t
Memory chunk representing a message or part of a message. More...

Detailed Description

Referred types used by the low-level driver interface.


UNICENS: Ucs_Lld_TxMsg_t Struct Reference

Data Fields
Ucs_Lld_TxMsg_t Struct Reference
Referred Types

Tx message object providing the raw port message byte stream. More...

Data Fields

struct Ucs_Lld_TxMsg_ * custom_next_msg_ptr
Shall be used by the LLD implementation to queue messages for asynchronous transmission.
Ucs_Mem_Buffer_t * memory_ptr
Points to the data buffer.

Detailed Description

Tx message object providing the raw port message byte stream.


UNICENS: Ucs_Lld_TxMsg_t::custom_next_msg_ptr

  • Ucs_Lld_TxMsg_t
custom_next_msg_ptr
memory_ptr
struct Ucs_Lld_TxMsg_* custom_next_msg_ptr

Shall be used by the LLD implementation to queue messages for asynchronous transmission.

UNICENS will set this value to NULL since only single messages are forwarded to the LLD. Within the transmit function it is recommended that the LLD queues the message for asynchronous transmission. Despite a driver's transmit function might signal busy for a short term the UNICENS library might forward multiple messages for transmission. If a driver works asynchronously (interrupt driven) it can easily use this pointer build a queue of waiting messages. Nonetheless, it is important that tx_release_fptr is invoked for every message separately. The Interface between the UNICENS library and the LLD does only support single messages.


UNICENS: Ucs_Lld_TxMsg_t::memory_ptr

  • Ucs_Lld_TxMsg_t
custom_next_msg_ptr
memory_ptr
Ucs_Mem_Buffer_t* memory_ptr

Points to the data buffer.


UNICENS: Ucs_Lld_RxMsg_t Struct Reference

Data Fields
Ucs_Lld_RxMsg_t Struct Reference
Referred Types

Rx message object pointing to the raw port message byte stream. More...

Data Fields

uint8_t * | data_ptr
Points to a UNICENS allocated memory chunk.
uint16_t | data_size
Size of the memory chunk in bytes. Valid values: 6..72.

Detailed Description

Rx message object pointing to the raw port message byte stream.


UNICENS: Ucs_Lld_RxMsg_t::data_ptr

  • Ucs_Lld_RxMsg_t
data_ptr
data_size
uint8_t* data_ptr

Points to a UNICENS allocated memory chunk.


UNICENS: Ucs_Lld_RxMsg_t::data_size

  • Ucs_Lld_RxMsg_t
data_ptr
data_size
uint16_t data_size

Size of the memory chunk in bytes. Valid values: 6..72.


UNICENS: Ucs_Lld_Callbacks_t Struct Reference

Data Fields
Ucs_Lld_Callbacks_t Struct Reference
Referred Types

Set of functions implemented by the low-level driver. More...

Data Fields

void * lld_user_ptr
Optional pointer that is passed when invoking a callback function which is assigned in Ucs_Lld_Callbacks_t.
Ucs_Lld_StartCb_t start_fptr
Callback function to initialize the low-level driver and start the transmission and reception of messages.
Ucs_Lld_StopCb_t stop_fptr
Callback function to stop/abort the transmission and reception of messages.
Ucs_Lld_RxMsgAvailableCb_t rx_available_fptr
Callback function which is invoked as soon as Rx message objects are available again.
Ucs_Lld_TxTransmitCb_t tx_transmit_fptr
Callback function to transmit one or multiple messages to the INIC.

Detailed Description

Set of functions implemented by the low-level driver.


UNICENS: Ucs_Lld_Callbacks_t::lld_user_ptr

  • Ucs_Lld_Callbacks_t
lld_user_ptr
rx_available_fptr
start_fptr
stop_fptr
tx_transmit_fptr
void* lld_user_ptr

Optional pointer that is passed when invoking a callback function which is assigned in Ucs_Lld_Callbacks_t.


UNICENS: Ucs_Lld_Callbacks_t::rx_available_fptr

  • Ucs_Lld_Callbacks_t
lld_user_ptr
rx_available_fptr
start_fptr
stop_fptr
tx_transmit_fptr
Ucs_Lld_RxMsgAvailableCb_t rx_available_fptr

Callback function which is invoked as soon as Rx message objects are available again.


UNICENS: Ucs_Lld_Callbacks_t::start_fptr

  • Ucs_Lld_Callbacks_t
lld_user_ptr
rx_available_fptr
start_fptr
stop_fptr
tx_transmit_fptr
Ucs_Lld_StartCb_t start_fptr

Callback function to initialize the low-level driver and start the transmission and reception of messages.


UNICENS: Ucs_Lld_Callbacks_t::stop_fptr

  • Ucs_Lld_Callbacks_t
lld_user_ptr
rx_available_fptr
start_fptr
stop_fptr
tx_transmit_fptr
Ucs_Lld_StopCb_t stop_fptr

Callback function to stop/abort the transmission and reception of messages.


UNICENS: Ucs_Lld_Callbacks_t::tx_transmit_fptr

  • Ucs_Lld_Callbacks_t
lld_user_ptr
rx_available_fptr
start_fptr
stop_fptr
tx_transmit_fptr
Ucs_Lld_TxTransmitCb_t tx_transmit_fptr

Callback function to transmit one or multiple messages to the INIC.


UNICENS: Ucs_Mem_Buffer_t Struct Reference

Data Fields
Ucs_Mem_Buffer_t Struct Reference
Referred Types

Memory chunk representing a message or part of a message. More...

Data Fields

struct Ucs_Mem_Buffer_ * | next_buffer_ptr
Points to an additional memory buffer that belongs to the same message.
uint8_t * | data_ptr
Points to the data buffer.
uint16_t | data_size
Size of the data buffer.
uint16_t | total_size
Reserved for future use. Size of this and all concatenated data buffers.

Detailed Description

Memory chunk representing a message or part of a message.


UNICENS: Ucs_Mem_Buffer_t::data_ptr

  • Ucs_Mem_Buffer_t
data_ptr
data_size
next_buffer_ptr
total_size
uint8_t* data_ptr

Points to the data buffer.


UNICENS: Ucs_Mem_Buffer_t::data_size

  • Ucs_Mem_Buffer_t
data_ptr
data_size
next_buffer_ptr
total_size
uint16_t data_size

Size of the data buffer.


UNICENS: Ucs_Mem_Buffer_t::next_buffer_ptr

  • Ucs_Mem_Buffer_t
data_ptr
data_size
next_buffer_ptr
total_size
struct Ucs_Mem_Buffer_* next_buffer_ptr

Points to an additional memory buffer that belongs to the same message.


UNICENS: Ucs_Mem_Buffer_t::total_size

  • Ucs_Mem_Buffer_t
data_ptr
data_size
next_buffer_ptr
total_size
uint16_t total_size

Reserved for future use. Size of this and all concatenated data buffers.


UNICENS: Ucs_Lld_ResetInicCb_t

  • Low-Level Driver
Ucs_Lld_ResetInicCb_t
Ucs_Lld_RxMsgAvailableCb_t
Ucs_Lld_StartCb_t
Ucs_Lld_StopCb_t
Ucs_Lld_TxTransmitCb_t
typedef void(* Ucs_Lld_ResetInicCb_t)(void *lld_user_ptr)

Notifies the LLD to reset the INIC.

If this function is called the low-level driver is responsible to perform an INIC hardware reset.

Parameters
lld_user_ptr User defined pointer which is provided in Ucs_Lld_Callbacks_t structure.


UNICENS: Ucs_Lld_RxMsgAvailableCb_t

  • Low-Level Driver
Ucs_Lld_ResetInicCb_t
Ucs_Lld_RxMsgAvailableCb_t
Ucs_Lld_StartCb_t
Ucs_Lld_StopCb_t
Ucs_Lld_TxTransmitCb_t
typedef void(* Ucs_Lld_RxMsgAvailableCb_t)(void *lld_user_ptr)

Callback function which is invoked as soon as port message objects are available again.

By implementing this callback function the low-level driver can avoid polling for Rx message objects. The low-level driver should wait for the function call as soon as Ucs_Lld_RxAllocateCb_t() returns NULL. Only then it shall call those functions again.

Parameters
lld_user_ptr User defined pointer which is provided in Ucs_Lld_Callbacks_t structure.


UNICENS: Ucs_Lld_StartCb_t

  • Low-Level Driver
Ucs_Lld_ResetInicCb_t
Ucs_Lld_RxMsgAvailableCb_t
Ucs_Lld_StartCb_t
Ucs_Lld_StopCb_t
Ucs_Lld_TxTransmitCb_t
typedef void(* Ucs_Lld_StartCb_t)(Ucs_Lld_Api_t *api_ptr, void *inst_ptr, void *lld_user_ptr)

Notifies the LLD to start transmitting and receiving messages.

Parameters
api_ptr | Reference to UNICENS LLD interface
inst_ptr | Reference to internal UNICENS handler
lld_user_ptr | User defined pointer which is provided in Ucs_Lld_Callbacks_t structure.


UNICENS: Ucs_Lld_StopCb_t

  • Low-Level Driver
Ucs_Lld_ResetInicCb_t
Ucs_Lld_RxMsgAvailableCb_t
Ucs_Lld_StartCb_t
Ucs_Lld_StopCb_t
Ucs_Lld_TxTransmitCb_t
typedef void(* Ucs_Lld_StopCb_t)(void *lld_user_ptr)

Notifies the LLD to stop/abort transmitting and receiving messages.

As soon as this function is called the low-level driver is not allowed to call any UNICENS API function.

Parameters
lld_user_ptr User defined pointer which is provided in Ucs_Lld_Callbacks_t structure.


UNICENS: Ucs_Lld_TxTransmitCb_t

  • Low-Level Driver
Ucs_Lld_ResetInicCb_t
Ucs_Lld_RxMsgAvailableCb_t
Ucs_Lld_StartCb_t
Ucs_Lld_StopCb_t
Ucs_Lld_TxTransmitCb_t
typedef void(* Ucs_Lld_TxTransmitCb_t)(Ucs_Lld_TxMsg_t *msg_ptr, void *lld_user_ptr)

Callback function which is invoked to transmit a single message to the INIC.

Parameters
msg_ptr | Reference to a single Tx message.
lld_user_ptr | User defined pointer which is provided in Ucs_Lld_Callbacks_t structure.


UNICENS: Getting Started

Getting Started

This section contains the information for getting started with UNICENS and it explains how to set up a basic example.

  • Preparations
  • Initialization
  • Service
  • Synchronous vs. Asynchronous Results
  • Application Message Service
  • Command Interpreter
  • Networking Management
  • Manager
  • Node Discovery
  • Programming
  • BackChannel Diagnosis
  • Routing Management
  • Node Scripting
  • Low-Level Driver


UNICENS: Preparations

Preparations

The following figure shows the directory structure of the extracted source package. It is recommended to keep the folder structure as is. This will simplify version updates in future.

Folder | Description
cfg | Contains configuration files that can be customized by the user.
doc | Contains the online documentation.
inc | Contains the C header files.
src | Contains the C source files.

Data Types

Data types must be defined within the header file cfg/ucs_types_cfg.h. The easiest way to make the data types available is to include the standard library <stdint.h>. If the compiler does not provide this library the following data types must be defined by the application.

Data Type | Definition
int8_t | Signed integer, 8 bit
int16_t | Signed integer, 16 bit
int32_t | Signed integer, 32 bit
uint8_t | Unsigned integer, 8 bit
uint16_t | Unsigned integer, 16 bit
uint32_t | Unsigned integer, 32 bit

The data type size_t is required for results of sizeof() operations. Typically size_t is define in <stddef.h>.

Data Type | Definition
size_t | Result of sizeof() operator

For boolean types the definition of bool has to be taken from <stdbool.h>. If this library is not available, the application has to define its own boolean data type based on an unsigned, 8-bit integer.

Data Type | Definition
bool | Unsigned integer, 8 bit

In conjunction with boolean variables and constants the constants true and false must be used exclusively. These constants are also defined in <stdbool.h>. If the library is not available, the following macros must be defined by the application.

#define true ((bool)1)
#define false ((bool)0)
Note
If the library is compiled under C++ the definition of bool, true and false must be adapted to the boolean data type used by that compiler.

Thread Safety

The library is not thread-safe. I.e., the configuration does not support the definition of mutexes and cannot handle calls from different thread contexts. Hence, the application has to ensure that the library is invoked correctly. This can be reached by the following approaches:

  • The application must call the UNICENS API always from the same thread (recommended).
  • The application must protect every UNICENS API call by mutexes or semaphores to avoid that concurrent threads access the API at the same time. Please note: API callback functions are invoked by ongoing API call. It is recommended to use context sensitive mutexes or to avoid further API calls from within an API callback function.

Static Configurations

The library provides some static configuration settings that must be specified at compile time. These settings are part of the file cfg/ucs_cfg.h and are pre-defined to default values. Hence, adjustment may be done when needed. The following settings are examples for the static configuration.

  • Define the maximum number of API instances that are available within one process.
  • Define the maximum number of remote nodes to be configured.
  • Define the number of Tx and Rx application messages that can be processed at a moment and the according payload size per message.
  • Enable/disable the library trace output.

Include Header File

To access the UNICENS API, the application must solely include the header file ucs_api.h.

#include "ucs_api.h" /* include the UNICENS header file */
int main(void)
{
/* ... */
return 0;
}

64-bit Support

The UNICENS library is designed portable and thus supports also 64-bit systems. Platform dependent settings can be modified in the configuration files. Please check the following settings to ensure that the configuration files are well adopted for a 64-bit system:

  • Check if data type definitions in cfg/ucs_types_cfg.h are correct.
  • Check if size_t is defined correctly.
  • If available, please include <stdint.h> and <stddef.h> for the target system.


UNICENS: Initialization

Initialization

Retrieving an API Instance

UNICENS supports to access multiple instances within one process space. One UNICENS API instance is dedicated to one INIC the associated network. Hence, it is possible to deal with multiple networks within one process space. The maximum number of UNICENS API instances must be configured in ucs_cfg.h.

The following definition configures UNICENS to be used with 2 INICs.

/* Number of API instances which can be created by function Ucs_CreateInstance().
Valid range: 1..10. Default value: 1.
*/
#define UCS_NUM_INSTANCES 2

Accordingly UNICENS can provide 2 API instances that can be retrieved by calling Ucs_CreateInstance(). The retrieved instance remains valid until the process ends. There is no need to return or re-create an already retrieved instance. The following code shows how to retrieve one API instance.

/* create UNICENS API instance */
Ucs_Inst_t* inst_ptr = NULL;
inst_ptr = Ucs_CreateInstance();
if (inst_ptr == NULL)
{
/* UNICENS cannot any further API instance.
Check configuration MACRO UCS_NUM_INSTANCES.
*/
return;
}

Configuration Structure

The application has to prepare a configuration structure in order to initialize UNICENS. Therefore, it has to provide a Ucs_InitData_t variable. It is recommended to set the variable to default values by calling Ucs_SetDefaultConfig(). After that the application shall set specific attributes of the variable. The function Ucs_SetDefaultConfig() can be called at any time and is not bound up with a certain API instance.

Ucs_InitData_t init_data;
Ucs_SetDefaultConfig(&init_data);

After the function returns, the application has to setup the configuration settings. The following section shows an example configuration.

init_data.user_ptr = &my_class;
/* General Section */
init_data.general.error_fptr = &App_OnGeneralError;
init_data.general.get_tick_count_fptr = &App_OnGetTickCount;
/* LLD Section */
init_data.lld.lld_user_ptr = &my_lld_class;
init_data.lld.start_fptr = &Lld_Start;
init_data.lld.stop_fptr = &Lld_Stop;
init_data.lld.tx_transmit_fptr = &Lld_TxTransmit;
init_data.lld.rx_available_fptr = &Lld_RxMsgAvailable;
/* Node Discovery Section */
init_data.nd.report_fptr = &App_OnNodeDiscoveryResult;
init_data.nd.eval_fptr = &App_OnNodeDiscoveryEval;

User References

By assigning init_data.user_ptr and init_data.lld.lld_user_ptr the application is able assign references of own objects to a certain UNICENS API instance. E.g., when driving 2 API instances the application can assign 2 different LLD objects. When UNICENS invokes LLD callback functions then one argument will provide the assigned lld_user_ptr. The application can simply forward the call to the actual LLD object.

void Lld_TxTransmit(Ucs_Lld_TxMsg_t *msg_ptr, void *lld_user_ptr)
{
CMyLldClass *my_lld = (CMyLldClass*)lld_user_ptr;
my_lld->Transmit(msg_ptr);
}

General Configuration

The callback general.error_fptr() is called if a general error occurs. The callback must adhere to function signature Ucs_ErrorCb_t. If a general error occurs the application must trigger a re-initialization of UNICENS. A simple example implementation is shown below.

Note
Ucs_Init() must not be called within general.error_fptr()!
void App_OnGeneralError(Ucs_Error_t error_code, void *user_ptr)
{
printf("General Error Occurred (Code: %u).\n\r", error_code);
App_TriggerReInit(); /* cleanup and re-initialize when leaving Ucs_Service() */
}

Timer Configuration

The UNICENS timer management requires a timer tick in milliseconds that is gathered via the callback general.get_tick_count_fptr(). The callback must adhere to function signature Ucs_GetTickCountCb_t. An example implementation for a Windows platform is shown below.

uint16_t App_OnGetTickCount(void *user_ptr)
{
DWORD tc = GetTickCount(); /* Get current tick count in milliseconds */
return (uint16_t)tc;
}

Initialization

The function Ucs_Init() must be called by the application to initialize one UNICENS API instance. library. The first argument is the reference to the API instance. The second argument is the reference to the initialization structure. The third argument is optional and can provide the reference to a result callback function. It is highly recommended to use the result callback to be able to handle possible errors during the initialization.

void App_Init(void)
{
...
if(Ucs_Init(inst_ptr, init_data, &App_OnInitResult) != UCS_RET_SUCCESS)
{
/* Handle synchronous initialization errors here... */
}
...
}
void App_OnInitResult(Ucs_InitResult_t result, void *user_ptr)
{
if(result != UCS_INIT_RES_SUCCESS)
{
/* Handle asynchronous initialization errors here... */
}
}


UNICENS: Service

Service

Initialization and Service

In order to initialize the UNICENS library the application shall call Ucs_SetDefaultConfig(), modify the initialization structure and call Ucs_Init().

After calling Ucs_Init() the application is allowed to call the Basic API functions of the UNICENS library. The Basic API functions are required to drive the API. It is responsible to update timers and process internal events. The following functions are Basic API functions:

  • Ucs_Service()
  • Ucs_ReportTimeout()

When the Ucs_Init() result callback notifies UCS_INIT_RES_SUCCESS, then the application is allowed to call the Basic API and all other API functions. After the UNICENS API notifies termination the application shall not call any API function but restart from scratch if required.

The following events will terminate the UNICENS API:

  • Ucs_Init() returns an error code
  • Ucs_Init() callback result is not UCS_INIT_RES_SUCCESS
  • The general.error_fptr() is invoked
  • Ucs_Stop() callback is invoked

Main Loop Service

The most easiest and robust way of driving the UNICENS library is to call Ucs_Init() to initialize the API and call Ucs_Service() as long as the UNICENS library is running. If Ucs_Service() does not require to process internal events it returns and will consume few CPU load.

int main(void)
{
bool running = true;
Ucs_SetDefaultConfig(/*...*/);
/* ... <- modify initialization structure here */
Ucs_Init(/*...*/);
while (running)
{
Ucs_Service();
}
return 0;
}
Attention
The initialization function Ucs_Init() must be called before the first execution of Ucs_Service().

The UNICENS library can deal also with delays of 10 milliseconds or more between two calls of Ucs_Service(). Although, the UNICENS library can reach high performance results (for delays <= 10ms). However, depending on the LLD and system design the use of delays between two Ucs_Service() calls will mean that an application may also increase the number of LLD Tx and Rx buffer for the communication with the INIC. It is recommended to run individual tests with high and low message load to find a balanced setup.

A good compromise to balance a system can be the following approach:

  • Call Ucs_Service() every 10ms
  • Call Ucs_Service() after the LLD has forwarded Rx messages to UNICENS library
  • Call Ucs_Service() after calling an API function (excluding Basic API functions)

Event Driven Service

A more efficient way of driving the UNICENS library is the Event Driven Service. In this mode the UNICENS library signals to the application when the next Service or Timer must be processed. Hence, the application can invoke the UNICENS API only if required. This decreases the CPU usage of UNICENS library to a minimum.

In order to run the Event Driven Service mode of the UNICENS library, the application must assign the following two callback functions in the initialization structure: general.request_service_fptr() and general.set_application_timer_fptr(). It is required that the application assigns both events callback functions. Otherwise, Ucs_Init() will return UCS_RET_ERR_PARAM.

A small example for Event Driven Service is printed below.

static bool event_timeout = false;
static bool event_service = false;
int main(void)
{
bool running = false;
Ucs_InitData_t init_data;
Ucs_SetDefaultConfig(&init_data); /* assign default configuration */
init_data.general.request_service_fptr = &App_OnServiceRequest; /* assign SERVICE event callback functions */
init_data.general.set_application_timer_fptr = &App_OnSetAppTimer; /* assign TIMER event callback function */
init_data.general.get_tick_count_fptr = App_OnGetTickCount; /* tick count requires the same timer
reference/resolution as the application timer
*/
/* .. further initialization .. */
if (Ucs_init(&init_data) == UCS_RET_ERR_SUCCESS)
{
running = true;
}
while (running)
{
Os_WaitForEvent(); /* stop until event occurs */
if (event_timeout != false)
{
event_timeout = false;
Ucs_ReportTimeout();
}
if(event_service != false)
{
event_service = false;
Ucs_Service();
}
}
return 0;
}

The implementation of the callback function App_OnServiceRequest() should be rather simply. It must wakeup the process and signal that Ucs_Service() must be called.

void App_OnServiceRequest(void)
{
event_service = true;
Os_SignalEvent(); /* wakeup process */
}
Note
During high message load the UNICENS library might also fire a high number of service request events in a short term. Consider that processing UNICENS library events might be at other processes expense. Therefore, balance your system also for high load scenario. During high message load it is acceptable to call Ucs_Service() in lower frequency than the service request event is fired by the UNICENS library.

The implementation of the callback function App_OnSetAppTimer() must consider some particularities.

  • The function is called to start or stop exactly one reference timer. This timer is the smallest timeout value handled by the UNICENS library. During runtime it is possible that internal timers are started or stopped. Hence, it is possible that the UNICENS library stops or restarts the reference timer with a new value before a previously started timer expires.
  • When the function is called and parameter timeout is "0", the application has to stop the reference timer.
  • When the function is called and parameter timeout is ">0", the application has to stop the reference timer and restart it with the new value.
  • It is important that general.set_application_timer_fptr() and general.get_tick_count_fptr() are using the same time reference and precision. Otherwise, a tick count with another precision might induce the UNICENS library to start again a timer with a small difference in timeout.
UINT timer_id = 0U;
void CALLBACK App_TimerCb (UINT uTimerID,
UINT uMsg,
DWORD_PTR dwUser,
DWORD_PTR dw1,
DWORD_PTR dw2)
{
timer_id = 0U; /* mark timer as stopped */
event_timeout = true;
Os_SignalEvent(); /* wakeup process */
}
void App_OnSetAppTimer(uint16_t timeout)
{
if (timer_id != 0U) /* stop reference timer if it is still running */
{
(void)timeKillEvent(timer_id);
timer_id = 0U;
}
if (timeout != 0U) /* start reference timer with the given timeout value */
{
timer_id = timeSetEvent((UINT)timeout,
(UINT)1,
&App_TimerCb,
(DWORD_PTR)0,
(UINT)TIME_ONESHOT);
}
}
uint16_t App_OnGetTickCount(void)
{
return (uint16_t)timeGetTime(); /* retrieve current tick count */
}


UNICENS: Synchronous vs. Asynchronous Results

Synchronous vs. Asynchronous Results

The UNICENS library distinguishes between synchronous and asynchronous returned results.

Synchronous Results

If a UNICENS API function detects an error the error is returned synchronously. For this purpose enumeration Ucs_Return_t is used. If no error has occurred UCS_RET_SUCCESS is returned.

Example:

Ucs_Return_t ret = Ucs_Network_Startup(ucs_inst_ptr, 52U, 0xFFFFU, my_result_fptr);

Asynchronous Results

The communication between the EHC and the INIC is an asynchronous process. If the EHC calls an INIC function the returned result is received asynchronously. Thus, most of the UNICENS API functions provide callback function pointers to receive INIC results/errors.

INIC Errors

If the INIC returns an error, this information is mapped to a UNICENS standard result structure Ucs_StdResult_t.

typedef struct
{
Ucs_Result_t code; /* Result/Error code */
uint8_t *info_ptr; /* INIC error data */
uint8_t size; /* Size of the INIC error data in bytes */
} Ucs_StdResult_t;

The result codes are based on the INIC error codes and UNICENS specific result codes. The mapping of the INIC and the UNICENS codes are shown in the table below.

UNICENS Result Code | INIC Error Code | Description
UCS_RES_SUCCESS | - | Operation succeed, no error occurred
UCS_RES_ERR_MOST_STANDARD | 0x01 | FBlock ID not available
 | 0x02 | Instance ID not available
 | 0x03 | Function ID not available
 | 0x04 | OP-Type not available
 | 0x05 | Invalid length
 | 0x06 | Parameter wrong/out of range
 | 0x0C | Segmentation error
UCS_RES_ERR_BUSY | 0x20 | INIC function specific error with error class "Busy (0x01)". Process in INIC is currently busy. Retries are possible in a reasonable time.
UCS_RES_ERR_PROCESSING |  | INIC function specific error with error class "Processing (0x02)". Process could not be finished. Retries are possible.
UCS_RES_ERR_CONFIGURATION |  | INIC function specific error with error class "Configuration (0x03)". Wrong configuration (values are temporarily out of range). Retries are not useful.
UCS_RES_ERR_SYSTEM |  | INIC function specific error with error class "System (0x04)". Current state of INIC or network prevents a successful execution of the process and retries are not possible. Retries are only possible when the state changes, but it is not clear when or if this happens (dynamic error).
UCS_RES_ERR_TIMEOUT | - | Timeout during operation
UCS_RES_ERR_TRANSMISSION | - | Transmission error occurred on the MOST network

Detailed Error Information

If one of the errors above occurs, the raw INIC error data is stored in a byte stream referenced by pointer info_ptr. Parameter size represents the size of the INIC error data in bytes.

Example:
The INIC returns the following error:

  • Error Code: 0x20
  • Error Class: 0x03
  • Error ID: 0x32
  • Addition Parameter: 0x4711

The information is stored in variable my_result which is from type Ucs_StdResult_t:

  • my_result.code: UCS_RES_ERR_CONFIGURATION
  • my_result.info_ptr[0]: 0x20
  • my_result.info_ptr[1]: 0x03
  • my_result.info_ptr[2]: 0x32
  • my_result.info_ptr[3]: 0x47
  • my_result.info_ptr[4]: 0x11
  • my_result.size: 5


UNICENS: Application Message Service

Application Message Service

Introduction

The Application Message Service (AMS) provides a central interface to transmit and receive application messages via the Control Channel of the MOST network. The so called application messages can have a payload size of up to 65535 bytes. Since the payload size of a single MOST control message is limited to 45 bytes (MOST150), an application messages with larger payload is transmitted via segmented transfer. The Application Message Service provides a common interface for single and segmented transfer and automatically performs segmentation.

See also API Reference, section Application Message Service.

Configuration

Any message which is received or transmitted via the Application Message Service requires a certain amount of memory. The UNICENS Library reserves an amount of memory which can be adjusted by defining the number und payload of AMS Tx and Rx messages. The configuration file ucs_cfg.h can be modified to your specific needs. A possible configuration might be:

  • 20 Rx Message Objects, each object has a reserved payload size of 400 bytes
  • 20 Tx Message Objects, each object has a reserved payload size of 100 bytes

The corresponding configuration will look like this:

/* File: ucs_cfg.h */
#define UCS_AMS_NUM_RX_MSGS 20U
#define UCS_AMS_SIZE_RX_MSG 400U
#define UCS_AMS_NUM_TX_MSGS 20U
#define UCS_AMS_SIZE_TX_MSG 100U

Initialization

Prior to the call of Ucs_Init(), the application is able to configure the AMS-related part of the initialization structure. The following table provides a brief overview of all parameters.

Parameter | Default | Mandatory | Description
rx.message_received_fptr | NULL | No | Callback function that is invoked on message reception
tx.message_freed_fptr | NULL | No | Callback function that is invoked if memory dedicated to a Tx message is freed after a prior allocation has failed
tx.default_llrbc | 10 | No | Default low-level retry block count for Tx messages

The code below shows a possible initialization sequence of the Application Message Service.

void App_Initialize(void)
{
Ucs_InitData_t init_data;
Ucs_SetDefaultConfig(&init_data);
init_data.ams.tx.default_llrbc = 4U;
init_data.ams.tx.message_freed_fptr = &App_OnAmsTxMessageFreed;
init_data.ams.rx.message_received_fptr = &App_OnAmsRxComplete;
/* ... further initialization ... */
Ucs_Init(&init_data, &App_OnInitResult);
}
See also Getting Started, section Initialization.

Transmission of Messages

In order to transmit an application message you haves to process the following steps.

  1. Retrieve a message object by calling Ucs_AmsTx_AllocMsg() and specifying the needed amount of payload.
  2. Modify the attributes of the given message object.
  3. Take care not to modify data_ptr[] beyond the specified amount of payload.
  4. Transmit the message object by calling Ucs_AmsTx_SendMsg().
  5. Optionally check the transmission result after the transmission has finished.

The following example explains how to retrieve a message object with a payload size of 3 bytes. Be aware of the function Ucs_AmsTx_AllocMsg() might return NULL if it is not possible to allocate the required amount of memory for the message.

void App_SendMessage(void)
{
Ucs_AmsTx_Msg_t *tx_ptr = Ucs_AmsTx_AllocMsg(20U);
if (tx_ptr != NULL)
{
Ucs_Return_t ret;
tx_ptr->destination_address = 0x202U;
tx_ptr->msg_id = 0x1234U;
/* it is possible to set a smaller data_size than */
tx_ptr->data_size = 3U; /* earlier defined when calling Ucs_AmsTx_AllocMsg() */
tx_ptr->data_ptr[0] = 0xAAU;
tx_ptr->data_ptr[1] = 0xBBU;
tx_ptr->data_ptr[2] = 0xCCU;
ret = Ucs_AmsTx_SendMsg(tx_ptr, &App_OnTxMessageComplete);
(void)printf("App_SendMessage(): called, tx_ptr=0x%04p, ret=%02X\n", tx_ptr, ret);
if (ret != UCS_RET_SUCCESS)
{
Ucs_AmsTx_FreeUnusedMsg(running_inst_ptr, tx_ptr);
}
}
else
{
/* not able to allocate enough memory for the message - wait until App_OnAmsTxMessageFreed() */
}
}

As soon as the transmission has been completed, the Application Message Service will invoke the callback function that was passed to Ucs_AmsTx_SendMsg(). The application's callback function must have the function signature of Ucs_AmsTx_CompleteCb_t. Within the callback function, the application is allowed to access the message object (read only). After the callback function has returned, the application is no longer allowed to access the message object.

An example implementation of such a callback function is shown below.

void App_OnTxMessageComplete(Ucs_AmsTx_Msg_t* msg_ptr, Ucs_AmsTx_Result_t result, Ucs_AmsTx_Info_t info)
{
if (result == UCS_AMSTX_RES_SUCCESS)
{
/* the transmission was finished successfully */
}
else
{
/* the application has to retry later ... */
}
/* the application is not allowed to reuse this message object */
}

Transmission of External Payload

An application may also transmit an application message with "external" payload. This might be useful to avoid copy operations if the message payload is already available in a continuous memory chunk. Process the following steps in order to transmit an application message with external payload.

  1. Prepare the external payload and take care that it is not modified during the transmission.
  2. Retrieve a message object by calling Ucs_AmsTx_AllocMsg(). It is sufficient to pass "0" as data_size. So the Application Message Service will not allocate a separate memory chunk for the payload.
  3. Modify the attributes of the given message object.
  4. Set data_ptr to the external payload reference. Set data_size to define the desired amount of payload to transmit.
  5. Transmit the message object by calling Ucs_AmsTx_SendMsg().
  6. Check the transmission result after the transmission has finished. The external payload is no longer used by the Application Message Service. I.e., the external payload may now be freed or reused for further transmission.

The following example explains how to retrieve a message object and assign a predefined string as external payload. It is important to pass a callback function to Ucs_AmsTx_SendMsg(). The Application Message Service calls this function after the transmission is finished.

/* provide fixed string "Hello" */
static uint8_t my_string[14] = {0x01,'H','e','l','l','o',' ','W','o','r','l','d','!',0x00};
static bool string_in_use = false; /* avoid concurrent access */
void App_SendMessageExt(void)
{
if (!string_in_use)
{
Ucs_AmsTx_Msg_t *tx_ptr = Ucs_AmsTx_AllocMsg(0U); /* define data_size "0" */
if (tx_ptr != NULL)
{
string_in_use = true; /* lock string against concurrent access */
tx_ptr->destination_address = 0x202U;
tx_ptr->msg_id = 0x1234U;
tx_ptr->data_ptr = my_string; /* now set external data and size */
tx_ptr->data_size = 14U;
ret = Ucs_AmsTx_SendMsg(tx_ptr, &App_OnTxStringComplete);
(void)printf("App_SendMessage(): called, tx_ptr=0x%04p, ret=%02X\n", tx_ptr, ret);
if (ret != UCS_RET_SUCCESS)
{ /* free memory if transmission is not possible */
Ucs_AmsTx_FreeUnusedMsg(running_inst_ptr, tx_ptr);
string_in_use = false;
}
}
else
{
/* not able to allocate enough memory for the message - wait until App_OnAmsTxMessageFreed() */
}
}
}

After completed transmission, the Application Message Service will invoke the callback function that was passed to Ucs_AmsTx_SendMsg(). The application is responsible to free or reuse the external payload. The Application Message Service will no longer access it.

static void App_OnTxStringComplete(Ucs_AmsTx_Msg_t* msg_ptr, Ucs_AmsTx_Result_t result, Ucs_AmsTx_Info_t info)
{
uint8_t* payload_ptr;
/* ... handle transmission result ... */
if (msg_ptr->data_ptr == my_string) /* message object has shared string resource ? */
{
string_in_use = false; /* unlock string usage */
}
}

Reception of Messages

By calling ams.rx.message_received_fptr() the AMS notifies that a new Rx message was received and has been added to the Rx queue. It is recommended that the application processes the Rx queue asynchronously, i.e., not within the ams.rx.message_received_fptr(). Therefore, the AMS provides the functions Ucs_AmsRx_PeekMsg(), Ucs_AmsRx_ReleaseMsg() and Ucs_AmsRx_GetMsgCnt(). The example shows that the callback function is implemented to set the variable _process_rx to true. The following main loop will process Rx messages if the variable is set. Instead of implementing the callback function it is also possible to use Ucs_AmsRx_GetMsgCnt() to retrieve the number of available messages in the Rx queue.

void App_OnAmsRxComplete(void)
{
/* A new application message was received. */
/* Trigger an event to process the Rx queue asynchronously. */
}
int main(void)
{
/* initialization */
while (_running)
{
/* ... */ /* driving UNICENS and low-level driver */
if (Ucs_AmsRx_GetMsgCnt() > 0U) /* process all Rx messages in AMS queue */
{
Ucs_AmsRx_Msg_t *msg_ptr;
for (msg_ptr = Ucs_AmsRx_PeekMsg(); msg_ptr != NULL; msg_ptr = Ucs_AmsRx_PeekMsg())
{
uint16_t cnt;
(void)printf("AMS RX: from %04X -> ID-%04X [ ", msg_ptr->source_address, msg_ptr->msg_id);
for (cnt = 0U; cnt < msg_ptr->data_size; cnt++)
{
(void)printf("%02X ", msg_ptr->data_ptr[cnt]);
}
(void)printf("]\n");
/* ... */ /* process message now */
Ucs_AmsRx_ReleaseMsg(); /* free message and remove it from the queue */
}
}
}
return 0;
}

The asynchronous processing of the AMS Rx queue provides a comfortable way to process messages at the best moment for the application. During high message load it is possible that the application is not able to respond to a message immediately. In that case the application shall not call Ucs_AmsRx_ReleaseMsg(). Later, when it is able to process the message it can retrieve the same Rx message object by calling Ucs_AmsRx_PeekMsg().

Note
It is possible that Ucs_Service() flushes the AMS Rx queue. Hence, a reference returned by Ucs_AmsRx_PeekMsg() may become invalid during the call of Ucs_Service(). It is recommended to call Ucs_AmsRx_PeekMsg(), do the Rx message processing and call Ucs_AmsRx_ReleaseMsg() in one go. If the application does not call Ucs_AmsRx_ReleaseMsg() because it cannot finish the message processing, it is recommended to retry Ucs_AmsRx_PeekMsg() when message processing is possible again.
See also API Reference, section Application Message Service.


UNICENS: Command Interpreter

Command Interpreter

Introduction

The Command Interpreter provides structures and functions for parsing incoming messages.

Features:

  • allows dynamic adding and removing of MessageId Table
  • calls the belonging handler function

The application provides a MessageId Table which contains all supported MessageIds together with their belonging handler functions. The MessageId Table is an array of Ucs_Cmd_MsgId_t elements. Each element contains a MessageId (0x0000 .. 0xFFFE) and a pointer to the belonging handler function. The table ends with the termination entry {UCS_CMD_MSGID_TERMINATION, NULL}.

Usage

The application announces the MessageId Table with the function Ucs_Cmd_AddMsgIdTable(). The connection to the MessageId Table can be removed with the function Ucs_Cmd_RemoveMsgIdTable().

A received message is given to Ucs_Cmd_DecodeMsg(). This function retrieves the MessageId from the message and calls the belonging handler function. The handler function can return three values:

Value | Description
UCS_CMD_RET_SUCCESS | The handler function succeeded.
UCS_CMD_RET_ERR_TX_BUSY | The handler function could not send an answer because no free Tx Buffer was available.
UCS_CMD_RET_ERR_APPL | An error happened in handler function.

Example

The following code example shows how the Command Interpreter API function can be used:

Ucs_Cmd_MsgId_t App_MsgIdTable[] =
{
{ 0x1234U, App_Handler_1234},
{ 0x1238U, App_Handler_1238},
{ UCS_CMD_MSGID_TERMINATION, NULL }
};
void main(uint8_t argc, char *argv[])
{
...
Ucs_Cmd_AddMsgIdTable(ucs_inst_ptr, &App_MsgIdTable[0]);
...
while(1)
{
Ucs_AmsRx_Msg_t *msg_rx_ptr = Ucs_AmsRx_PeekMsg(ucs_inst_ptr);
if (msg_rx_ptr != NULL)
{
Ucs_Cmd_Return_t cmd_ret;
cmd_ret = Ucs_Cmd_DecodeMsg(ucs_inst_ptr, msg_rx_ptr);
if (cmd_ret == UCS_CMD_RET_SUCCESS)
{
Ucs_AmsRx_ReleaseMsg(ucs_inst_ptr);
}
else
{
/* appropriate error handling */
}
}
}
}
Ucs_Cmd_Return_t App_Handler_1234(Ucs_AmsRx_Msg_t *msg_rx_ptr, void *user_ptr)
{
uint16_t cnt;
/* print source address */
(void)printf("App_Handler_1234() called from 0x%04X.\n", msg_rx_ptr->source_address);
/* print payload */
(void)printf(" Payload: ");
for (cnt = 0U; cnt < msg_rx_ptr->data_size; cnt++)
{
(void)printf("%02X ", msg_rx_ptr->data_ptr[cnt]);
}
(void)printf("\n");
return UCS_CMD_RET_SUCCESS;
}
Ucs_Cmd_Return_t App_Handler_1238(Ucs_AmsRx_Msg_t *msg_rx_ptr, void *user_ptr)
{
uint16_t cnt;
/* print source address */
(void)printf("App_Handler_1238() called from 0x%04X.\n", msg_rx_ptr->source_address);
/* print payload */
(void)printf(" Payload: ");
for (cnt = 0U; cnt < msg_rx_ptr->data_size; cnt++)
{
(void)printf("%02X ", msg_rx_ptr->data_ptr[cnt]);
}
(void)printf("\n");
return UCS_CMD_RET_SUCCESS;
}


UNICENS: Networking Management

Networking Management

The UNICENS API provides functions that are used to startup and to shutdown the network. It also provides callback functions to observe MOST network parameters.

Starting Up the Network

For starting up the MOST network out of the off state, function Ucs_Network_Startup() must be called. An optional callback function can be used, to monitor the result of the startup command. The callback must adhere to function signature Ucs_StdResultCb_t. In the following example, the result callback is not used.

if (Ucs_Network_Startup(ucs_inst_ptr, 52U, 0xFFFFU, NULL) != UCS_RET_SUCCESS)
{
/* Handle synchronous error here... */
}

Shutting Down the Network

For shutting down the MOST network, function Ucs_Network_Shutdown() must be called. It also provides an optional callback function to monitor the result of the shutdown command. The callback must adhere to function signature Ucs_StdResultCb_t. The following example uses Ucs_Network_Shutdown() in combination with the optional result callback.

void foo(void)
{
...
if(Ucs_Network_Shutdown(ucs_inst_ptr, &App_OnNwShutdownResult) != UCS_RET_SUCCESS)
{
/* Handle synchronous error here... */
}
...
}
void App_OnNwShutdownResult(Ucs_StdResult_t result, void *user_ptr)
{
if(result.code != UCS_RES_SUCCESS)
{
/* Handle asynchronous error here... */
}
}

Observe Network Information

The UNICENS API provides further information about the Network Status. For this purpose the application has the possibility to register the following callback function during initialization time.

Network Status

Callback function net.cb_fptr() reports information about the Network Status. The function must adhere to signature Ucs_Network_StatusCb_t. The following parameters are reported.

  • Events
  • Availability
  • Availability Information
  • Availability Transition Cause
  • Node Address
  • Node Position
  • Max Position
  • Packet Bandwidth
Ucs_InitData_t init_data;
/* Register callback function for Network Status */
init_data.network.status.cb_fptr = &App_OnUcsNetworkStatus;

If at least one of the Network Status parameters has been changed, this function is invoked. The first argument of the function is a bitmask. This mask indicates which parameters have been changed since the last function call. If a bit is set the corresponding parameter has been changed since the last update. A simple example implementation is shown below.

void App_OnUcsNetworkStatus(uint16_t change_mask,
uint16_t events,
Ucs_Network_Availability_t availability,
Ucs_Network_AvailInfo_t avail_info,
Ucs_Network_AvailTransCause_t avail_trans_cause,
uint16_t node_address,
uint8_t node_position,
uint8_t max_position,
uint16_t packet_bw)
{
/* Check update of third parameter "availability" */
if((change_mask & UCS_NW_M_AVAIL) != 0U)
{
switch(availability)
{
case UCS_NW_NOT_AVAILABLE:
(void)printf("\n\rNetwork Not Available\n\r");
break;
case UCS_NW_AVAILABLE:
(void)printf("\n\rNetwork Available\n\r");
break;
default:
break;
}
}
/* Handle other Network Status parameters here! */
}

Notification Bitmasks

Furthermore, it is possible to configure the notifications for Network Status. When initializing the corresponding callback function pointer, the user has the possibility to specify a notification bitmask. This mask indicates for which parameters the notification shall be enabled. If such a bit is set and the corresponding parameter has been changed the notification callback function is invoked.

This is an optional parameter. If the mask is not modified, notifications for all of the parameters are enabled.

The following example shows the usage of the notification bitmask.

Ucs_InitData_t init_data;
/* Register callback function for Network Status */
init_data.network.status.cb_fptr = &App_OnUcsNetworkStatus;
/* Notifications are enabled for parameters "availability" and "node_position" */
init_data.network.status.notification_mask = (UCS_NW_M_AVAIL) | (UCS_NW_M_NODE_POS);
See also API Reference, section Ucs_Network_Status_t.


UNICENS: Manager

Manager

Introduction

The Manager is an optional component that automatically handles the following tasks:

  • Force the network to available state
  • Re-initialization of nodes if necessary
  • Automatically starts the NodeDiscovery and the RoutingManagement
  • Automatically handles the NodeDiscovery tasks according to a preset list of nodes
  • Automatically announces nodes as available/not available to the RoutingManagement

If the application uses a dynamic approach for the RoutingManagement it is recommended to use the function Ucs_Rm_SetRouteActive() together with Manager component.

Enable the Manager in the initialization structure.

init_data.mgr.enabled = true;
Note
Since the manager already handles a set of tasks that may also be done by hand it is necessary to enable the Manager and to not access the API which as handles by the Manager.

Do not access the following functions if the Manager is enabled:

  • Ucs_Network_Startup()
  • Ucs_Network_Shutdown()
  • Ucs_Network_ForceNotAvailable()
  • Ucs_Nd_Start()
  • Ucs_Nd_Stop()
  • Ucs_Nd_InitAll()
  • Ucs_Rm_Start()
  • Ucs_Rm_SetNodeAvailable()

The following callback functions will not work if the Manager is enabled:

  • init_data.nd.eval_fptr
  • init_data.nd.report_fptr
See also API Reference, section Manager.

Declaration of Nodes and Routes

The application must define a set of structures that are required as input for the Manager. Basically the application must provide a list of nodes and a list of routes.

Note
It is important that each node in the "list of nodes" has a valid pointer to a node signature. Within the node signature the node_address attribute must be set to the value as set in the "identification string" of the respective node (INIC). Each node must be configured with a unique node_address. Other values inside the identification string are not evaluated by the Manager.

The code below shows a setup of two nodes and one route for synchronous streaming. Since the route is initialized as "active" it is automatically created as soon as both nodes are available. The application does not need to activate this route at a certain time.

/*------------------------------------------------------------------------------------------------*/
/* Nodes */
/*------------------------------------------------------------------------------------------------*/
#define APP_NODES_NUM 2U
static Ucs_Signature_t signature201 = {0x201U /*node_address*/};
static Ucs_Signature_t signature205 = {0x205U /*node_address*/};
static Ucs_Rm_Node_t app_nodes[APP_NODES_NUM] = {{&signature201, NULL, 0U}, {&signature205, NULL, 0U}};
/*------------------------------------------------------------------------------------------------*/
/* Routes */
/*------------------------------------------------------------------------------------------------*/
/* Specification of XRM JOB OUT */
static Ucs_Xrm_MostSocket_t Xrm_Most_Sckt_Out = {UCS_XRM_RC_TYPE_MOST_SOCKET, 0x0D00U, UCS_SOCKET_DIR_OUTPUT,
UCS_MOST_SCKT_SYNC_DATA, 2U };
static Ucs_Xrm_DefaultCreatedPort_t Xrm_Usb_Port_1 = {UCS_XRM_RC_TYPE_DC_PORT, UCS_XRM_PORT_TYPE_USB, 0U};
static Ucs_Xrm_UsbSocket_t Xrm_Usb_Socket_In = {UCS_XRM_RC_TYPE_USB_SOCKET, &Xrm_Usb_Port_1,
UCS_SOCKET_DIR_INPUT, UCS_USB_SCKT_SYNC_DATA ,
0x01U/*endpoint*/, 0x0007U /*frames*/ };
static Ucs_Xrm_SyncCon_t Xrm_Sync_Conn_Src = {UCS_XRM_RC_TYPE_SYNC_CON, &Xrm_Usb_Socket_In,
&Xrm_Most_Sckt_Out, UCS_SYNC_MUTE_MODE_NO_MUTING, 0U };
/* Specification of XRM JOB IN */
static Ucs_Xrm_MostSocket_t Xrm_Most_Sckt_In = {UCS_XRM_RC_TYPE_MOST_SOCKET, 0x0D00U, UCS_SOCKET_DIR_INPUT,
UCS_MOST_SCKT_SYNC_DATA, 2U };
static Ucs_Xrm_DefaultCreatedPort_t Xrm_Usb_Port_2 = {UCS_XRM_RC_TYPE_DC_PORT, UCS_XRM_PORT_TYPE_USB, 0U};
static Ucs_Xrm_UsbSocket_t Xrm_Usb_Socket_Out = {UCS_XRM_RC_TYPE_USB_SOCKET, &Xrm_Usb_Port_2,
UCS_SOCKET_DIR_OUTPUT, UCS_USB_SCKT_SYNC_DATA ,
0x81U/*endpoint*/, 0x0007U /*frames*/ };
static Ucs_Xrm_SyncCon_t Xrm_Sync_Conn_Sink = {UCS_XRM_RC_TYPE_SYNC_CON, &Xrm_Most_Sckt_In,
&Xrm_Usb_Socket_Out, UCS_SYNC_MUTE_MODE_NO_MUTING, 0U };
/* Specification of the XRM jobs lists */
static Ucs_Xrm_ResObject_t * xrm_job_out[] = { &Xrm_Most_Sckt_Out, &Xrm_Usb_Port_1, &Xrm_Usb_Socket_In,
&Xrm_Sync_Conn_Src, NULL };
static Ucs_Xrm_ResObject_t * xrm_job_in [] = { &Xrm_Most_Sckt_In, &Xrm_Usb_Port_2, &Xrm_Usb_Socket_Out,
&Xrm_Sync_Conn_Sink, NULL };
/* Source and Sink Endpoints */
static Ucs_Rm_EndPoint_t endpoint_src = { UCS_RM_EP_SOURCE, &xrm_job_out[0], &app_nodes[0] };
static Ucs_Rm_EndPoint_t endpoint_sink = { UCS_RM_EP_SINK, &xrm_job_in[0], &app_nodes[1] };
/* Routes Specification */
#define APP_ROUTES_NUM 1U
static Ucs_Rm_Route_t app_routes[APP_ROUTES_NUM] = { {&endpoint_src, &endpoint_sink, true /*is_active*/, 66U} };

Initialization

The code below shows a possible initialization sequence of the Application Message Service.

void App_Initialize(void)
{
Ucs_InitData_t init_data;
Ucs_SetDefaultConfig(&init_data);
init_data.mgr.enabled = true;
init_data.mgr.report_fptr = &App_OnMgrReport;
init_data.mgr.packet_bw = 52U;
init_data.mgr.nodes_list_ptr = &app_nodes[0];
init_data.mgr.nodes_list_size = APP_NODES_NUM;
init_data.mgr.routes_list_ptr = &app_routes[0];
init_data.mgr.routes_list_size = APP_ROUTES_NUM;
/* ... further initialization ... */
Ucs_Init(&init_data, &App_OnInitResult);
}
See also Getting Started, section Initialization.

Status Reports

If the application logic requires information about the availability of nodes, it is possible to register an optional callback function mgr.report_fptr. See also the initialization code above. The following code shows an implementation of this function.

static void App_OnMgrReport(Ucs_MgrReport_t code, uint16_t node_address, Ucs_Rm_Node_t *node_ptr, void *user_ptr)
{
(void)printf("App_OnMgrReport(): code=%d, node_addr=0x%04X, node_ptr=%p\n", code, node_address, node_ptr);
}


UNICENS: Node Discovery

Node Discovery

Introduction

The idea behind the Node Discovery service is that nodes are allowed to use the bus only if they meet certain requirements. A central instance detects all nodes and checks if they fit to the intended system. Nodes passing the check get an explicit "invitation" to join the system.

Initialization

The application provides the two callback functions of the Node Discovery service.

Ucs_InitData_t init_data;
/* Node Discovery Section */
init_data.nd.report_fptr = &App_OnNodeDiscoveryResult;
init_data.nd.eval_fptr = &App_OnNodeDiscoveryEval;
See also Getting Started, section Initialization.
Note
The function names App_OnNodeDiscoveryResult() and App_OnNodeDiscoveryEval() are just example names. Nevertheless they will be used in the description below to designate the respective functions.

Operation

The application maintains at least two lists:

set_list

Contains the signatures of the nodes the system shall contain.

device_list
Contains the signatures of the nodes detected in the system.

For debuggting purposes it may be useful to have a third list:

unknown_list

Signatures of the nodes which are detected but are not part of the set_list.

After startup all nodes are initialized and not part of the system. The application starts the Node Discovery service by calling Ucs_Nd_Start(). It asks every node for its signature (Ucs_Signature_t). Each detected node will be presented to the application via the callback function App_OnNodeDiscoveryEval(). In this function the application decides how the Node Discovery service shall proceed with the node.

The evaluation has to follow these rules:

  • If the node is not part of the set_list, it is regarded as unknown (UCS_ND_CHK_UNKNOWN) and will be ignored.
  • If the node is part of the set_list and is not yet in the device_list, the Node Discovery Service shall try to add the node to network (UCS_ND_CHK_WELCOME).
  • If the node is already part of the device_list, there are two possibilities: the node in the device_list experienced a reset or there are two nodes with the same signature. Evaluation result is UCS_ND_CHK_UNIQUE. The Node Discovery service will perform further tests.

The result of the evaluation is passed as the return value of App_OnNodeDiscoveryEval() (for possible values see Ucs_Nd_CheckResult_t).

When the Node Discovery process for a certain node is finished, the callback function App_OnNodeDiscoveryResult() is called. Its parameter code informs the application about the result of the node (for possible values see Ucs_Nd_ResCode_t).

The Node Discovery service asks periodically for new nodes. So it will detect nodes which start up slowly and nodes which experienced a reset.

App_OnNodeDiscoveryResult() informs also about general events like NetOff, unexpected error and stop of the Node Discovery service by application command. In these cases the parameter signature will be NULL.

If a Netoff event happens, the Node Discovery service stops. It restarts automatically if it detects a NetOn event.

The application can stop the Node Discovery service via Ucs_Nd_Stop().

It is possible to reset all nodes to the initial state they had after startup by calling Ucs_Nd_InitAll().


UNICENS: Programming

Programming

Introduction

The Programming API allows to program the ConfigString and/or the IdentString of a single node in the system.

Initialization

The Programming API has no initialization parameters.

Operation

Start

The Programming service assumes that the target node has received a Hello.Get command. Programming is started by calling Ucs_Prog_Start(). It requires the following parameters:

self

Reference to the UNICENS instance (Ucs_Inst_t).

node_id

The node position address of the the node to be programmed.

signature

Signature of the the node to be programmed as it was reported by Hello.Status during the Node Discovery (Ucs_Signature_t).

session_type

Defines the set of MemIDs (see command_list) (Ucs_Prg_SessionType_t).

command_list

Array of programming tasks of type Ucs_Prg_Command_t. Currently each entry corresponds to one ExtendedNetworkControl.MemoryWrite command. The array ends with an entry whose data_length is 0 or data is NULL .

mem_id

Represents the memory resource to be written.

address

Defines the memory location at which the writing operation starts.

unit_length

Sets the number of memory units to be written. Memory units can be unsigned bytes, unsigned words or unsigned masked data depending on the memory type.

data_length

Total length of data.

data
Contains the actual data written to the memory resource and formatted as memory units.

result_fptr

Callback providing the result of the Programming task (Ucs_Prg_ReportCb_t).

Result

When the Programming service finishes, it provides its result via the result_fptr callback function.

code

Result values of the Programming service (Ucs_Prg_ResCode_t).

function

Describes the function where an error occurred (Ucs_Prg_Func_t).

ret_len

Length of the following error parameter field parm. It is 0 if no error occurred.

parm

Pointer to the parameters of a potential error message. The meaning of these parameters can be derived from function and the respective EXC functions.

user_ptr

User reference as provided in Ucs_InitData_t::user_ptr


UNICENS: BackChannel Diagnosis

BackChannel Diagnosis

Introduction

BackChannel Diagnosis is performed on the TimingMaster node. It inspects the ring segment by segment until it finds a ring break or detects a closed ring.

It cannot be performed during Node Discovery or Programming service.

Operation

Calling Ucs_Bcd_Start() starts the BackChannel Diagnosis. The function has a parameter report_fptr. It points to the report callback function. report_fptr will deliver a result for each inspected segment as well as a result which indicates the end of the diagnosis session.

Segment number 0 denotes the segment following the TimingMaster.

Parameter code | Parameter segment | Description
UCS_BCD_RES_SUCCESS | segment number | current segment is not broken
UCS_BCD_RES_NO_RING_BREAK | segment number | No ring break detected. segment = number of nodes - 1.
UCS_BCD_RES_RING_BREAK | segment number | Ring break detected in current segment.
UCS_BCD_RES_TIMEOUT1 | segment number | Error during diagnosis: no communication on back channel.
UCS_BCD_RES_TIMEOUT2 | UCS_BCD_DUMMY_SEGMENT | Error during diagnosis: no result received from local INIC.
UCS_BCD_RES_ERROR | UCS_BCD_DUMMY_SEGMENT | An unexcpected error occurred. BackChannel Diagnosis was stopped.
UCS_BCD_RES_END | UCS_BCD_DUMMY_SEGMENT | BackChannel Diagnosis ended regularly.


UNICENS: Routing Management

Routing Management

Introduction

The routing management is an aspect of the INIC Resources Management that implements the connectivity between sources and sinks endpoints respectively sockets from a device perspective (see picture below).

A (virtual) route is a logical unidirectional connection between two endpoints. An endpoint acts as a MOST connection in INIC plus the internal linked resources.
The routing management consists of following features:

  • Create a route
  • Destroy a route
  • Monitor created routes and XRM resources
  • Report each route state to the user application callback functions.

The UNICENS library provides therefore a set of functions to fulfill the above features. These will be depicted in the next sections.

Configuration

Since the routing management is based on XRM (refer to MNS V3.2.x), the user has to change the default values of the following macros to suit his specific system needs.

  • UCS_NUM_REMOTE_DEVICES in ucs_cfg.h
  • UCS_XRM_NUM_JOBS in ucs_xrm_cfg.h
  • UCS_XRM_NUM_RESOURCES in ucs_xrm_cfg.h
/* File: ucs_cfg.h */
#define UCS_NUM_REMOTE_DEVICES 10U
/* File: ucs_xrm_cfg.h */
#define UCS_XRM_NUM_JOBS 40U
#define UCS_XRM_NUM_RESOURCES 200U

Initialization

The application shall provide following report callback functions in the UNICENS Init-Structure in order to receive any routing events. These are:

  • rm.report_fptr: Optional callback function that reports status information for all routes.
  • rm.debug_resource_status_fptr: Optional callback function that acts as a debug interface for XRM resources. User application can monitor the specified XRM resources via this interface.
  • rm.xrm.most_port_status_fptr: Optional callback function that reports streaming-related information for the MOST Network Port
  • rm.xrm.check_unmute_fptr: Optional callback function that signals the EHC to check the mute pin state of devices before attempting an unmute.

The example below illustrates how to initialize these callback functions:

Ucs_InitData_t ucs_init_data;
(void)Ucs_SetDefaultConfig(&ucs_init_data);
/* Routing Management init section. */
ucs_init_data.rm.report_fptr = &App_OnRoutingResult;
ucs_init_data.rm.debug_resource_status_fptr = &App_OnDebuggingXrmResources;
ucs_init_data.rm.xrm.most_port_status_fptr = &App_MostPortStatusCb;
ucs_init_data.rm.xrm.check_unmute_fptr = &App_CheckUnmuteStatusCb;
/* The report callback function for all routes */
static void App_OnRoutingResult(uint16_t route_id, Ucs_Rm_RouteInfos_t route_infos, void *user_ptr)
{
/* Do whatever is necessary here */
switch (route_infos)
{
case UCS_RM_ROUTE_INFOS_BUILT:
/* Route has been built */
break;
case UCS_RM_ROUTE_INFOS_DESTROYED:
/* Route has been destroyed */
break;
case UCS_RM_ROUTE_INFOS_PROCESS_STOP:
/* Route cannot be processed anymore due to Unicens Termination */
break;
default:
/* Route has been suspended */
break;
}
}
/* Handle MOST Port Status event here */
void App_MostPortStatusCb(uint16_t most_port_handle,
Ucs_Most_PortAvail_t availability,
Ucs_Most_PortAvailInfo_t avail_info,
uint16_t free_streaming_bw)
{
/* Do what needs to be.. */
}
/* Handle the Mute Pin check here */
void App_CheckUnmuteStatusCb (uint16_t node_address)
{
/* Check the state of the mute pin here before unmuting */
}
/* Debug interface for the XRM resources */
void App_OnDebuggingXrmResources (Ucs_Xrm_ResourceType_t resource_type, Ucs_Xrm_ResObject_t *resource_ptr, Ucs_Xrm_ResourceInfos_t resource_infos,
Ucs_Rm_EndPoint_t *endpoint_inst_ptr, void *user_ptr)
{
switch (resource_infos)
{
case UCS_XRM_INFOS_BUILT:
/* Resource has been built */
break;
case UCS_XRM_INFOS_DESTROYED:
/* resource has been destroyed */
break;
case UCS_XRM_INFOS_ERR_BUILT:
/* Resource cannot be built */
break;
default:
/* Resource cannot be destroyed */
break;
}
}

Operation

After initialization the application specifies the routes, endpoints, nodes as well as the XRM jobs and calls the Ucs_Rm_Start() function to initialize and start the routing process. This function must be called once and can only be called once. At this point, it is important to mention that there are some preconditions for the routes to be handled properly:

  • UNICENS is initialized
  • XRM macros have been set correctly (See above)
  • The network is available
  • The nodes, where the corresponding routes shall be built on, are available. That is, the user application has to call the function Ucs_Rm_SetNodeAvailable() whenever the node is available or the node is unavailable. In case the node is unavailable all created resources related to the node will be internally released and the user will receive a notification via the given callback functions report_fptr and debug_resource_status_fptr in Ucs_Rm_InitData_t.

In short the user application can anytime call the function Ucs_Rm_Start() with the specified list of routes but these routes will have been processing only when the above conditions are met.

It is important to note that, The build up of routes can take some times in case the routing process may need to perform retries when uncritical errors occur (e.g.: transmission errors, processing errors, etc) or when certain conditions are not met yet (e.g. network not available, node not available, etc.). By the way, the maximum number of retries is 0xFF and the minimum time between the retries is 50ms.

Also note that enabling the error and event trace output in ucs_cfg.h file (see below) will help user get detailed information on routes during processing.

/* File: ucs_cfg.h */
/*------------------------------------------------------------------------------------------------*/
/* Tracing & Debugging */
/*------------------------------------------------------------------------------------------------*/
# define UCS_TR_ERROR App_TraceError
# define UCS_TR_INFO App_TraceInfo
extern void App_TraceError(void *ucs_user_ptr, const char module_str[], const char entry_str[],
uint16_t vargs_cnt, ...);
extern void App_TraceInfo(void *ucs_user_ptr, const char module_str[], const char entry_str[],
uint16_t vargs_cnt, ...);

Example

The following example outlines the construction of a route between a local (Master) and a remote device incl. the settings of the above preconditions. In this example the UCS_ADDR_LOCAL_DEV macro is used to address the local device and should only be used for the local device.
This example is inserted as a guide and may not contain all of the necessary details and information.

/***************************************************************************************************
DESCRIPTION OF THE SPECIFIED ROUTE_66 (Refer to the above picture)
Source Endpoint [Synchronous Data Connection "Application -> Streaming Port -> MOST"]:
- Configuration Port A:
- Operation Mode: Generic
- Port Option: InOut
- Clock Mode: Output
- Clock Data Delay: NonDelayed
- Configuration Port B:
- Operation Mode: Generic
- Port Option: InOut
- Clock Mode: Output
- Clock Data Delay: NonDelayed
- Streaming Port A:
- Clock Config: 64 Fs
- Data Alignment: Left16Bit
- Streaming Socket:
- Direction: Input
- Data Type: Sync
- Bandwidth: 2
- Streaming Pin ID: SRXA0
- MOST Socket:
- Direction: Output
- Data type: Sync Data
- MOST Port Handle: 0x0D00
- Bandwidth: 2 bytes
Sink Endpoint [Synchronous Data Connection "MOST -> MediaLB -> Application (INIC on I/O-Board)"]:
- No Muting
- MediaLB Port:
- Clock Config: 512Fs
- MediaLB Socket:
- Direction: Output
- Data type: Sync Data
- Bandwidth: 2 bytes
- Channel address: 0x000A
- MOST Socket:
- Direction: Input
- Data type: Sync Data
- MOST Port Handle: 0x0D00
- Bandwidth: 2 bytes
*--------------------------------------------------------------------------------------------------
*/
/* Forward declaration of results callback function */
static void App_OnRoutingResult(uint16_t route_id, Ucs_Rm_RouteInfos_t route_infos, void *user_ptr);
static void App_OnInitResult(Ucs_InitResult_t result, void *user_ptr);
/* Set app flags */
static bool app_is_running = true;
static bool ucs_is_running = false;
static bool ampl_is_discovered = false;
static bool set_ampl_to_available = false;
static bool rtm_is_started = false;
/* Set route Activity Flag */
static uint8_t is_active = 0x01U;
/* Specification of XRM JOB OUT */
static Ucs_Xrm_MostSocket_t Xrm_Most_Sckt_Out = { UCS_XRM_RC_TYPE_MOST_SOCKET, 0x0D00U, UCS_SOCKET_DIR_OUTPUT, UCS_MOST_SCKT_SYNC_DATA, 2U };
static Ucs_Xrm_StrmPort_t Xrm_Str_Port_A = { UCS_XRM_RC_TYPE_STRM_PORT, 0x00U, UCS_STREAM_PORT_CLK_CFG_64FS, UCS_STREAM_PORT_ALGN_LEFT16BIT };
static Ucs_Xrm_StrmSocket_t Xrm_Str_Socket_In = { UCS_XRM_RC_TYPE_STRM_SOCKET, &Xrm_Str_Port_A, UCS_SOCKET_DIR_INPUT, UCS_STREAM_PORT_SCKT_SYNC_DATA, 2U, UCS_STREAM_PORT_PIN_ID_SRXA0 };
static Ucs_Xrm_SyncCon_t Xrm_Sync_Conn_Src = { UCS_XRM_RC_TYPE_SYNC_CON, &Xrm_Str_Socket_In, &Xrm_Most_Sckt_Out, UCS_SYNC_MUTE_MODE_NO_MUTING, 0U };
/* Specification of XRM JOB IN */
static Ucs_Xrm_MostSocket_t Xrm_Most_Sckt_In = { UCS_XRM_RC_TYPE_MOST_SOCKET, 0x0D00U, UCS_SOCKET_DIR_INPUT, UCS_MOST_SCKT_SYNC_DATA, 2U };
static Ucs_Xrm_MlbPort_t Xrm_Mlb_Port = { UCS_XRM_RC_TYPE_MLB_PORT, 0x00U, UCS_MLB_CLK_CFG_512_FS };
static Ucs_Xrm_MlbSocket_t Xrm_Mlb_Socket_Out = { UCS_XRM_RC_TYPE_MLB_SOCKET, &Xrm_Mlb_Port, UCS_SOCKET_DIR_OUTPUT, UCS_MLB_SCKT_SYNC_DATA, 2U, 0x000AU };
static Ucs_Xrm_SyncCon_t Xrm_Sync_Conn_Sink = { UCS_XRM_RC_TYPE_SYNC_CON, &Xrm_Most_Sckt_In, &Xrm_Mlb_Socket_Out, UCS_SYNC_MUTE_MODE_NO_MUTING, 0U };
/* Specification of the XRM jobs lists */
static Ucs_Xrm_ResObject_t * xrm_job_out[] = { &Xrm_Most_Sckt_Out, &Xrm_Str_Port_A, &Xrm_Str_Socket_In, &Xrm_Sync_Conn_Src, NULL };
static Ucs_Xrm_ResObject_t * xrm_job_in [] = { &Xrm_Most_Sckt_In, &Xrm_Mlb_Port, &Xrm_Mlb_Socket_Out, &Xrm_Sync_Conn_Sink, NULL };
/* Specification of signatures objects */
Ucs_Signature_t src_sig = { UCS_ADDR_LOCAL_DEV };
Ucs_Signature_t sink_sig = { 0x555U };
/* Specification of Nodes objects */
static Ucs_Rm_Node_t hmi_node = { &src_sig };
static Ucs_Rm_Node_t ampl_node = { &sink_sig };
/* Source and Sink Endpoints */
static Ucs_Rm_EndPoint_t endpoint_src = { UCS_RM_EP_SOURCE, &xrm_job_out[0], &hmi_node };
static Ucs_Rm_EndPoint_t endpoint_sink = { UCS_RM_EP_SINK, &xrm_job_in[0], &ampl_node };
/* Routes Specification */
static Ucs_Rm_Route_t route_66[] = { {&endpoint_src, &endpoint_sink, is_active, 66U} };
/* Main function */
void main ()
{
Ucs_InitData_t ucs_init_data;
/* create instance and prepare init structure */
ucs_inst_ptr = Ucs_CreateInstance();
(void)Ucs_SetDefaultConfig(&ucs_init_data);
/* Routing Management init section. */
ucs_init_data.rm.report_fptr = &App_OnRoutingResult;
/* Library initialization */
(void)Ucs_Init(inst_ptr, &init_data, &App_OnInitResult);
while (app_is_running)
{
if (ucs_is_running)
{
if (!rtm_is_started)
{
rtm_is_started = true;
/* Network start-up */
Ucs_Network_Startup(ucs_inst_ptr, 52U, 0xFFFFU, NULL);
/* Starts routes processing */
Ucs_Return_t ret_value = Ucs_Rm_Start(ucs_inst_ptr, &route_66[0], 1U);
if (ret_value != UCS_RET_SUCCESS)
{
/* Do whatever is necessary here */
}
}
if (set_ampl_to_available)
{
Ucs_Rm_SetNodeAvailable(ucs_inst_ptr, &ampl_node, true);
}
if (ampl_is_discovered)
{
(void)Ucs_Xrm_Stream_SetPortConfig(ampl_node.signature_ptr->node_address,
0x00U,
UCS_STREAM_PORT_OP_MODE_GENERIC,
UCS_STREAM_PORT_OPT_IN_OUT,
UCS_STREAM_PORT_CLK_MODE_OUTPUT,
UCS_STREAM_PORT_CLK_DLY_NONE,
&App_XrmStreamPortCfgResCb);
}
}
}
}
/* Notifies initialization result */
static void App_OnInitResult(Ucs_InitResult_t result, void *user_ptr)
{
if (result == UCS_INIT_RES_SUCCESS)
{
ucs_is_running = true;
}
}
/* The report callback function for all routes */
static void App_OnRoutingResult(Ucs_Rm_Route_t* route_ptr, Ucs_Rm_RouteInfos_t route_infos, void *user_ptr)
{
switch (route_infos)
{
case UCS_RM_ROUTE_INFOS_BUILT:
/* Route has been built */
break;
case UCS_RM_ROUTE_INFOS_DESTROYED:
/* Route has been destroyed */
break;
case UCS_RM_ROUTE_INFOS_PROCESS_STOP:
/* Route cannot be processed anymore due to Unicens Termination */
break;
default:
/* Route has been suspended */
break;
}
}
/* The result callback function for Streaming ports */
static void App_XrmStreamPortCfgResCb(uint16_t node_address,
uint8_t index,
Ucs_Stream_PortOpMode_t op_mode,
Ucs_Stream_PortOption_t port_option,
Ucs_Stream_PortClockMode_t clock_mode,
Ucs_Stream_PortClockDataDelay_t clock_data_delay,
Ucs_StdResult_t result,
void *user_ptr)
{
if (result.code == UCS_RES_SUCCESS)
{
set_ampl_to_available = true;
}
}

Additional Routing API

The Routing provides additional API functions to handle some runtime tasks. These functions are:

  • Ucs_Rm_SetRouteActive() : This functions sets a specific route to "active" or "inactive" at runtime.
  • Ucs_Rm_SetNodeAvailable() : This function sets the availability attribute (available or not available) of the given node and triggers the routing process to handle attached route(s).
  • Ucs_Rm_GetNodeAvailable() : This function retrieves the "available" flag information of a given node.
  • Ucs_Rm_GetAttachedRoutes() : This function retrieves the references of the routes attached to the given endpoint.
  • Ucs_Rm_GetConnectionLabel(): This function retrieves the ConnectionLabel of the given route.


UNICENS: Node Scripting

Node Scripting

Introduction

The idea behind the Node Scripting is to allow execution of custom scripts in remote Nodes. That is, user can specify scripts based on FBlock command syntax and run these on remote nodes by the use of Node Scripting module.
The module is designed and intended for the use of I2C and GPIO commands only. This means that using the Scripting module for any other FBlock INIC commands (MOST, MediaLB, USB, Streaming or Connection for example) is expressly prohibited.

A script is a structure data (see below) composed of:

  • The command based on INIC FBlock-Syntax to be transmitted
  • The expected result also based on INIC FBlock-Syntax.
  • The amount time [in milliseconds] to pause before sending the Tx command.
/*! \brief Structure of a node-script */
typedef struct Ucs_Ns_Script_
{
/*! \brief Specifies the pause which shall be set before sending
the Tx configuration message.
*/
uint16_t pause;
/*! \brief Send command to be transmitted. */
Ucs_Ns_ConfigMsg_t * send_cmd;
/*! \brief Expected result. */
Ucs_Ns_ConfigMsg_t * exp_result;
} Ucs_Ns_Script_t;

A Ucs_Ns_ConfigMsg_t message is based on INIC FBlock-Syntax and looks like this:

/*! \brief Structure of a ConfigMsg */
typedef struct Ucs_Ns_ConfigMsg_
{
/*! \brief FBlockId. */
uint8_t FBlockId;
/*! \brief InstId. */
uint8_t InstId;
/*! \brief FunktId. */
uint16_t FunktId;
/*! \brief OpCode. */
uint8_t OpCode;
/*! \brief Data length. */
uint8_t DataLen;
/*! \brief Reference to the Data */
uint8_t * DataPtr;
} Ucs_Ns_ConfigMsg_t;

Operation

The user specifies the desired scripts, binds them to the target nodes and then call the function Ucs_Ns_Run() for processing. The result of the operation is reported via the result callback function Ucs_Ns_ResultCb_t, which is passed by user in the arguments list of Ucs_Ns_Run(). In addition to this callback function and the referred UCS instance the function requires a reference to the Node that contains the script(s).

Ucs_Return_t Ucs_Ns_Run(Ucs_Inst_t *self, Ucs_Rm_Node_t * node_ptr, Ucs_Ns_ResultCb_t result_fptr);

The Ucs_Ns_Run() function starts the process to transmit the script(s) contained in the provided node and then checks for the expected results (specified by customer). The Node Scripting module will start a timer of 2600ms before sending the Tx command of each script. That is, if no incoming messages match the expected result of the script during this time the result code UCS_NS_RES_ERROR is returned via the Ucs_Ns_ResultCb_t user callback function. This error code is also get when the script module couldn't perform the device synchronization of the remote device (this can be read in the detailed error messages, if enabled. See below). Otherwise, if an incoming message matches the expected result, UCS_NS_RES_SUCCESS is returned.

The Ucs_Ns_Run() function will return UCS_RET_ERR_API_LOCKED when attempting to execute a script in a node that is currently busy with other(s) previous script(s). The Ucs_Ns_Run() function is namely locked for a Node when handling script(s) on this node and unlocked after reporting the result of the operation. However processing scripts can be executed on different nodes in parallel.

The detailed error messages can be read when enabling the error trace output in ucs_cfg.h file as shown below.

/* File: ucs_cfg.h */
/*------------------------------------------------------------------------------------------------*/
/* Tracing & Debugging */
/*------------------------------------------------------------------------------------------------*/
# define UCS_TR_ERROR App_TraceError
extern void App_TraceError(void *ucs_user_ptr, const char module_str[], const char entry_str[],
uint16_t vargs_cnt, ...);
/* File: app_trace.c */
void App_TraceError(void *ucs_user_ptr, const char module_str[], const char entry_str[],
uint16_t vargs_cnt, ...)
{
if (file_ != NULL)
{
char outbuf[256];
va_list argptr;
uint16_t timestamp = (uint16_t)timeGetTime() - startup_time;
va_start(argptr, vargs_cnt);
(void)vsprintf(outbuf, entry_str, argptr);
va_end(argptr);
(void)fprintf(file_, "%5u | [%u] | Error | %s | %s\n", timestamp, ucs_user_ptr, module_str, outbuf);
(void)fflush(file_);
}
}

Example

The example below outlines the execution of a script within a node with address 0x200. This example is inserted as a guide and may not contain all of the necessary details and information.

/* Flag that checks whether node with address 0x200 is discovered by Node Discovering */
static bool node200_discovered = false;
/* Forward declaration of result callback function */
static void App_OnScriptingResult(uint16_t node_address, Ucs_Ns_ResultCode_t result, void *user_ptr);
/* Configuration Msg specification */
static uint8_t tx_data [] = { 0x00, 0x40, 0x01, 0x01 };
static uint8_t rx_data [] = { 0x0F, 0x00 };
static Ucs_Ns_ConfigMsg_t tx_msg = { 0x00, 0x00, 0x6C1, 0x2, 4U, &tx_data };
static Ucs_Ns_ConfigMsg_t rx_msg = { 0x00, 0x01, 0x6C1, 0xC, 2U, &rx_data };
/* Scripts specification */
static Ucs_Ns_Script_t script_x = { 100U, &tx_msg, &rx_msg };
/* Signature specification */
Ucs_Signature_t sig_200 = { 200U };
/* Nodes objects Specification */
static Ucs_Rm_Node_t node_200 = { &sig_200, &script_x, 1U, 0U };
/* Main function */
void main(uint8_t argc, char *argv[])
{
/* ... */
if (node200_discovered)
{
(void)Ucs_Ns_Run(ucs_inst_ptr, &node_200, &App_OnScriptingResult);
}
/* ... */
}
/* The result callback function */
static void App_OnScriptingResult(Ucs_Rm_Node_t * node_ptr, Ucs_Ns_ResultCode_t result, void *user_ptr)
{
switch (result)
{
case UCS_NS_RES_SUCCESS:
/* Node can be set to "Available" for example */
Ucs_Rm_SetNodeAvailable(ucs_inst_ptr, node_ptr, true);
break;
case UCS_NS_RES_ERROR:
default:
/* Do whatever is necessary here */
break;
}
}


UNICENS: Low-Level Driver

Low-Level Driver

Introduction

The low-level driver (LLD) is responsible to forward Tx messages from the UNICENS library to the INIC and Rx messages from the INIC to the UNICENS library. The UNICENS library currently provides one interface to exchange control messages with the INIC. Therefore, the control messages will be wrapped in a so called Port Message. The low-level driver is responsible to transmit and receive the Port Messages over the interface that is adjusted in the INIC Configuration String.

Initialization

The following example shows how to assign low-level driver functions which are invoked by the UNICENS library.

bool Initialize(void)
{
Ucs_InitData_t init_data;
/* platform specific initialization of the low-level driver */
Lld_SysInitialize(/*system specific parameters*/);
/* assign init data */
Ucs_SetDefaultConfig(&init_data);
init_data.lld.start_fptr = &Lld_Start;
init_data.lld.stop_fptr = &Lld_Stop;
init_data.lld.tx_transmit_fptr = &Lld_TxTransmit;
init_data.lld.rx_available_fptr = &Lld_RxMsgAvailable;
/* ... further assignment and initialization ... */
/* create one instance of UCS */
inst_ptr = Ucs_CreateInstance();
if (inst_ptr != NULL)
{
if (Ucs_Init(inst_ptr, &init_data, &App_OnInitResult) == UCS_RET_SUCCESS)
{
return true;
}
}
return false;
}
See also Getting Started, section Initialization.

Local Data

The exemplary implementation of callback functions refers the following local data. In order to call UNICENS API functions the low-level driver has to store a set of callback functions and an internal handle which is required to invoke a callback function.

#define MAX_DATA_LEN 72 /* messages can be up to 72 bytes */
Ucs_Lld_Api_t *_cb_ptr; /* reference to UCS callback functions */
void *_h_ptr; /* reference to nun-public handler, which */
/* is necessary to invoke callback functions */
bool _rx_event; /* labels if the driver may read an available Rx message */
uint8_t _tx_buffer[MAX_DATA_LEN];
uint8_t _rx_buffer[MAX_DATA_LEN];

Start and Stop

The UNICENS library invokes the mandatory callback functions start_fptr() and stop_fptr() to signal when internal data is valid and the LLD may access UNICENS callback functions and message objects for transmission and reception.

The function Lld_SysInitialize() is not called by the UNICENS library. This example function is system specific and might be necessary to set local data to definite values and to initialize the device driver before UNICENS library will start to transmit and receive.

The low-level driver is allowed to initialize and run the communication with the INIC before the UNICENS Library calls Lld_Start(). While the UNICENS callback functions are invalid, it is recommended to discard incoming Rx messages.

Before leaving the function Lld_Stop() the LLD must ensure not accessing UCS memory and callback functions any longer.

void Lld_SysInitialize(void)
{
/* Initialization: system specific setup of the device driver, trace, queues, interrupts, etc.
Initialize local data, discard incoming messages from the INIC until Lld_Start() is called.
*/
_rx_event = false;
_api_ptr = NULL;
_h_ptr = NULL;
}
void Lld_Start(Ucs_Lld_Api_t* api_ptr, void *h_ptr, void *lld_user_ptr)
{
/* UNICENS is ready to transmit and receive.
Now, remember the callbacks and the handle which is
required to invoke a callback function.
*/
_api_ptr = api_ptr;
_h_ptr = inst_ptr;
}
void Lld_Stop(void *lld_user_ptr)
{
/* IMPORTANT: Do no longer invoke any UNICENS callback function and
immediately stop accessing UNICENS message objects.
I.e., ensure stopping asynchronous transmission and reception using UNICENS memory
before leaving this function (e.g., stop/wait DMA copy operations to/from UNICENS memory).
Incoming messages from the INIC should be discarded until Lld_Start() is called again.
*/
_api_ptr = NULL;
_h_ptr = NULL;
}

Message Transmission

The low-level driver must implement a transmit function which requires a reference to Ucs_Lld_TxMsg_t. The code section below shows the declaration of the Ucs_Lld_TxMsg_t and the referred Ucs_Mem_Buffer_t type. The Ucs_Mem_Buffer_t structure contains values to describe the pointer and the size of the buffer. Furthermore it is possible that one buffer refers a second buffer if next_buffer_ptr is set. This means that it is possible to concatenate multiple buffers. Furthermore, one message structure refers a buffer structure. The custom_next_msg_ptr is not set by UNICENS library. It can be used by the Low Level Driver to concatenate messages, e.g. for asynchronous transmission.

typedef struct Ucs_Mem_Buffer_
{
struct Ucs_Mem_Buffer_ *next_buffer_ptr;
uint8_t *data_ptr;
uint16_t data_size;
uint16_t total_size;
} Ucs_Mem_Buffer_t;
typedef struct Ucs_Lld_TxMsg_
{
struct Ucs_Lld_TxMsg_ *custom_next_msg_ptr;
Ucs_Mem_Buffer_t *memory_ptr;
} Ucs_Lld_TxMsg_t;

The transmit function shall copy the data from the memory buffers to the target buffer. Therefore, the low-level driver has to iterate over all buffers. After the low-level driver does no longer refer the message object, it has to call tx_release_fptr. It is important to call tx_release_fptr in the same order as the messages are passed to the transmit function.

void Lld_TxTransmit(Ucs_Lld_TxMsg_t *msg_ptr, void *lld_user_ptr)
{
Ucs_Mem_Buffer_t * buf_ptr;
uint16_t i = 0U; /* index of target buffer*/
if ((msg_ptr != NULL) && _api_ptr)
{
for (buf_ptr = msg_ptr->memory_ptr; buf_ptr != NULL; buf_ptr = buf_ptr->next_buffer_ptr)
{
memcpy(&_tx_buffer[i], buf_ptr->data_ptr, buf_ptr->data_size);
i += buf_ptr->data_size;
}
/* call synchronous transmit function of driver */
MY_TX(&_tx_buffer[0], msg_ptr->memory_ptr->total_size);
/* release the message object */
_api_ptr->tx_release_fptr(_h_ptr, msg_ptr);
}
}
Note
The transmit function has no return value. This means that the low-level driver itself has to handle asynchronous re-transmission if the interface is busy. Therefore, the Low Level Driver is able to enqueue multiple message objects by using custom_next_msg_ptr. If the LLD detects an unrecoverable transmission error the LLD shall abort the transmission and call tx_release_fptr().
See also API Reference, sections Low-Level Driver and Ucs_Lld_Api_t.

Message Reception

The low-level driver has to forward messages to the UNICENS library by calling rx_allocate_fptr() and rx_receive_fptr(). The structure of the provided Rx message object is shown in the code section below.

typedef struct
{
uint8_t* data_ptr;
uint16_t data_size;
} Ucs_Lld_RxMsg_t;

If rx_allocate_fptr() returns a valid reference to a Ucs_Lld_RxMsg_t structure, the low-level driver has to copy the received message to the data_ptr attribute. The value of data_size is already set to the same value as initially stated to rx_allocate_fptr(). After the copy operation, the low-level driver shall call rx_receive_fptr() which hands the Rx message over to the UNICENS library.

static void My_RxHandler(void)
{
if (_rx_event != false)
{
bool success = false;
uint16_t size = 0;
/* receive to LLD provided buffer */
success = MY_RX(&_rx_buffer[0], &size);
/* check if UNICENS is running and message is ok */
if ((_api_ptr != NULL) && (success != false) && (size < MAX_DATA_LEN))
{
Ucs_Lld_RxMsg_t *msg_ptr;
/* allocate message object from UCS */
msg_ptr = _api_ptr->rx_allocate_fptr(_h_ptr, size);
if (msg_ptr != NULL)
{
uint16_t i;
for (i=0; i<size; i++)
{ /* copy data to UCS message object */
msg_ptr->data_ptr[i] = _rx_buffer[i];
}
/* pass message object to UCS */
_api_ptr->rx_receive_fptr(_h_ptr, msg_ptr);
}
else
{
/* wait until Lld_RxMsgAvailable() is invoked */
}
}
else
{
/* discard Rx message - since UCS is not running */
}
}
}
See also API Reference, sections Low-Level Driver and Ucs_Lld_Api_t.


UNICENS: Appendix

Appendix
  • Release History
  • OS81118 User's Guide


UNICENS: Release History

Release History

V2.1.0

Release Date: | TBD
Supported INICs: | See conformity table (Package and Document information)

Resolved Items

Type | Description
Feature | Introduced so called "Manager" that forces the network to available, handles NodeDiscovery events and notifies nodes to the RoutingManagement. See related sections in API Reference or Getting Started.
Feature | Added Application Message API into Management Library. Added option to disable the Application Message Service within the initialization stucture.
Feature | Added new functions Ucs_Rm_GetAttachedRoutes() and Ucs_Rm_GetConnectionLabel().
Feature | Added support for node scripting.
Feature | Added support for reusable description of XRM resources.
Feature | Extended Ucs_Rm_XrmResDebugCb_t callback function to provide additional information related to endpoint.
Feature | Added new callback function network.status.cb_fptr and option network.status.notification_mask.
Feature | Added new macro UCS_FOOTPRINT_TINY that decreases RAM/ROM footprint for tiny controllers.
Feature | Added new macros UCS_VERSION_MAJOR, UCS_VERSION_MINOR, UCS_VERSION_RELEASE and UCS_VERSION_BUILD.
Change | Renamed attribute disable_inic_watchdog to inic_watchdog_enabled in Ucs_General_InitData_t.
Change | Changed signature of the trace macros UCS_TR_INFO and UCS_TR_ERROR. Added new parameter ucs_user_ptr of type void * that replaced the existing one ucs_inst_id.
Change | Renamed Ucs_Xrm_ResourceDebugCb_t to Ucs_Rm_XrmResDebugCb_t and moved the reference debug_resource_status_fptr into Ucs_Rm_InitData_t.
Change | Removed API functions Ucs_I2c_SyncDevice() and Ucs_Gpio_SyncDevice().
Defect | Sources: Fixed library crash when calling I2C API.
Defect | Sources: Fixed the bug of uncalled Ucs_Rm_ReportCb_t() after Ucs_Stop().
Defect | Sources: Improved robustness and maintainability of routing management.
Defect | Docu: Fixed wrong attribute names in AMS message structures of Getting Started.

V2.0.0

Release Date: | 2016-09-30
Supported INICs: | See conformity table (Package and Document information)

Resolved Items

Type | Description
Note | Initial Version


UNICENS: OS81118 User's Guide

OS81118 User's Guide

Introduction

Introduction

The OS81118 INIC (Intelligent Network Interface Controller) for a MOST device is part of a new generation of Network Interface Controllers that combines physical, MAC (Media Access Control), link and network layer on a single chip. It provides a highly cost-effective all-in-one multimedia network solution. A high level of integration and encapsulation of the network functions grants robustness, ease of use, and minimum time to market. In addition, the OS81118 INIC already implements most of the elements of MOST core compliance on-chip.

The INIC family consists of various ICs that support different speed grades of MOST and physical layers. Electrical transmission, for example over unshielded twisted pair (ePHY) or over the coax electrical physical layer (cPHY), is supported as well as transmission over the optical physical layer (oPHY).

Note: This user’s guide describes the INIC firmware version 2.4.0-76_RELEASE that supports INIC hardware revisions D1A and D2A.
Microchip recommends to use hardware revision D2A.
Hardware revision D1A is deprecated. Its use is limited in respect to a hardware issue. For details refer to Section 19.4.1 .

Interfacing to OS81118 INIC

The OS81118 INIC provides a Universal Serial Bus (USB) 2.0 High-Speed Port. The USB Port allows connection to the INIC (USB device) by an EHC (USB Host Controller) and supports on-PCB upstream USB 2.0 high-speed bulk transfers using a standard USB 2.0 physical layer at a rate of 480 Mbps. The USB Port provides access to the MOST network via an interface commonly found in most applications. This is especially useful for microcontrollers that do not support the typical interfaces (i.e., MediaLB ® ) found in an automotive application. USB can transport streaming data and packet data simultaneously.

Furthermore, the INIC provides a Serial Peripheral Interface (SPI) Port that supports the transmission of asynchronous packets over an interface that is compatible with many micro-processors, data converters, and other devices. When the SPI Port is created, it operates as an SPI bus slave.

In addition to these ports, an I 2 C Port and a MediaLB (Media Local Bus) Port are offered.
The I 2 C Port can transport control data. Simple designs with OS81118 can make use of the traditional I 2 C Port, enabling cost-effective realizations, while more advanced solutions may use the I 2 C Port in combination with USB for versatile and high-speed data transport.
The MediaLB Port serves as an on-PCB, serial inter-chip communication bus which can simultaneously transport all types of multimedia signals that are found in modern infotainment systems including streaming data, control data, and packet data. The MediaLB interface is synchronized to the MOST network thus providing seamless streaming capabilities to and from the MOST network without buffering and without delay. MediaLB allows cost effective interfacing of multiple ICs and their inter-chip communication. The communication between all participants of MediaLB is administered by INIC.

The MOST Port enables support of port-specific network handling, including the selection of the physical layer to be used.

Encapsulation of Network Services

The INIC encapsulates all network functionality including the major parts of the transport layers on chip. The result of this encapsulation is that INIC is a full network interface on silicon that cannot be set in undefined states, which can happen with traditional register controlled chips. Its command interface is the INIC API, which is an object-oriented software interface. In addition, the MOST NetServices V3.2.x that is running on the EHC, represents the application socket, implementing for example the application message service, a command interpreter, and a resource management.

A very small number of high-level commands with MOST syntax are used for chip control. For management of the streaming resources of INIC, a port and socket concept is provided. Streaming connections can be managed easily by this high-level object-oriented control interface, usually known for example from some operating systems.

The INIC architecture handles all time-critical, resource-intensive, and fail-safe relevant parts of the network functionality on-chip. Porting of the sensitive and time-critical portions of the network driver to customer’s environments is no longer required. This simplifies the implementation of MOST technology into a device and reduces time to market and development costs.

Since all functions necessary to operate the MOST network including a minimum NetBlock are implemented on chip, INIC can independently start/join the network quickly, without waiting for an application to start. INIC is independent from the EHC’s startup behavior allowing immediate availability of the network. A MOST device based on INIC is able to answer requests to the NetBlock and run MOST, even if the application on EHC is not running or not yet started, thus providing maximum robustness for the network. This self-contained operation of the network is called Network Protected Mode. INIC leaves this mode and provides the services of the MOST network to the application only after the application has executed an attach procedure with INIC.

MOST NetServices V3.2.x on EHC

MOST NetServices V3.2.x is the driver for the INIC running on the EHC. It implements the functionality of the MOST Network Service required by the MOST Specification [1] .
The MOST NetServices API is easy to learn, which minimizes the risk of errors, simplifies evaluation, expedites development time, and spares configuration efforts especially for engineers starting with MOST.

It is recommended to use the MOST NetServices V3.2.x, since it encapsulates the INIC API and it includes extended functionality. Thus the MOST NetServices V3.2.x provides the ideal solution for optimal network access.

Device Management

Device Management

The device management handles device-related tasks such as:

  • • Operation of the configuration interface
  • • Operation of the application interface
  • • Control communication through Port Message Protocol (PMP) channels
  • • Setup of message routing

The configuration interface and the application interface are two separate interfaces. This approach allows to operate the application interface without running the configuration interface and vice versa.

Port Message Protocol

To be able to exchange control messages, the INIC provides a set of independent Port Message Protocol (PMP) channels. The communication is handled through the PMP as specified inside the Port Message Protocol V2.0.1 Specification [3] . In PMP terms, the EHC will be referred to as the Primary Device (PD), the INIC as the Secondary Device (SD).

The PMP provides multiple virtual channels, stated as FIFO channels. Each PMP channel is assigned to a unique FIFO channel. This allows running multiple PMP channels through sockets on a single physical port, e.g., MediaLB Port. Flow control and hand-shaking mechanisms of the protocol prevent starvation or deadlocks when PMP channels share a common physical medium. Besides the bi-directional exchange of packet-based data, the protocol is used to communicate the delivery status back to the EHC and allows taking actions on delivery failures.

The PMP is not designed for a specific application and thus its definition must be completed per application. This chapter extends the PMP specification in a way that is necessary to establish INIC-specific PMP channels. Therefore, INIC-specific details of the protocol will be defined hereinafter as part of a higher communication layer. This includes the assigned PMP channel numbers (see Table 2-1 ), the data message content types and format, and the status message failure codes (see Table 2-3 ).

Channels

There are different kinds of PMP channels available:

  • • MOST Control Message (MCM) PMP channel
  • • INIC Control Message (ICM) PMP channel
  • • Remote Control Message (RCM) PMP channel

To address a specific PMP channel, the channel number must be specified in the FPH field of the PMP header when a message is transmitted. Received PMP messages can be matched to a specific PMP channel through the same FPH field. Addressing all PMP channels at once allows to transmit a message that will be received by all PMP channels. Typically, this feature will be used to transmit an UNSYNC command message to all channels. For all other communication, the destination channel should be unique. Table 2-1 contains a list of channel assignments.

Table 2-1: PMP Channel Assignment
Channel | PMP Channel Number
MCM | 0
ICM | 2
RCM | 6
MCM, ICM and RCM | 3

All PMP channels use the same Data Message format to transport a control message, as described in Section 2.1.2 .

Control Message Format

Figure 2-1 shows the Data Message format used to transport a control message. The message format consists of two main sections, the PMP header and the PMP payload.

Figure 2-1: Control Message Format

The PMP header contains the ExtType field that must be 0x00 (only one format type is supported).

If the INIC receives messages, any number of stuffing bytes is allowed. However, when transmitting messages to the INIC, it is strongly recommended to use 2 stuffing bytes. Control messages sent by the INIC will always use 2 stuffing bytes.

Figure 2-2 depicts the PMP payload fields. For the explanation of the PMP header fields refer to the Port Message Protocol V2.0.1 Specification [3] .

Figure 2-2: PMP Payload

Table 2-2: PMP Payload Format Field Description

Format Field

Size

Description

SrcDeviceID

16 bit 1

Source Device ID. Indicates the Logical Address of the device that sent the message.

SourceID 0x0001 (LocalID) indicates a message coming from an internal FBlock.
SourceID 0x0002 indicates a message coming from the EHC.

TgtDeviceID

16 bit 1

Target Device ID. Indicates the device address to which the message is sent (DeviceID). The following addresses are reserved: 0x0000, 0x0001, 0xFFFF.

0x0000 and 0xFFFF return format failure (0010) as transmitted message status.

0x0001 (LocalID) is the Local ID. A message using this address is used for internal communication between EHC and INIC.

FBlockID

8 bit

Function Block ID. Determines the function block that is addressed.

InstID

8 bit

Instance ID. Determines the instance of the FBlock to unambiguously address FBlocks of the same type.

FktID

16 bit 1

Function ID. Determines the property or method that is addressed.

TelID

4 bit 2

Telegram ID. Identifies the telegram type. Zero for a single transfer, non-zero (1...4) when transferring segmented messages.

OPType

4 bit 2

Operation Type. Determines the operation on the property or method. Also indicates the direction in which messages are exchanged.
This field is defined in the MOST Specification [1] .

LLRBC

8 bit

Low-Level Retry block count. The maximum block count number is limited to 100. If a higher number is entered, the value will be set to 100 automatically.

TelCnt

8 bit

Telegram Count. Counts the number of messages in the telegram. Starts at 0x00 for the first telegram and increases by 1 for each following telegram. When 0xFF is reached, the counter restarts at 0x00.

TelLen

8 bit

Telegram Length. Number of data bytes that are valid in the telegram. The maximum number is 45 bytes.

TelData

0...45 bytes

Contains the payload of the message.

Note 1: Big-endian

2: TelID and OPType share one byte; TelID is stored in the high-nibble (bits 4-7), OPType information is stored in the low-nibble (bits 0-3).

Control Message Transmission Status

If the INIC fails to deliver a control message, the affected PMP channel will turn into an error state and block further communication. If a PMP channel is blocked, the EHC is responsible to take action and perform error handling to unblock the channel and continue its operation. Other channels still remain usable, even if they share the same physical port. For more information refer to the Port Message Protocol V2.0.1 Specification [3] .

A channel failure will be reported through the PMP in form of a FIFO Control Message status, see Port Message Protocol V2.0.1 Specification [3] . The reason for the failure will be encoded into the status value with the TX_FAILURE type, see Table 2-3 . The error type categorizes the error values and indicates if a retry of the transmission is reasonable. If it is not reasonable, a retry will probably not solve the issue and instead result in the same error state again.

Table 2-3: Message Transmission Status
Status Type | Error Type | Value | Description
TX_FAILURE | CONFIG 1 | 0x01 | MOST network is not accessible. The MOST network is never accessible via the ICM PMP channel.
 | ERROR 2 | 0x08 | Buffer full
 |  | 0x09 | CRC error
 |  | 0x0A | Corrupted identifiers
 |  | 0x0B | Corrupted Preemptive Acknowledgement (PACK) or CRC Acknowledgement (CACK)
 |  | 0x0C | TX timeout
 | FATAL 1 | 0x10 | Wrong target
 |  | 0x11 | Own node address
 | UNAVAIL 1 | 0x18 | Control channel was switched off and a pending transmission has been canceled.
 |  | 0x19 | Control channel not available

Note 1: An application retry isn't reasonable.

2: Application can re-trigger transmission if reasonable.

The value 0x01 is reported only for control messages targeted to INIC internal FBlocks and Shadows. All other values are reported if any transmission error on the MOST network has occurred.

Configuration Interface

The configuration interface is used by an EHC to control the INIC and to access the MOST network for management purposes.

Typically, a MOST network device includes a microcontroller that manages the local INIC via the configuration interface. However, not all MOST network devices must necessarily incorporate a microcontroller. To cover these different approaches, the configuration interface supports the following cases of application:

  • • EHC controlled and
  • • Remote controlled.
EHC Controlled

The EHC-controlled configuration interface is shown in Figure 2-3 .

Figure 2-3: Configuration Interface – EHC Controlled

A local EHC can utilize the ICM and RCM channels to access the configuration interface. It has to use the internal Device ID 0x0002 as the source address when sending messages.

The address handling of a message forwarded by the INIC to the configuration interface is done as follows:

  • • The source address is always the Local ID 0x0001 if the message was not received from the MOST network.
  • • The target address for a received single cast message is replaced by the EHC’s internal Device ID 0x0002.
  • • The target address for a multi cast message is not replaced.

The usage of the ICM PMP channel is as follows:
Only access to local FBlock INIC.

The usage of the RCM PMP channel is as follows:
Full access to the MOST network for management purposes, which includes the control of remote INICs, NetworkMaster functionality and system diagnosis. Control messages received via the MOST network and/or the application interface (targeted to the Local ID 0x0001) are forwarded to the RCM PMP channel by using the following routing rules:

  • • All FBlock INIC status messages
  • • All FBlock NetBlock status messages
  • • All FBlock NetworkMaster request messages
  • • All FBlock ExtendedNetworkControl status message
Remote Controlled

A remote EHC controls the INIC via the MOST network. For that it is required to set the Configuration Interface to None (Remote Control Mode).

The remote-controlled configuration interface is shown in Figure 2-4 .

Figure 2-4: Configuration Interface – Remote Controlled

Operation Modes

Depending on the application design that requires either an EHC-controlled or a remote-controlled solution, the device needs to pass dedicated operation modes, see Figure 2-5 . Operation modes are:

  • • Protected Mode - used by the EHC-controlled and the remote-controlled application
  • • Attached Mode - solely used by the EHC-controlled application
  • • Remote Control Mode - solely used by the remote-controlled application

Figure 2-5: Configuration Interface Modes

Protected Mode

In Protected Mode the INIC autonomously controls all device management functionality including power management. In this mode all MOST sockets are destroyed and new sockets cannot be opened.

While in Protected Mode, the MOST network remains Available ; all diagnosis tasks (e.g., RBD, physical layer test) will be finished.

The Protected Mode incorporates the sub states:

  • • Cleanup process
  • • Unsynchronized
  • • ICM/RCM PMP channels synchronized

In Protected Mode INIC.DeviceStatus.Status.ConfigInterfaceMode is Protected .

Cleanup process

The cleanup process can be triggered by several indicators:

  • • PMP channel synchronization loss, which can occur on ICM and RCM PMP channels under the conditions shown in Figure 2-5 . Loss of synchronization can be based on different criteria, such as:
  • - The INIC receives a PMP SYNC command that addresses the ICM or RCM channel
  • - The PMP watchdog has expired
  • - PMP channel re-synchronization occurred due to an EHC reset
  • • The NetInterface Off state has been entered while being in Remote Control Mode.
  • • The application controlling the INIC remotely has sent an INIC.DeviceSync(Synchronization = Sync) or INIC.DeviceSync(Synchronization = UnSync) message.

After the cleanup process state has been entered, the INIC performs the following actions:

  • • Regains power management control
  • • Broadcasts NWM.Configuration.Status(NotOK) , if FBlock NetworkMaster is local. Will be forwarded to the application interface if in Attached Mode.
  • • Disables message routing to the ICM and RCM PMP channels
  • • Destroys all resources created during runtime
  • • Removes all FBlock INIC notifications
  • • Drives the MUTE/ RSOUT /GP8 pin low for 10 ms if the pin is configured to signal reset (see MUTE/RSOUT Configuration)
  • • Cancels a pending startup process that was initiated by function INIC.MOSTNetworkStartup()

Note: The INIC remains in the cleanup process state until all actions listed above have been finished. Therefore, all ICM and RCM PMP channel re-synchronization attempts are blocked during this period of time.

Unsynchronized

The unsynchronized state is the default state that is entered after the INIC is reset or a cleanup process has been finished.

ICM/RCM PMP channels synchronized

The PMP channel synchronized state is entered as soon as the EHC has finished ICM and RCM PMP channel synchronization. Now, the EHC has full access to all API functions.

Before PMP channel synchronization can start, the ICM and RCM PMP channels must have been setup and configured as explained in Section 2.1 . ICM and RCM PMP channels get synchronized by the PMP channel synchronization procedure, which is described in the Port Message Protocol V2.0.1 Specification [3] .

Attached Mode

In Attached Mode, the EHC takes over responsibility for the power management.

When the Attached Mode is entered by calling the API command INIC.DeviceAttach() , DeviceAttach (0x223), the INIC performs the following steps:

  • • Notifications to all API properties are set, except INIC.GPIOPortTriggerEvent()
  • • Enables message routing to the ICM and RCM PMP channels

In Attached Mode INIC.DeviceStatus.Status.ConfigInterfaceMode is Attached .

The following sequence chart shows the required steps to reach Attached Mode.

Figure 2-6: Steps to Reach Attached Mode

Remote Control Mode

In general, the Remote Control Mode is used only by devices that do not incorporate a local microcontroller. Hence, all functionality is remotely controlled and must be handled by a remote application.

To enable the Remote Control Mode, the configuration string property Configuration Interface must be set to None . The synchronization of the remote application to the INIC and entering the Remote Control Mode is done by sending the command sequence as shown in Figure 2-7 .

Figure 2-7: Remote Control Command Sequence

Note: To allow a clean synchronization, the command sequence must be executed by the remote application whenever:
- the network transitions from state NotAvailable to Available ,
- the remote application restarts, or
- the remotely controlled INIC restarts.

In Remote Control Mode the FBlock INIC is visible to the MOST network and reported by the INIC's FBlockIDs.Status() message. Hence, a proper InstID for the FBlock INIC should be assigned. This can be done by using the configuration string property Default Instance ID.

Control messages with OPTypes Set, SetGet, Start, and StartResult initiated from MOST network side are only executable in Remote Control Mode. However, the use of these operations is limited, see Table 2-4 . The following function operations are not accessible and therefore will return a function-specific error if the configuration interface is in Remote Control Mode.

Table 2-4: Limited Write Operations

Operation

INIC.DevicePowerOff.SetGet

INIC.DeviceAttach.StartResult

INIC.MOSTNetworkStartup.StartResult

INIC.MOSTNetworkShutdown.StartResult

INIC.MOSTNetworkRBD.StartResult

INIC.MOSTNetworkForceNotAvailable.SetGet

INIC.MOSTNetworkSystemDiagnosis.StartResult

INIC.MOSTNetworkSystemDiagnosisEnd.StartResult

Application Interface

The application interface is used by a local EHC to send and receive application-specific control messages. This interface can be used independently from the configuration interface. This allows to have a local EHC connected to the application interface although the INIC is remote controlled.

The application interface is shown in Figure 2-8 .

Figure 2-8: Application Interface

A local EHC can utilize the MCM PMP channel as the communication interface. It has to use the internal Device ID 0x0003 as the source address when sending messages.

The address handling of a message forwarded by the INIC to the application interface is done as follows:

  • • The source address is always the Local ID 0x0001 if the message was not received from the MOST network.
  • • The target address for a received single cast message is replaced by the EHC’s internal Device ID 0x0003.
  • • The target address for a multi cast message is not replaced.

The usage of the MCM PMP channel is as follows:
Full access to the MOST network for application purposes. Control messages received via the MOST network and/or the configuration interface (targeted to the Local ID 0x0001) are forwarded to the MCM PMP channel by using the routing rules as follows:

  • • All FBlock NetBlock request messages
  • • All NetworkMaster status messages
  • • All request or status messages that don’t match the other rules
Operation Modes

The application interface can reside in the following operation modes, see Figure 2-9 :

  • • Protected Mode - no network access
  • • Attached Mode - network access

Figure 2-9: Application Interface Modes

Protected Mode

In Protected Mode the application interface is not connected. The INIC autonomously answers to any NetBlock.FBlockIDs() request message.

The Protected Mode incorporates the following sub states:

• Cleanup process

• Unsynchronized

In Protected Mode INIC.DeviceStatus.Status.AppInterfaceMode is Protected .

Cleanup process

The cleanup process can be triggered by PMP channel synchronization loss, which can occur on the MCM PMP channel under the conditions as shown in Figure 2-5 . Loss of synchronization can be based on different criteria, such as:

  • • The INIC receives a PMP SYNC command that addresses the MCM PMP channel.
  • • The PMP watchdog has expired.
  • • PMP channel re-synchronization occurred due to an EHC reset.

After the cleanup process state has been entered, the INIC performs the following actions:

  • • Regains NetBlock handling
  • • Unregisters all application FBlocks by sending an appropriate FBlock list, if a NetworkMaster is known
  • • Disables message routing to the MCM PMP channel

Note: The INIC remains in the cleanup process state until all actions listed above have been finished. Therefore, all MCM PMP channel re-synchronization attempts are blocked during this period of time.

Attached Mode

In Attached Mode, the local EHC has full access to the MOST network.

When entering the Attached Mode, the INIC performs the following actions:

  • • Sends the latest NWM.Configuration.Status() to the EHC
  • • Stops autonomous NetBlock handling; this means, it stops answering FBlockID list requests and routes all appropriate NetBlock request to the EHC
  • • Enables message routing to the MCM PMP channel

In Attached Mode INIC.DeviceStatus.Status.AppInterfaceMode is Attached.

Configuration

As outlined in Section 22.1 , the configuration string allows the configuration of the peripheral ports used by the Configuration Interface and Application Interface.

The INIC automatically creates appropriate sockets and other resource objects. The chosen configuration will be available after chip startup.

If the Configuration Interface is set to None , the controlling application can only be a remote application, which excludes the use of an local EHC for configuration purposes. In this case the application interface can still be used.

Power Management

Power Management

The INIC is able to handle several power states, see Section 21.2.2.1 . For this purpose, it provides a power management interface, which consists of two input pins ( PS0 and PS1 pins) and one output pin ( PWROFF pin). The power management interface can be used to signal the current power state of a device and to trigger a Ring Break Diagnosis or a network startup by using an external glue logic or hardware power management (Microchip’s MPM85000 [11] ). The power management is based on the configuration interface.

Possible states that can be signaled by the power management interface are described in the table below:

Table 3-1: Power States Signaled by PS0 and PS1 Pins (Continued)
PS1 | PS0 | Power State | Action Set in the Configuration String | Behavior in Configuration Interface Mode
0 | 0 | U Normal, see Figure 3-2 | n/a | Protected Mode: Withdraws the actions done on U Low. Attached Mode: Device signals U Normal.
0 | 1 | Switch-To-Power (STP), see Figure 3-4 | None | Protected Mode: No action occurs. Attached Mode: Device signals STP.
 |  |  | StartDiagnosisSlave | Protected Mode: Device triggers a Ring Break Diagnosis, see Section 4.6 . Attached Mode: Device signals STP.
 |  |  | StartDiagnosisMaster
 |  |  | StartNetwork | Protected Mode: Device triggers a network startup, see Section 4.2 . Attached Mode: Device signals STP.
1 | 0 | U Critical, see Figure 3-5 | n/a | Protected Mode: No action occurs. Attached Mode: Device signals U Critical.
1 | 1 | U Low, see Figure 3-3 | None | Protected Mode: No action occurs. Attached Mode: Device signals U Low.
 |  |  | PowerOff | Protected Mode: Device sets PWROFF pin high. Attached Mode: Device signals U Low.
 |  |  | ForcedNA | Protected Mode: Device enters NotAvailable state. Attached Mode: Device signals U Low.
 |  |  | PowerOffForcedNA | Protected Mode: Device sets PWROFF pin high and enters NotAvailable state. Attached Mode: Device signals U Low.

The INIC provides a timer, Power Off Time, to set the PWROFF pin to high when the MOST network is in NetInterface Off state (see Figure 4-1 ) and the INIC has entered Protected Mode. The timer starts counting when both conditions are met and stops when one of the conditions has left its state, which means, either the MOST network leaves NetInterface Off state or INIC leaves Protected Mode. Then, the timer is cleared and the PWROFF pin will either stay low or be driven low if it was high.

Take into account, if Power Off Time is used to control the power supply of the device via the PWROFF pin, the timer value must be chosen higher, compared to the time a device would require to stay in NetInterface Off state and Protected Mode. This timing requirement must be fulfilled for example when the EHC is flashed, otherwise a power off will interrupt the flash process.

Power Off Pin

The PWROFF pin is set high due to the following conditions:

  • • PS0 and PS1 pins signal ULow , INIC is in Protected Mode, and Action On U_Low is PowerOff or PowerOffForcedNA .
  • • Power Off Time is expired and INIC is in Protected Mode.
  • • PWROFF pin was set to high by function INIC.DevicePowerOff.SetGet(PowerOff = True) .

As long as one of the above mentioned conditions is true, the PWROFF pin will stay high.

If the PWROFF pin was set to high because of PS0 and PS1 pins signaled ULow in Protected Mode, the PWROFF pin will stay high even when INIC switches to Attached Mode. In order to drive the PWROFF pin low, INIC.DevicePowerOff.SetGet(PowerOff = FALSE) must be sent to INIC.

If the PWROFF pin was set to high due to sending INIC.DevicePowerOff.SetGet(PowerOff = True) and INIC switches to Protected Mode, the PWROFF pin may be driven low if no other condition occurs that forces the PWROFF pin to be set high.

Availability

The network interface is set to NotAvailable and remains in this state based on the following conditions:

  • • PS0 and PS1 pins signal ULow , INIC is in Protected Mode, and Action On U_Low is ForcedNA or PowerOffForcedNA
  • • ForcedNA was set by function INIC.MOSTNetworkForceNotAvailable.SetGet(Force = True)

As long as one of the above mentioned conditions is true, the network interface remains in NotAvailable state, regardless of the MOST network activity state on Rx. If NotAvailable state was set since the PS0 and PS1 pins signaled ULow in Protected Mode, the INIC will stay in NotAvailable state, even when INIC switches to Attached Mode. In order to clear NotAvailable , INIC.MOSTNetworkForceNotAvailable.SetGet(Force = FALSE) must be sent to INIC.

If ForcedNA was set due to sending INIC.MOSTNetworkForceNotAvailable.SetGet(Force = True) and INIC switches to Protected Mode, ForcedNA may be cleared if no other condition occurs that requires ForcedNA to be set.

Configuration

The behavior of the power management can be defined in the configuration string, but it is also possible to interfere in the INIC’s operational behavior during runtime if there is a condition detected that requires such an action. This means, if the INIC is in Attached Mode and an erroneous PowerState is detected, the EHC can send INIC.DevicePowerOff.SetGet(PowerOff = True) , DevicePowerOff (0x222), to set the state of the PWROFF pin to high. Since it could be also required to force the network interface to enter NotAvailable state due to an erroneous PowerState , the EHC can send INIC.MOSTNetworkForceNotAvailable.SetGet(Force = True) , MOSTNetworkForceNotAvailable (0x52B).

The behavior of the PWROFF pin after detecting an erroneous power condition and thus INIC’s automatic handling of the network interface in Protected Mode, can be defined in the configuration string, see properties Action On U_Low and Power Off Time. In addition, if PS0 and PS1 pins indicate the respective power state conditions, property Action On STP can trigger an RBD, see Table 3-1 .

If the INIC is in Attached Mode, it reports the respective power state in INIC.Device-Status(PowerState) to the EHC without initiating any action, DeviceStatus (0x220).

Power States

Figure 3-1 gives an overview of the INIC’s power states, which are UNormal , ULow , STP , and UCritical . Whenever a change occurs, the power management will be updated on any of the following triggers:

  • • A change on the PS0 and PS1 pins
  • • A change in the operation mode (on a transition to Protected Mode or on a transition to Attached Mode)
  • • Timer Power Off Time has expired
  • • INIC.DevicePowerOff() message was received
  • • INIC.MOSTNetworkForceNotAvailable() message was received
  • • Start of Ring Break Diagnosis failed
  • • Start of network startup failed

Figure 3-1: Power States

Figure 3-2 through Figure 3-5 depict the power states in detail and show environmental conditions that can influence these states.

Figure 3-2: Power State is U Normal

Figure 3-3: Power State is U Low

Figure 3-4: Power State is STP

Figure 3-5: Power State is U Critical

Network Management

Network Management

The network management handles MOST network related tasks, such as:

  • • NetInterface handling including MOST network startup and shutdown, Ring Break Diagnosis, physical layer test, and system diagnosis
  • • Addressing for MCM and MDP
  • • Provision of FBlock NetBlock, FBlock NetworkMaster Shadow, and FBlock
    ExtendedNetworkControl functionality

MOST network management for the EHC is only provided when the configuration interface is in Attached Mode, see Section 2.3.1.2 .

NetInterface

The INIC contains a MOST Supervisor kernel, which implements the NetInterface state diagram and the flow between the states. NetInterface states are abstracted to the general states Available and NotAvailable , see Figure 4-1 . If the network is in NetInterface Normal Operation state, the network is considered available and data communication including packet, control, and streaming data, is possible. In all other NetInterface states it is considered not available; in these states data communication is not possible.

Figure 4-1: NetInterface State Diagram

Startup

By command or network activity

Before the MOST network can be available, it must be started by an application request, whereas the application is a device that is configured as TimingMaster. The MOST network can be started by the EHC using the INIC.MOSTNetworkStartup() function. After function INIC.MOSTNetworkStartup() has been called, the INIC is started as TimingMaster. The function must be called only by the TimingMaster device to avoid a multi-master failure situation.

If the INIC is woken up by network activity, it starts up as TimingSlave, which is the default device mode of the INIC. As long as the INIC detects activity at its Rx, it enables its signal on Tx.

By PS0 and PS1 pins

Another way for the TimingMaster to start the MOST network is checking the signals on the PS0 and PS1 pins. The feature can be enabled in the configuration string by selecting NetworkStartup in property Action On STP. In this case two additional properties become visible: Auto Forced Not Available Time and Packet Bandwidth.

A network startup is triggered when PS0 and PS1 indicate STP, see Table 3-1 . If a network startup should be executed on every INIC reset and no power state needs to be signaled by PS0 and PS1 , STP can be applied statically. If the network startup should be controlled by an external controller, STP can be applied on demand. If the network should not be started after reset, U Normal must be applied, see Table 3-1 .

Triggering a network startup on PS0 and PS1 is only possible after a reset of the INIC and if the configuration interface resides in Protected Mode. Once the configuration interface has changed to Attached Mode or a network startup on PS0 and PS1 was triggered, an additional network startup on PS0 and PS1 is no longer possible, until the INIC goes through reset again.

The INIC starts the network on a PS0 and PS1 trigger condition until the INIC gains NetInterface Normal Operation (Network Available) state or until the timer Auto Forced Not Available Time has expired. In case the INIC gains Normal Operation state and the configuration interface resides in Protected Mode, the network will be set to ForcedNA state, in case the Auto Forced Not Available Time timer has expired. To avoid an Auto Forced Not Available Time timer expiration, the EHC has to attach to the INIC within Auto Forced Not Available Time or the Auto Forced Not Available Time timer has to be set to 0xFFFF, which is not recommended.

Failed

If the MOST network startup was initiated by sending the INIC.MOSTNetworkStartup() command to the INIC, the INIC tries to start the network until NetInterface Normal Operation state is gained or until INIC.MOSTNetworkShutdown() is called by the EHC. The INIC cancels a pending startup, if it enters Protected Mode. If the network startup was canceled, a new startup can be tried immediately again.

Reasons for a failed network startup are as follows:

  • • stable lock cannot be gained (e.g., the MOST ring is not closed) or
  • • the network has a multi-master condition (only one TimingMaster is allowed).

In addition, a MOST network startup is not possible if the INIC is in ForcedNA state or in Diagnosis state. If in this situation the network was started up by using INIC.MOSTNetworkStartup() function, an immediate error is returned. A new startup is only possible after the error state has been freed.

Available

If the startup was successful, the MOST network and its port will enter the available state, meaning INIC.MOSTNetworkStatus.Availability (MOSTNetworkStatus (0x520)) and INIC.MOSTPortStatus.Availability (MOSTPortStatus (0x602)) change their state to Available , which in turn means that the network is now in NetInterface Normal Operation state, see Figure 4-1 .

AvailabilityTransitionCause indicates one of the initial startup reasons: Command or RxActivity . During the startup period, only the first initiated startup trigger is reported, even if there are several reasons that have been received from INIC.

Network-management related information is reported by the INIC.MOSTNetworkStatus() function; port-specific information, such as streaming data bandwidth, is reported by the INIC.MOSTPortStatus() function.

As soon as the MOST network is available, the last valid NodePosition and MaxPosition are returned within INIC.MOSTNetworkStatus() . The MaxPosition is synchronized with the Network Change Event (see Events), which is delayed at least 100 ms after the MaxPosition information has been changed. Also, the valid PacketBW in INIC.MOSTNetworkStatus() and the valid FreeStreamingBW in INIC.MOSTPortStatus() are reported.

If a network unlock occurs during the time that the network is available, AvailabilityInfo changes to Unstable , indicating that network communication is disturbed. It changes back to Stable as soon as stable lock is re-gained.

Shutdown

By command

Similar to the network startup scenario, also the network shutdown function call INIC.MOSTNetworkShutdown() , MOSTNetworkShutdown (0x525), can occur at the same time on several nodes. The device triggering the network shutdown can be either the TimingMaster or a TimingSlave. For all network nodes AvailabilityTransitionCause changes to Normal . However, if a TimingSlave shuts down the network, the TimingMaster ignores the Shutdown Flag and reports AvailabilityTransitionCause ErrorSuddenSignalOff .

If the network is already being shut down by another node and INIC.MOSTNetworkShutdown() function is called again, the running shutdown process will not be affected. If the network shutdown is initiated by the INIC.MOSTNetworkShutdown() function and the shutdown process has been finished, the status is returned. The result is delayed and sent until t Restart is expired; hence an immediate startup procedure can be initiated.

Network-management related information is reported by the INIC.MOSTNetworkStatus() function. Port-specific information, such as streaming data bandwidth, is reported by the INIC.MOSTPortStatus() function.

By error

An error shutdown can have different reasons:

  • • ErrorSuddenSignalOff ,
  • • ErrorCriticalUnlock , or
  • • ErrorSystem .

AvailabilityTransitionCause indicates the reason for the network shutdown trigger.

NotAvailable

When the network starts the shutdown process, AvailabilityInfo changes to NotAvailable in INIC.MOSTNetworkStatus() (MOSTNetworkStatus (0x520)) and in INIC.MOSTPortStatus() (MOSTPortStatus (0x602)). NotAvailable indicates that the network is in NetInterface Off state.

NodePosition , MaxPosition , PacketBW , and FreeStreamingBW values are invalid if the network is in NotAvailable state.

Ring Break Diagnosis

To verify the integrity of the MOST network, the INIC embeds the Ring Break Diagnosis (RBD) as specified in the MOST Specification [1] .

Phase 1: Activation

RBD can be triggered either by a INIC.MOSTNetworkRBD() command or via the power management, signaling STP on the PS0 / PS1 pins, see also Table 3-1 . If the RBD is triggered via PS0 / PS1 , the INIC performs the RBD as specified.

If the network has been already started up by the INIC.MOSTNetworkStartup() function or was woken up due to activity, it is also possible to start RBD.

The MOST Specification [1] requires that the RBD must be started in all nodes within the time window t Diag_Start, so that the result of the diagnosis is reliable and interpretable.

During RBD all network and port values are invalid; this includes NodePosition , MaxPosition , FreeStreamingBW and PacketBW .

If INIC enters ForcedNA state during the period that RBD is performed, it leaves RBD.

Phase 2: Diagnosis

When RBD is entered, Availability changes to NotAvailable in INIC.MOSTNetworkStatus() (MOSTNetworkStatus (0x520)) and INIC.MOSTPortStatus() (MOSTPortStatus (0x602)). In this stage, no network communication is possible. AvailabilityInfo changes to Diagnosis .

If a network-related failure is detected, either PosDetected , DiagFailed or Pos0WeakSig can be returned. If RBDResult is PosDetected , the exact position can be read by means of parameter RBDPosition . If the result is DiagFailed , RBD exits and RBD Phase 3 will not be entered. For PosDetected or Pos0WeakSig , RBD is continued with Phase 3 (for additional information refer to the MOST Specification [1] ).

Phase 3: Delivery of Result

The result is sent by the INIC that is directly located after the ring break; in this case the INIC broadcasts the NetBlock.RBDResult.RBDStatus message (RBDResult (0x405)) to the MOST network and to the EHC.

RBD is finished after the INIC.MOSTNetworkRBD.Result message has been sent to the EHC. The result is presented in function INIC.MOSTNetworkRBDResult() , MOSTNetworkRBDResult (0x527). If the value inside INIC.MOSTNetworkRBDResult() has not yet been updated or RBD was just started, then the content is Pending . After RBD is finished, the INIC enters NetInterface Off state, even if the ring is closed.

System Diagnosis

The system diagnosis defines a process that is used to collect diagnostic relevant information of all devices present in the network. It can be also used to examine the physical connection status between two devices. The system diagnosis process is controlled by the system diagnosis module, which is part of the application layer. The INIC provides functionality, which is needed to interact with the system diagnosis module; in addition, the INIC completely encapsulates methods required by the system diagnosis processes, such as e.g. cable link verification.

Since the system diagnosis needs a diagnosis module running on the application layer of the TimingMaster, the TimingMaster node requires an EHC. TimingSlave nodes do not require an EHC. Hence, also remote-controlled devices can run the system diagnosis. The communication between the TimingMaster and the TimingSlaves is done by use of MOST Control Messages via the MOST network. Therefore, the system diagnosis process can be executed without any additional hardware, such as electrical trigger lines.

Preconditions
  • • The MOST Port that shall be observed must run in full duplex coax mode.
    A MOST Port that is not running in full duplex coax mode will be disabled during system diagnosis and cannot be enabled. All devices connected afterwards are not considered.
  • • In order to start the system diagnosis, the MOST network needs to reside in NetInterface Off state.
Diagnosis Mode

The diagnosis state is signaled on a system wide level by use of a special system bit distributed by the TimingMaster. By using the system bit during the diagnosis phase, a TimingSlave will always end up in diagnosis mode, even in case of a reset. During the presence of the system bit, the network is in NotAvailable state. Thus, any application communication using the MOST network is not possible in diagnosis state.

Whenever the network is started in diagnosis mode, the TimingMaster and a TimingSlave perform the actions as described below:

TimingMaster:

  • • Distributes diagnosis system bit
  • • Enters diagnosis mode
  • • Disables all MOST Ports
  • • Sets network Availability to NotAvailable
  • • Sets node address to an uninitialized value (0x0FFE)

TimingSlave:

  • • Enters diagnosis mode
  • • Disables all MOST Ports beside the clock reference port
  • • Sets network Availability to NotAvailable
  • • Sets node address to uninitialized value (0x0FFE)

Above described actions are always executed by a TimingMaster on any successful reception of INIC.MOSTNetworkSystemDiagnosis.StartResult and respectively by a TimingSlave on any transition from NetInterface Off to system diagnosis state.

Execution

In order to run the system diagnosis, the INIC provides several functions that are used to run and complete the system diagnosis process, see below:

  • • INIC.MOSTNetworkSystemDiagnosis() to start the system diagnosis on the TimingMaster device, see Section 21.2.3.9 .
  • • ExtendedNetworkControl.Hello() to get system diagnosis relevant information of a certain node, see Section 21.4.1 .
  • • ExtendedNetworkControl.Welcome() to give a unique and temporary node address during the system diagnosis phase, see Section 21.4.2 .
  • • ExtendedNetworkControl.EnablePort() to enable/disable a MOST Port during the system diagnosis phase, see Section 21.4.5 .
  • • ExtendedNetworkControl.CableLinkDiagnosis() to start a cable link diagnosis of a full duplex coax MOST network connection, see Section 21.4.6 .
  • • INIC.MOSTNetworkSystemDiagnosisEnd() to finish the system diagnosis, see Section 21.2.3.10 .

For further information contact: support-ais-de@microchip.com.

Cable Link Diagnosis

The cable link diagnosis is used to verify the physical connection between two INIC MOST Ports running in full duplex coax mode. The cable link diagnosis is started with ExtendedNetworkControl.CableLinkDiagnosis.StartResult() . Typically, this is done by the system diagnosis module. The cable link diagnosis can be performed only on a single MOST Port of the INIC at the same time. Parameter PortNumber identifies the MOST Port on which the cable link diagnosis should be performed.

The Result of the verification process can be either

  • • a not connected or shorted cable,
  • • a physically terminated connection,
  • • a passive connection,
  • • an active connection or
  • • a failure detected during execution.
    • Note: A connected debug tool (e.g., INIC Explorer Interface Box) can affect the cable link diagnosis execution. A failure will be reported by a respective result.

All necessary tasks and algorithms of the cable link diagnosis are encapsulated in the INIC firmware. In order to perform a proper cable link diagnosis, the INIC firmware is no longer responsive to the outside, neither via the MOST Port interface nor via the configuration interface. Also the I 2 C Port is not serviced during the verification phase, which may lead to I 2 C clock stretching. For this reason the application has to take care that the application watchdog is adjusted to a safe timeout value and that the I 2 C Port on EHC side handles clock stretching in a proper way.

Note: The maximum period of time all ports are not serviced is 200 ms.

Physical Layer Test

The INIC provides integrated functions to support testing of the physical layer as defined in the MOST150 Limited Physical Layer Compliance Specification [12] .

For executing the test, a Physical Layer Stress Test Tool (PhLSTT) is needed. The tool must be connected via MOST to the OS81118 Device Under Test (DUT). During the test it feeds the OS81118 DUT with a defined stress test pattern (see the MOST150 oPhy Automotive Physical Layer Sub-Specification [13] ). Both the test tool and the DUT log coding errors and unlocks to evaluate the physical layer for errors.

The PhLSTT uses the FBlock ExtendedNetworkControl (see Section 21.4 ) in the INIC to start the Physical Layer Test and to retrieve the corresponding result.

At test start the INIC switches to RetimedBypassMaster or RetimedBypassSlave , depending on the Type selected. After the test is finished, the INIC switches back to its original mode.

The test duration spans the time of LeadIn and Duration and LeadOut . During the test, the MOST network is in NotAvailable state, AvailabilityInfo is Diagnosis .

Figure 4-2: Physical Layer Test Flow

Events

Events are generated on the INIC and reported to the EHC inside an event field of a status function. Events related to changes on the MOST network are reported by the INIC.MOSTNetworkStatus() function.

A status function does not only incorporate event fields, but also general network parameters. The handling of event fields and general network parameters is different: An event is only reported once. This means, if the status function incorporates an event, this event will be cleared or reset to its default value after it has been sent to the EHC. General network parameters, also sent within the status function, still keep their values and will remain untouched.

INIC events are always in relation to the notification; therefore, to get an event, the EHC should be notified for the appropriate functions. Once the EHC has set a notification for a status function containing an event field, previous events are not remembered and hence not reported. When a notification is set, the event field is cleared or set to its default value.

Addressing

The addresses recognized by the INIC define on which address types distributed over the MOST network the INIC does react. This can be considered as an address matching mechanism. Address types are:

  • • NodeAddress
  • • NodePositionAddress
  • • GroupAddress
  • • MAC Address
Node Address

This is the logical address of the INIC and used for MCMs and MDPs. The NodeAddress and its customizable ranges are as follows:

0xFFFF (factory default value): | Defines the mechanism of calculating the node address. In general, this value is only valid in the identification string. The final node address is then calculated as described below.
0x0100...0x013F: | This range is used for dynamic calculated node addresses and depends on the device's position in the network (node address = 0x0100 + position). It is calculated on transition to Available state if the value is 0xFFFF. It is also calculated on each reception of command NWM.Configuration.Status(NotOK) . If a value in the dynamic node address range is entered as a default value, it will be used as a valid node address, until the next reception of command NWM.Configuration.Status(NotOK) , which leads to a new calculation of the node address.
0x0010...0x00FF, 0x0140...0x02FF, 0x0500...0x0EFF: | These ranges are used for static node addresses, which are independent of the node position. The reception of command NWM.Configuration.Status(NotOK) does not lead to a new address calculation.
0x0F00...0x0FEF: | This range is used for administrative purposes. The values of this range can only be set by AdminNodeAddress.
0x0FFE: | As long as the node is not welcomed, this node address is used when System Mode is UNICENS or the device is in system diagnosis mode.

Node Position Address

The NodePositionAddress of the INIC is used for MCMs and MDPs. The Node-
PositionAddress is a combination of 0x0400 (factory default value) plus the node position. Hence, 0x0405 indicates the INIC is on node position five in the MOST network.

Group Address

The GroupAddress of the INIC is used for MCMs and MDPs. Devices of the same type can be assigned the same group address and thus can be administered together. A message sent to this group address controls the entire device group. If message transmission fails the error of the last retry is reported.

The INIC has three group addresses, defined as follows:

Blocking Broadcast Address: | The value of this group address is fixed to 0x03C8 and is not user-configurable. The broadcast message sent to this address targets all MOST network nodes. The control communication over the MOST network is blocked unless not every device has acknowledged the broadcast message or all retries are exhausted. The blocking broadcast message is not supported for MDPs.
Unblocking Broadcast Address: | The value of this group address is fixed to 0x03FF and is not user-configurable. The control and packet communication over the MOST network is not blocked. The broadcast message is used for uncritical data transmissions. Hence, messages sent to this address are not required to reach every MOST network node.
User-configurable Group Address: | The value of the group address is user-configurable in the range of 0x0300 up to 0x03FE. A control or packet message that is sent to a group address targets all MOST network nodes that are part of the group, i.e., all nodes that have the same value for the GroupAddress . This parameter can be customized via the Identification String.

For more information on addressing, refer to the MOST Specification [1] .

MAC Address

For MEPs the INIC uses 48-bit MAC-addressing. The MAC address can be configured by function INIC.MOSTNetworkConfiguration() or by using the Driver Control Interface, see Section 18.2.3 and Chapter 20 .

Network Administration

Network Administration

This chapter describes the components implemented by the INIC to perform network administration tasks.

NetBlock

The FBlock NetBlock incorporates all functions that are relevant for network management. These functions have been implemented in the FBlock NetBlock according to the definitions prescribed by the MOST Cooperation in the MOST FunctionBlock NetBlock, Rev. 3.0.3 [2] specification.

The behavior for some FBlock NetBlock functions is different depending on whether the application interface is in Protected or Attached Mode; for more details refer to Section 21.1 .

All functions that are not supported by the FBlock NetBlock will be answered with error code 0x03, FktID not available, or forwarded to the EHC, if it is attached.

NetworkMaster

In the following situations the INIC acts as a NetworkMaster substitute to send NetworkMaster.ConfigurationStatus(NotOK) :

  • • On any transition to NetInterface Off state and the NetworkMaster is remote.
  • • After a NetBlock.Shutdown.Start(Execute) message was received and the NetworkMaster is remote. The NetworkMaster configuration status message is only sent to the internal NetworkMaster Shadow.
  • • PMP channel synchronization is lost and the NetworkMaster is local; ICM/RCM PMP channels synchronized for information on how the INIC handles PMP synchronization loss.

NetworkMaster Shadow

The INIC contains a controller for the FBlock NetworkMaster functionality, which is called FBlock NetworkMaster Shadow. The FBlock NetworkMaster Shadow checks status messages that come from the FBlock NetworkMaster and stores its address information (logical address) and system configuration state. Additionally, when the application interface is in Attached Mode, all status messages will be forwarded to the EHC without changing the content of the received message.

Localizing the FBlock NetworkMaster

The INIC stores the address information of the FBlock NetworkMaster whenever the following conditions apply:

  • • A NWM.Configuration.Status(OK , NewExt , or Invalid) message is received.
  • • A NetBlock.FBlockIDs.Get message is received and the current system configuration state is NotOK .

Based on this address information, the INIC is capable to determine the location of the FBlock NetworkMaster, which can be either:

  • • Local - which means that the FBlock NetworkMaster is hosted in the EHC and connected to the configuration interface or
  • • Remote - which means that an external network device incorporates the FBlock NetworkMaster

After reset the address information is uninitialized; as a result the FBlock NetworkMaster location is unknown.

Deriving the System Configuration State

The INIC's internal system configuration state is derived as follows:

  • • A reception of NWM.Configuration.Status(OK , NewExt , or Invalid) leads to the system state OK .
  • • A reception of NWM.Configuration.Status(NotOK) leads to the system state NotOK .

After reset, the system configuration state is initialized to NotOK .

Every time the INIC receives a NWM.Configuration.Status(NotOK) message, a re-calculation of the device's dynamic NodeAddress will be triggered.

Resetting Stored Information

The INIC resets its stored address information to an uninitialized value if a INIC.Configuration.Status(NotOK) message was received.

On each configuration state transition from OK to NotOK , resources are invalidated (see Section 6.7 ).

FBlock ExtendedNetworkControl

The FBlock ExtendedNetworkControl provides functions which are used to administer the INIC. In opposite to FBlock INIC, FBlock ExtendedNetworkControl is accessible from MOST network side as well as from the configuration interface, regardless of whether the INIC resides in RemoteControl Mode or not.

FBlock ExtendedNetworkControl functions are used to control and support:

  • • System Diagnosis
  • • Device diagnosis
  • • UNICENS
  • • Physical Layer Test execution
  • • Memory read and write functionality (see Section 21.4.11 and Section 21.4.12 )

Resource Management

Resource Management

The purpose of the INIC’s resource management is to monitor the states of all resource objects, to define the handling of invalid resources and the behavior of the INIC supported muting.

An overview of all routing resources is shown in Resource Planning.

Resource Objects

The INIC allows the customer to configure advanced routing of packet and streaming data in a simple and object-oriented fashion through a concept of on-chip resources, such as ports, sockets, and connections objects.

INIC supports a limited number of concurrent resources; therefore a free slot in the resource table is reserved on-demand by the call to the specific resource create function, e.g., INIC.MOSTSocketCreate() . A free slot is required to be able to create a new resource. If no free slot is available, an error code is reported. See Table 6-1 for information on how many tables and resources the INIC supports. After a resource has been created, a handle to the created resource is reported to the caller.

Port

A port encapsulates a dedicated on-chip hardware interface together with the associated configuration.

Some ports are created by default by INIC, for example the MOST Port. Others can be configured to be created either by default or manually, for example the USB Port. Other ports can only be created manually by using an INIC API function, for example a Streaming Port.

Once a port has been created by using an INIC API function, it may be disabled and possibly re-created with a new configuration. This allows ports to be disabled when not currently in use.

Note: It is not possible to disable a port that was created by default.

A port must be created in order to allow sockets to be attached to it.
All created sockets attached to the port must be disabled before the port can be disabled.

Socket

A socket encapsulates a data channel of the port it is attached to. This data channel is where data is routed to or from, when the socket is connected; a socket can be seen as one of the end points of a data route through the chip.

A socket has a data type classifier, a direction, and a size. The direction specifies if data is received or transmitted on the interface. The size specifies the highest-required bandwidth value that is necessary to ensure a safe data transmission.

A socket cannot be destroyed if it is currently being used in a connection.

Connection

In order to enable routing of data between two sockets, the sockets are required to be connected – which is accomplished when creating a connection.

A socket of direction Input can only be connected to another socket of direction Output , where both sockets must be of the same data type.

Depending on the data type, different rules for connecting sockets may apply. The rules are introduced by INIC as a way to ensure safe data transmission when two sockets have been successfully connected.

INIC provides on-chip support for enforcing requirements defined by the MOST Specification [1] regarding system connection management and muting, where socket connections may be automatically muted or cleaned up depending on, for example, network-related events.

Combiner

A combiner enables streaming data to be routed from a MOST socket to a specified segment of a peripheral socket. The same combiner may be used in multiple connections, which enables grouping of data streams from multiple MOST sockets into the same peripheral socket. For details refer to Chapter 15 .

A combiner cannot be destroyed if it is currently being used in a connection.

Splitter

A splitter enables two variants of routing to be set-up. The first variant is a splitter created with a peripheral socket. It enables data routing from a specified segment of the peripheral socket to a MOST socket. The second variant is a splitter created with a MOST socket. This variant enables data routing in its whole (no segments) from the MOST socket to multiple peripheral sockets. For details refer to Chapter 16 .

A splitter cannot be destroyed if it is currently being used in a connection.

Object Type, Identifier, and Index

To identify any kind of resource, so-called resource handles are used. A resource handle is a 16-bit value that is a combination of the resource identifier and its unique index. The resource identifier is stored in the high byte and its index is stored in the low byte.

Table 6-1 shows the assignment between object type, resource identifier and index.

Table 6-1: Object Type, Resource Identifier and Index
Object Type | Resource Identifier | Index | Description
Port
MediaLB | 0x0A | 0 | Number of ports
MOST | 0x0D
I 2 C | 0x0F
SPI | 0x10
USB | 0x12
RMCK | 0x1A
GPIO | 0x1D
Streaming | 0x16 | 0...1 | 0 is Port A; 1 is Port B
Socket
MediaLB | 0x0B | 0...39 | Number of sockets
MOST | 0x0E
SPI | 0x11
USB | 0x13
Streaming | 0x17
Connection
Packet | 0x01 | 0 | Number of connections
Synchronous | 0x02 | 0...19
AVP | 0x04
QoS | 0x05
DiscFramePhase | 0x09
Combiner | 0x07 | 0...2
Splitter | 0x08
Others
PMP channel | 0x03 | 0...2 | Number of channels 0 is MCM; 1 is ICM; 2 is RCM

Examples:

The MediaLB Port is represented by port resource identifier 0x0A. The port index for this port is 0x00. Hence, the port resource handle 0x0A00.

The MediaLB socket is represented by socket resource identifier 0x0B. For the seventeenth MediaLB socket the resource handle will be 0x0B10.

An invalid resource handle has the value 0xFFFF.

Resource Destruction

The INIC provides a mechanism where multiple resources can be destroyed by a single request.

INIC.ResourceDestroy() , ResourceDestroy (0x800), takes a list of resource handles as a parameter. Each resource handle is processed one at a time and an empty result message is returned when all resources have been destroyed. The order in which resources should be destroyed is: connection first, followed by socket and port.

If an error occurs, the handle of the failed resource is included in the error message returned to the EHC. All handles prior to the failed handle in the list can be acknowledged as successfully destroyed, while all resource handles after the failed handle in the list are unprocessed.

Resource States

A resource can be in one of the following states:

  • • Valid: This is the normal state.
  • • TemporaryInvalid: This is a temporary state in which it cannot be guaranteed that the resource is fully functional. This state can be reached for example during a network unlock.
  • • Invalid: This is a permanent state in which the resource is unrecoverable.
    This state can be reached due to an event (e.g., the network has entered NetInterface Off state) that makes the resource unrecoverable. For information on events that can make resources invalid, refer to Section 6.7 .

While an Invalid resource state requires the resource to be destroyed (see Section 6.3 ), the TemporaryInvalid resource state can change back to the Valid state after recovering from the temporary condition.

In either case, the EHC must be able to quickly detect invalid resources and mute the output of the routed data, see Section 6.5.1 .

Figure 6-1: State Diagram of a Monitored Connection

The INIC sets monitored connections to TemporaryInvalid if an event occurs that either requires verification of the resources or the event is temporary. After the condition has ended or if the resources became Invalid, the EHC is notified.

Monitoring

The INIC contains a resource monitor that monitors the states of resources and handles the muting. As long as it does not require attention from the EHC, it is in State OK . In the case there are events that require the EHC to take an action, the resource monitor enters the state ActionRequired , and notifies the EHC. It stays in this state until the EHC requests the resource monitor to reset itself. Resetting the resource monitor means that it will go back to the default state and release the MUTE/ RSOUT /GP8 pin, if possible (the pin was configured as MUTE pin, see MUTE/RSOUT Configuration). If there are still resources that are Invalid, it will immediately go back to State ActionRequired and notify the EHC; in this case there will be no intermediate notification of State OK .

The handling of resource monitoring is the same for all resources. However, the resource monitoring mechanism shown in Section 6.5.2.1 can be extended by implementing the muting concept, see Section 6.5.2.2 .

Muting

Muting applies only to synchronous streaming sink connections. Apart from the manual muting that is set by API function INIC.SyncMute() , the INIC supports the features described in this section.

Mute Pin

In order to provide a fast indicator to assist devices when muting is required, the INIC has a MUTE pin that can signal such conditions ( GP8 was configured as MUTE pin, see the OS81118 Hardware Data Sheet [4] ). It is enabled by registering streaming sink connections for mute signaling by setting their MuteMode to MuteSignal . If an event occurs that can corrupt the data for any registered connection, the MUTE pin will be raised. The devices that are receiving the data must be connected to the MUTE pin and mute when it is high. The MUTE pin is released by resetting the resource monitor from state ActionRequired , unless there is still a condition that prevents it. It cannot be released if any registered connection is in a TemporaryInvalid or Invalid state; in either case there will be another ActionRequired notification. The EHC can unmute the devices when receiving State OK from the resource monitor. However, devices must immediately mute again if the MUTE pin is already raised; if necessary, the EHC should check the MUTE pin state before attempting unmute, to reduce unnecessary glitches.

Setting the MUTE pin is global for all monitored connections.

Mute Mode

The MuteMode configures how the resource monitor will handle events that have made a streaming sink connection invalid. The MuteMode can be configured as follows:

Table 6-2: Mute Modes
Mute Mode | Behavior
NoMuting | No mute monitoring
MuteSignal | The MUTE pin is asserted when any registered connection may stream corrupted data .
AutoMute | Routes zeros on a temporarily invalid or invalid registered connection as soon as an event happens that may corrupt the connection, and it stops after it has verified that the connection state has been changed back to valid. These connections are not using the MUTE pin. Manual muting, which is defined by function INIC.SyncMute() , overrides automatic muting and will therefore prevent automatic unmuting as long as it is set.

EHC Implementation
Without Muting

When the EHC receives a ResourceMonitor.Status(ActionRequired) , it must check for any invalid resources and destroy all of them, see Figure 6-2 . It does this by first sending ResourceInvalidList.Get() , which will return invalid handles in the order they must be destroyed. Any returned handles are then sent in ResourceDestroy.StartResult() , ResourceDestroy (0x800). When the handles have been successfully destroyed, the EHC reads the list again and continues the process until it has received the END identifier in the list of invalid resource handles. While destroying resources, the resource monitor stays in State ActionRequired until receiving a Reset. Therefore, the EHC only has to care about handling this processing. Finally, it sends ResourceMonitor.Set(Reset) , ResourceMonitor (0x802), to request the resource monitor to go back to the default state. The process is then done.

The resource handles reported to the EHC are sorted for immediate processing. The sort order is predefined by INIC. Handles of socket connections are reported first, then all sockets, and last all ports. This is to simplify processing on EHC side, in that no special consideration has to be taken to the destruction rules. A port resource cannot be destroyed if there are still sockets attached to it, and a socket resource cannot be destroyed if it is still being used in a connection.

Figure 6-2 depicts a recommendation for a proper EHC implementation without considering the muting concept. An EHC example implementation with muting is shown in Section 6.5.2.2 .

Figure 6-2: EHC Implementation Proposal for Resource Handling without Muting

With Muting

Figure 6-3 shows an EHC implementation example that supports muting.

If the EHC has sink connections muted by the MUTE pin, it should ensure that the MUTE pin is not asserted when receiving State OK and if so, unmute them. Since the sink connections must mute immediately if the signal is set, it is recommended to do the implementation in a way that avoids short unmuted pulses.

Figure 6-3: EHC Implementation Proposal for Resource Handling with Muting

Application Examples

Temporarily Invalid Connections

Figure 6-4 shows an example in which a network unlock temporarily invalidates connections that are registered for MUTE pin changes. When Stable Lock has been acquired, the connections will go back to Valid; this event is notified with ResourceMonitor.Status(ActionRequired) . The EHC reads the list of invalid resources. Since there are no invalid resources, the EHC will get an empty list with the END identifier. It then resets the resource monitor. After the EHC has received the response that the INIC had released the signal, it unmutes the devices; however, they must mute immediately if the MUTE pin has been driven high again .

Figure 6-4: Unlock with Temporarily Invalid Connection

Permanently Invalidated Connections

Figure 6-5 shows an example in which monitored connections become permanently invalid, due to the INIC entering the NetInterface Off state. The EHC reads the list of invalid resources. Since there are more results to be reported than can fit in one message, the END identifier is not included and the EHC detects that it must read again. As destroyed resources are removed, the EHC can read and destroy in sequence; it will get the next handles in the following read. The EHC may not be able to pass all the received handles to the destroy function and must then send multiple destroy requests. For simplicity it can request the list again after each completed destruction, the destroyed handles are then removed. In the figure it is assumed that all the handles could be sent in the final destroy.

Figure 6-5: Permanently Invalidated Connection

Events That Make a Resource Invalid

Configuration Interface Enters Protected Mode

When the configuration interface enters Protected Mode, all MOST resources are marked invalid.

MOST Port Availability

If the configuration interface is in Attached Mode, a transition from INIC.MOSTPortStatus.Availability = Available to NotAvailable will cause resources associated with the MOST Port to be marked invalid and reported to the EHC for processing.

Routing will be stopped automatically and any allocated network bandwidth will be released. The MOST Port is no longer available for streaming data.
An example of invalidated connections and the handling of them is shown in Figure 6-5 .

Note: A transition from INIC.MOSTNetworkStatus.Availability = Available to NotAvailable implicitly means the MOST Port is not available, MOSTNetworkStatus (0x520) for more information.

The EHC is always in control of destroying resources, even when INIC has automatically marked them as invalid.

In Remote Control Mode, a transition from INIC.MOSTPortStatus.Availability = Available to NotAvailable will trigger the INIC to enter Protected Mode.

Network Events

The INIC enables on-chip support for aiding an EHC application in fulfilling system connection management requirements for streaming data connections as defined in the MOST Specification [1] . The following event causes invalid resources:

The network configuration status NWM.Configuration.Status(NotOK) triggers a transition from system state OK to system state NotOK.

Routing Budget

Routing memories and channels are shared between multiple resource objects. To use these resources in an optimum manner, resource planning is important. If an application is to be defined, the resource budget must be planned, to prevent resource conflicts and waste of memory space.

Routing Memory

Routing memory is required to ensure a safe routing path (no data loss) for data between two resource objects. INIC manages routing memory internally when creating or destroying resource objects. Allocation and deallocation of routing memory can occur frequently. Although INIC uses a best-fit algorithm when managing routing memory, fragmentation may occur if memory blocks of varying sizes are allocated and deallocated in a highly dynamic fashion.

Table 6-3 gives an overview of data types and resource budget.

Table 6-3: Data Type, Routing Memory Resource Budget
Data Type | Resource Budget | Description
Standard Routing Memory
- Sync | 384 bytes | -
- AVPacketized - QoSPacket - DiscFramePhase | 4352 bytes | -
 | 1024 bytes | Available only after the Reduced Transmission Buffer functionality has been enabled in the configuration string.
Aggregation Routing Memory
- Sync - AVPacketized - QoSPacket | 8192 bytes | Used to allow optimized data transmission over USB.

Routing Channels

A routing channel is required to enable data transfer between two resource objects (uni-directional). INIC manages the routing channels internally when creating or destroying resource objects.

Table 6-4: Data Type, Routing Channel Resource Budget
Data Type | Resource Budget
- Sync | 32 channels
- AVPacketized - QoSPacket - DiscFramePhase | 16 channels

MOST Port

MOST Port

A MOST Port enables support of port-specific network handling. It provides different interface capabilities, which are cPHY (coax electrical physical layer) or oPHY (optical physical layer). Different transmission classes are available for transferring data over the MOST network:

  • • Synchronous
  • • Isochronous - The isochronous transmission class consists of sub-classes, as listed below:
  • - A/V Packetized Isochronous Streaming
  • - DiscreteFrame Isochronous Streaming phase
  • - QoS IP Streaming

If a MOST Port is available, it provides information on FreeStreamingBW . If a port is not available, the FreeStreamingBW is 0xFFFF. The FreeStreamingBW depends on the configured PacketBW , see also Table 21-4 .

A MOST Port can be either Available or NotAvailable . Additional information is given in AvailabilityInfo .

If the MOST network is Available , a MOST Port becomes also Available .

Configuration

In contrast to other resources, a MOST Port is always created at startup. The port cannot be destroyed during runtime and it also remains persistent when the INIC enters Protected Mode.

Physical Layer

This configuration setting defines the physical layer to be used.

Sockets

A MOST Port socket encapsulates the configuration settings that are required to access data streams on specific MOST network channels. The DataType can be specified by function INIC.MOSTSocketCreate() . Packet and control sockets are automatically managed by the INIC, MOSTSocketCreate (0x611).

To establish MOST based data routing, the MOST socket must connect to a MOST Port using the MOSTSocketHandle .

INIC attempts to allocate the required network bandwidth when a MOST socket of direction Output is created. While creating an Input socket, INIC will attempt to connect to the provided MOST ConnectionLabel . If the allocation or connection attempt fails, an error message is reported back with failure information. INIC automatically handles cleanup of partially allocated or connected MOST network bandwidth in the event of an error.

The network bandwidth, specified by parameter Bandwidth when creating a socket, must be large enough to allow a safe data transmission. The selection of this value depends on the transmission class used, see Section 19.4 .

Additionally, each MOST socket requires a routing channel according to the data type for which it is created, see Table 6-3 .

For general socket information refer to Section 6.1.2 .

MediaLB Port

MediaLB Port

The MediaLB Port is the interface to the Media Local Bus. It supports the handling of all MOST network data types and is available in two pin-out options: MediaLB 3-Pin (single-ended) and MediaLB 6-Pin (differential). Both pin-out options are available on chip, whereas the use of these options is mutually exclusive, i.e., either MediaLB 3-Pin or MediaLB 6-Pin can be used.

The clock speed on which the MediaLB Port is running, is a multiple of the MOST network frame rate Fs; thus the maximum frequency for MediaLB 3-Pin is 1024Fs and for MediaLB 6-Pin it is 8192Fs.

Configuration

The MediaLB Port can be created either by customization of the Configuration String or via the INIC.MediaLBPortCreate() function, MediaLBPortCreate (0x621).

If the MediaLB Port is created via the configuration string, the port cannot be destroyed during runtime and it also remains persistent when the INIC enters Protected Mode.

If it is desired to create the MediaLB Port during runtime, the INIC.MediaLBPortCreate() function must be used. This time, the port will be destroyed when the INIC enters Protected Mode.

Clock Config

This configuration setting provides various speed grades to define the clock speed on which the MediaLB Port should be run. The speed grades can be customized by the configuration string via property Port Speed or during runtime by changing parameter ClockConfig . Based on the chosen speed grade, either the MediaLB 3-Pin Port or the MediaLB 6-Pin Port will be created.

Sockets

A MediaLB socket encapsulates the configuration settings that are required to access data streams on specific MediaLB channels. The DataType can be specified by function INIC.MediaLBSocketCreate() , MediaLBSocketCreate (0x631).

To establish MediaLB-based data routing, the MediaLB socket must connect to the
MediaLB Port using the MediaLBPortHandle .

When a MediaLB socket is created, INIC attempts to allocate the required bandwidth and assigns the allocated channel to the specified application channel address. If the allocation attempt fails, an error message is reported back with failure information. INIC automatically handles cleanup of partially allocated MediaLB bandwidth in the event of an error.

For general socket information refer to Section 6.1.2 .

Padding

Although bandwidth is allocated in quadlets, INIC is able to handle routing of a lesser number or a number not equally divisible by 4. Parameter Bandwidth specifies the number of bytes that should be routed. For example, a data stream which is 6 bytes wide – two 24-bit channels (stereo) – needs to have parameter Bandwidth set to 6 bytes. The allocated bandwidth on MediaLB will be padded to 8 bytes (2 quadlets). The padding mechanism must be considered when planning the resource budget for an application. The total available MediaLB bandwidth is decided by the configured clock speed.

Note: If a MediaLB Output socket is created with parameter Bandwidth set to a value not evenly divisible by 4, the contents of the padded bytes are not guaranteed.

The MediaLB bandwidth required to allow a safe data transmission depends on the transmission class selected.

Packet Multiplexing

MediaLB sockets of type Packet provide a packet multiplexing feature, which allows two MediaLB sockets of opposite direction to share the same physical channel(s). Using this feature requires a socket Bandwidth of at least 12 bytes.

Figure 8-1 depicts the packet multiplexing feature. Two physical channels are reserved: one for Tx and one for Rx direction. The remaining physical channels are used as multiplexed channels (see also Table 8-1 ).

Figure 8-1: Packet Multiplexing

The INIC monitors the Command field for activity. If the command is idle (NoData) or when an RxStatus busy has been detected, the controller will switch the ChannelAddress (e.g., from transmit address to receive address). It takes 12 bytes after a ChannelAddress has been transmitted until the MediaLB controller can detect if a channel is idle. Hence, an address switch will only occur every 12 bytes for an idle channel. As soon as the Command field signals Tx (or Rx), the shared physical channels will lock to that direction.

Table 8-1 gives an overview over the allocated MediaLB Bandwidth and the number of physical channels available for multiplexing.

Table 8-1: Packet Multiplexing - Physical Channel Allocation
Bandwidth in Bytes | Physical Channels
 | Reserved |  | Multiplexed
 | Tx | Rx | Tx or Rx
12 | 1 | 1 | 1
16 |  |  | 2
20 |  |  | 3
... |  |  | ...

The packet multiplexing feature can be enabled via Multiplexing in the configuration string. For the MediaLB address and bandwidth settings refer to properties: MediaLB Input Address, MediaLB Input Bandwidth, MediaLB Output Address, and MediaLB Output Bandwidth.

The feature can also be enabled during runtime. Function INIC.MediaLBSocketCreate() is required to create a Packet socket, see Section 21.2.5.2 . The MediaLBSocketHandle returned is then used with the INIC.MediaLBPacketMuxSocket-Create() function to enable the multiplexing mechanism, see Section 21.2.5.3 .

When calling INIC.MediaLBPacketMuxSocketCreate() , the INIC creates a new socket based on the characteristics of the provided socket. It has the

  • • same data type,
  • • same size,
  • • opposite direction, and
  • • MediaLB ChannelAddress of the provided socket address + 2 (e.g., 0x0006 and 0x0008)
    • Note: Due to the dependency established, the socket created by INIC.MediaLBPacketMuxSocketCreate() must be destroyed first if the packet multiplexing feature is no longer used.

To enable packet data routing, the handle of both sockets may be used with function INIC.PacketAttach() , see Section 21.2.13.1 .

SPI Port

SPI Port

The Serial Peripheral Interface (SPI) Port of the INIC allows to directly interface with microcontrollers that provide a standard SPI.

Besides the standard SPI signals ( CS , SCLK , SDIN and SDOUT ), the INIC provides an interrupt line, SINT (see the OS81118 Hardware Data Sheet [4] ), which is used for byte-level flow control such as required for half-duplex transmission.

When the SPI Port is created, the INIC operates as an SPI bus slave and supports the exchange of asynchronous data packets (MDPs and MEPs).

Configuration

The SPI Port can be created either by customization of the Configuration String or via the INIC.SPIPortCreate() function, SPIPortCreate (0x641).

If the SPI Port is created via the configuration string, the port cannot be destroyed during runtime and it also remains persistent when the INIC enters Protected Mode.

If it is desired to create the SPI Port during runtime, the INIC.SPIPortCreate() function must be used. This time, the port will be destroyed when the INIC enters Protected Mode.

ClockMode

This configuration setting provides various SCLK clock modes for the phase and polarity signals used by the SPI bus slave.

Sockets

An SPI Port socket encapsulates the configuration settings that are required to access data on the SPI. The DataType can be specified by function INIC.SPISocketCreate() , SPISocketCreate (0x651).

To establish SPI-based data routing, the SPI socket must connect to an SPI Port using the SPIPortHandle . This, as well as further socket-related parameter settings, can be accomplished by using the INIC.SPISocketCreate() function.

For general socket information refer to Section 6.1.2 .

USB Port

USB Port

The USB Port allows the connection of an INIC as a USB device to any USB 2.0-compliant host. It supports the handling of all MOST network data types (except QoSPacket ) and provides two physical layer options: a USB 2.0 default layer and a USB 2.0 HSIC (High-Speed Inter-Chip) layer, which is a layer variant designed for inter-chip communication. Both options are available on chip, whereas the use of these options is mutually exclusive, i.e., either the default USB 2.0 layer or the HSIC layer can be used.

The INIC implements a high-speed USB device with a rate of 480 Mbit/s. As with any USB-compliant device, it is capable of falling back to full-speed mode (12 Mbit/s) if connected to a USB 1.x Port. In this mode, the INIC does not provide any Endpoint, therefore creation of USB sockets is not possible.

USB device communication is based on pipes. A pipe is an association between a device Endpoint and the host controller. System software of the host controller establishes a pipe with each Endpoint address the host wants to communicate with. This is part of the enumeration process.

Note: USB OUT Endpoints represent the communication flow from EHC to INIC and USB IN Endpoints represent the communication flow from INIC to EHC, where the EHC is the USB host.

The USB Port only supports bulk transfers. The maximum packet size of a bulk transaction is 512 bytes.

An overview of descriptors reported by the INIC can be found in Section 10.5 .

Requirements

The INIC contains a limited number of internal resources. In respect to this, data-type dependent USB Endpoint requirements as listed in this section need to be considered to achieve proper operation. If the requirements are not met, data loss can happen.

The requirements define the least required number of bulk transactions per USB Microframe used for one USB Endpoint. The number of transactions depends on the desired data bandwidth of the connection.

With one bulk transaction per USB Microframe, a maximum data bandwidth of
32 Mbit/s is reachable. Whenever a higher data bandwidth is required, the number of bulk transactions per Microframe needs to be increased.

A/V Packetized

For A/V packetized connections the number of required bulk transactions per Micro-frame of a desired data bandwidth depends on the isochronous packet size and the number of frames packed into one bulk transaction. More details can be found in Table 19-2 .

Synchronous

For synchronous connections the number of required bulk transactions per Microframe is fixed to 1.

Control and Packet

The packet connection has no dedicated requirement to the number of bulk transactions per Microframe. In general, the number of bulk transactions needs to be in a range that covers the maximum throughput required.

Configuration

The USB Port can be created either by customization of the Configuration String or via the INIC.USBPortCreate() function, USBPortCreate (0x661).

If the USB Port is created via the configuration string, the port cannot be destroyed during runtime and it also remains persistent when the INIC enters Protected Mode.
If it is desired to create the USB Port during runtime, the INIC.USBPortCreate() function must be used. This time, the port will be destroyed when the INIC enters Protected Mode.

PhysicalLayer

This configuration setting allows to define the USB Port’s physical layer either as standard USB 2.0 layer or as HSIC layer.

DeviceInterfaces

The USB interfaces that the device should support must be defined once the USB Port is created. This configuration is persistent as long as the port exists. The setting affects the content of the USB configuration descriptor returned by the INIC, see Section 10.5.3 . In full-speed mode, e. g. if connected to a USB 1.x Port, the returned device configuration will only contain an empty interface with no Endpoints, independent from the configuration. In this mode, the creation of USB sockets is not possible.

The following device interfaces are supported:

  • • Control Interface
    This interface provides the Endpoints 0x0F (OUT) and 0x8F (IN). These Endpoints can be used for the communication of control messages. For more information see Device Management.
  • • Packet Interface
    This interface provides the Endpoints 0x0E (OUT) and 0x8E (IN). These Endpoints can be used later on for USB socket creation, restricted to the packet data type.
  • • Streaming Interface
    This interface provides a configurable amount of up to 10 OUT and up to 10 IN Endpoints. These Endpoints can be used later on for USB socket creation, restricted to the Sync and AVPacketized data types.
    The USB Port configuration allows to specify the number of Endpoints for each direction. Endpoint allocation starts with the Endpoint number 1 (Endpoint address 0x01 for the OUT, and Endpoint address 0x81 for the IN direction). Table 10-1 shows the maximum range of Endpoint addresses available for the streaming interface.
    • Table 10-1: Endpoint Directions and Addresses
Endpoint Direction | Endpoint Address
OUT | 0x01...0x0A
IN | 0x81...0x8A

Note: If the streaming interface is enabled, it is not allowed to set both Endpoint numbers to zero.

Sockets

A USB socket encapsulates the configuration settings that are required to access data streams on specific USB pipes. The DataType can be specified by function INIC.USBSocketCreate() , USBSocketCreate (0x671).

To establish USB-based data routing, the USB socket must be connected to a USB Port using the USBPortHandle . This, as well as further socket-related parameter settings, can be accomplished by using the INIC.USBSocketCreate() function, USBSocketCreate (0x671). The Endpoint address used to create sockets must be made available by the port configuration, once the USB Port is created. Otherwise the request will fail.

The parameter FramesPerTransaction defines the number of data frames that are transferred within one USB bulk transaction. The value depends on the data type being used, see Chapter 19 for details.

For general socket information refer to Section 6.1.2 .

For USB-related information refer to the USB 2.0 Specification [5] .

Padding in Synchronous Bulk Transactions

Since the duration of the MOST network frame is six times shorter than the duration of one USB Microframe, the minimum number of FramesPerTransaction must be 7. ‘n’ is the maximum number of FramesPerTransaction. The value of ‘n’ depends on the MOST socket bandwidth. The data bytes per one transaction must not exceed 512 bytes. Therefore, the product of FramesPerTransaction multiplied by the specified MOST socket bandwidth must be less than or equal to 512 bytes, see also the example shown below.

If the data bytes within a bulk transaction are less than 512 bytes, padding is applied by the INIC. This means, INIC always sends a packet of 512 bytes to the EHC, whereas the remaining number of bytes will be filled with dummy bytes. If the EHC is sending the packets to the INIC, it can either send shorter packets (without dummy bytes) or the packets with dummy bytes. In the latter case, the INIC discards the dummy bytes.

Example:

The MOST socket bandwidth is 30 bytes. The value defined in parameter FramesPerTransaction is 0x000F. The calculated number of bytes results in a valid number, which is 450 bytes.

Figure 10-1: Synchronous Bulk Transaction with Padding

Padding in A/V Packetized Bulk Transactions

FramesPerTransaction defines the number of isochronous packets filled-in into one USB transaction. The size of an isochronous packet can either be 188, 196, or 206 bytes.

If FramesPerTransaction is 0x0002, padding is applied if the INIC is the transmitting device. This means, if INIC is sending a packet of 512 bytes to the EHC with two A/V packets filled in, the remaining bytes will be filled with dummy bytes. If the EHC is sending the packets to the INIC, it can either send shorter packets (without dummy bytes) or the packets with dummy bytes. In the latter case, the INIC discards the dummy bytes.

Figure 10-2: A/V Packetized Bulk Transaction with Padding

If FramesPerTransaction is 0xFFFF, no padding is applied.

Figure 10-3: A/V Packetized Bulk Transaction without Padding

The number of bulk transactions per USB Microframe depends on the performance of the USB host, which is the EHC and the initiator of USB transactions. Higher speeds require more than one transaction per Microframe, therefore it must be ensured that the performance of the EHC is suitable.

The maximum number of bulk transactions per Microframe is 13. Therefore, the maximum number of A/V Packetized Isochronous Streaming connections depends on the number of USB bulk transactions required.

Vendor-Specific Requests

All parameters of a USB vendor request are transported in little-endian format. This section describes all vendor-specific requests the INIC supports.

Access the Driver Control Interface (DCI)

The DCI provides direct access to an internal register set as an auxiliary INIC control interface. If the USB device driver has no access to the regular INIC API (e.g., through the ICM channel), it can read or write DCI registers by issuing vendor-specific requests over USB. The register set description can be found in Chapter 20 .

There are two vendor-specific device requests for reading and writing DCI registers:

bmRequestType | bRequest | wValue | wIndex | wLength | Description
11000000b | 0xA0 (read register) | 0x0000 | Register index | 0x0002, 0x0004, 0x0006, 0x0008 | Note 1
01000000b | 0xA1 (write register) | Register value | Register index | 0x0000, 0x0004...0xFFFC | Note 2

Note 1: Returns the content of the requested registers to the host, starting with the first indexed register. wLength specifies the number of bytes to read and must be a multiple of 2. Not more than 8 bytes (4 consecutive registers) can be read at once.

2: If wLength is zero, no data will be sent to the device. Only one register will be written in this case, as described by the register index and register value inside the setup packet.
If wLength is larger than zero, the data stage will contain further register index and register value pairs. Each of these 4 byte tuples will result in an additional register write. wLength must be a multiple of 4 bytes.

Descriptors

Device

Table 10-2: Device Descriptor
Name | Value | Hex
bLength | 18 | 0x12
bDescriptorType | DEVICE | 0x01
bcdUSB | 2.0 | 0x0200
bDeviceClass | Class defined at interface level | 0x00
bDeviceSubClass | Subclass defined at interface level | 0x00
bDeviceProtocol | None | 0x00
bMaxPacketSize | 64 | 0x40
idVendor | Microchip-SMSC | 0x0424
idProduct | 0xCF18 | 0xCF18
bcdDevice | 0.0.1 | 0x0001
iManufacturer | String descriptor #1 | 0x01
iProduct | String descriptor #2 | 0x02
iSerialNumber | String descriptor #3 | 0x03
bNumConfigurations | 1 | 0x01

String

Table 10-3: String Descriptor #0
Name | Value | Hex
bLength | 4 | 0x04
bDescriptorType | STRING | 0x03
wLANGID[0] | English (US) | 0x0409

Table 10-4: String Descriptor #1
Name | Value | Hex
bLength | 30 | 0x1E
bDescriptorType | STRING | 0x03
Content | “Microchip-SMSC” | …

Table 10-5: String Descriptor #2
Name | Value | Hex
bLength | 16 | 0x10
bDescriptorType | STRING | 0x03
Content | “OS81118” | …

Table 10-6: String Descriptor #3
Name | Value | Hex
bLength | 28 | 0x1C
bDescriptorType | STRING | 0x03
Content 1 | Diag ID-unique firmware built number e.g., “00AB-00000060” | …
Note 1: The string consists of two values in zero-padded hex notation, concatenated by a hyphen: “XXXX-XXXXXXXX”. The first value is the Diag ID as defined in the configuration string. The second value is a unique firmware built number.

Configuration

This descriptor is used in USB high-speed mode.

Table 10-7: Configuration Descriptor (Continued)
Name | Value | Hex
Configuration Descriptor
bLength | 9 | 0x09
bDescriptorType | CONFIGURATION | 0x02
wTotalLength | Depends on the USB Port settings | 0xXXXX
bNumInterface | Depends on the USB Port settings | 0x00…0x04
bConfigurationValue | 1 | 0x01
iConfiguration | 0 | 0x00
bmAttributes | Remote Wakeup = No, Self Powered = Yes | 0xC0
bMaxPower | 2 mA | 0x01
Control Interface Descriptor (Depends on the USB Port Settings)
bLength | 9 | 0x09
bDescriptorType | INTERFACE | 0x04
bInterfaceNumber | Depends on the USB Port settings | 0x00...0x03
bAlternateSetting | 0 | 0x00
bNumEndpoints | 2 | 0x02
bInterfaceClass | Vendor specific | 0xFF
bInterfaceSubClass | Control interface | 0x01
bInterfaceProtocol | Reserved | 0x00
iInterface | 0 | 0x00
Endpoint Descriptor
bLength | 7 | 0x07
bDescriptorType | ENDPOINT | 0x05
bEndpointAddress | Direction = OUT, Endpoint ID = 15 | 0x0F
bmAttributes | Transfer Type = Bulk | 0x02
wMaxPacketSize | Max. 512 Bytes | 0x0200
bInterval | Never NAKs | 0x00
Endpoint Descriptor
bLength | 7 | 0x07
bDescriptorType | ENDPOINT | 0x05
bEndpointAddress | Direction = IN, Endpoint ID = 15 | 0x8F
bmAttributes | Transfer Type = Bulk | 0x02
wMaxPacketSize | Max. 512 Bytes | 0x0200
bInterval | Never NAKs | 0x00
Packet Interface Descriptor (Depends on the USB Port Settings)
bLength | 9 | 0x09
bDescriptorType | INTERFACE | 0x04
bInterfaceNumber | Depends on the USB Port settings | 0x00...0x03
bAlternateSetting | 0 | 0x00
bNumEndpoints | 2 | 0x02
bInterfaceClass | Vendor specific | 0xFF
bInterfaceSubClass | Packet interface | 0x02
bInterfaceProtocol | Reserved | 0x00
iInterface | 0 | 0x00
Endpoint Descriptor
bLength | 7 | 0x07
bDescriptorType | ENDPOINT | 0x05
bEndpointAddress | Direction = OUT, Endpoint ID = 14 | 0x0E
bmAttributes | Transfer Type = Bulk | 0x02
wMaxPacketSize | Max. 512 Bytes | 0x0200
bInterval | Never NAKs | 0x00
Endpoint Descriptor
bLength | 7 | 0x07
bDescriptorType | ENDPOINT | 0x05
bEndpointAddress | Direction = IN, Endpoint ID = 14 | 0x8E
bmAttributes | Transfer Type = Bulk | 0x02
wMaxPacketSize | Max. 512 Bytes | 0x0200
bInterval | Never NAKs | 0x00
Streaming Interface Descriptor (Depends on the USB Port Settings)
bLength | 9 | 0x09
bDescriptorType | INTERFACE | 0x04
bInterfaceNumber | Depends on the USB Port settings | 0x00...0x03
bAlternateSetting | 0 | 0x00
bNumEndpoints | 1…20 | 0x01…0x14
bInterfaceClass | Vendor specific | 0xFF
bInterfaceSubClass | Streaming interface | 0x04
bInterfaceProtocol | Reserved | 0x00
iInterface | 0 | 0x00
Endpoint Descriptor (One for Each OUT Endpoint)
bLength | 7 | 0x07
bDescriptorType | ENDPOINT | 0x05
bEndpointAddress | Direction = OUT, Endpoint ID = 1…10 | 0x01…0x0A
bmAttributes | Transfer Type = Bulk | 0x02
wMaxPacketSize | Max. 512 Bytes | 0x0200
bInterval | Never NAKs | 0x00
Endpoint Descriptor (One for Each IN Endpoint)
bLength | 7 | 0x07
bDescriptorType | ENDPOINT | 0x05
bEndpointAddress | Direction = IN, Endpoint ID = 1...10 | 0x81…0x8A
bmAttributes | Transfer Type = Bulk | 0x02
wMaxPacketSize | Max. 512 Bytes | 0x0200
bInterval | Never NAKs | 0x00

Other-Speed Configuration

This descriptor is used in USB high-speed mode.

Table 10-8: Other-Speed Configuration Descriptor
Name | Value | Hex
Configuration Descriptor
bLength | 9 | 0x09
bDescriptorType | OTHER_SPEED_CONFIGURATION | 0x07
wTotalLength | 18 | 0x0012
bNumInterface | 1 | 0x01
bConfigurationValue | 1 | 0x01
iConfiguration | 0 | 0x00
bmAttributes | Remote Wakeup = No, Self Powered = Yes | 0xC0
bMaxPower | 2 mA | 0x01
Interface Descriptor
bLength | 9 | 0x09
bDescriptorType | INTERFACE | 0x04
bInterfaceNumber | 0 | 0x00
bAlternateSetting | 0 | 0x00
bNumEndpoints | 0 | 0x00
bInterfaceClass | Vendor specific | 0xFF
bInterfaceSubClass | Vendor specific | 0x06
bInterfaceProtocol | Vendor specific | 0x50
iInterface | 0 | 0x00

Device Qualifier

Table 10-9: Device Qualifier Descriptor
Name | Value | Hex
bLength | 10 | 0x0A
bDescriptorType | DEVICE_QUALIFIER | 0x06
bcdUSB | 2.0 | 0x0200
bDeviceClass | Class defined at interface level | 0x00
bDeviceSubClass | Subclass defined at interface level | 0x00
bDeviceProtocol | None | 0x00
bMaxPacketSize0 | 64 bytes | 0x40
bNumConfigurations | 1 | 0x01
bReserved | - | 0x00

Streaming Port

Streaming Port

The INIC enables a set of two Streaming Ports: Streaming Port A and Streaming Port B.

A Streaming Port can be configured to be compatible to one of the several industry-standard serial data formats, which support media connections to multimedia source and/or sink devices that handle frame-based data streams.

The Streaming Port supports the Synchronous Streaming MOST network transmission type.

Each Streaming Port has a dedicated set of serial data pins: SRXA0 and SRXA1 for Streaming Port A and SRXB0 and SRXB1 for Streaming Port B. Streaming Port A is the only instance that has a set of clock ( SCK ) and synchronization ( FSY ) signals in addition to the serial data pins. Streaming Port B can be configured to be linked to Streaming Port A, in which case these clocking signals are shared by all the data pins of the two ports.

The Streaming Port provides a loopback feature; streaming data received from a network channel can be routed back to the network on a different network channel, see Section 21.2.8.3 .

Configuration

Some of the parameters of the Streaming Port configuration define the base configuration. These are static parameters that are set once and not intended to be changed during runtime. Parameters of this type are: OperationMode , PortOption , ClockMode , and ClockDataDelay .

Other parameters of the Streaming Port configuration can be set when the port is created. These settings can be changed by destroying and recreating the Streaming Port resource, hence these are dynamic configuration options. Parameters of this type are: ClockSpeed and DataAlignment .

The base configuration can be set either through the Configuration String or by using the FBlock INIC API function INIC.StreamPortConfiguration() , StreamPortConfiguration (0x680). If the configuration string is used, the property Base Configuration Load enables the base configuration to be automatically loaded at startup. If the FBlock INIC API function is used, the base configuration has to be set on EHC attaching to INIC, since it is cleared on a detach event. A defined base configuration for both Streaming Port A and Streaming Port B is required in order to create the respective port resources.

Base Configuration Options

Operation mode

This configuration setting defines the operation mode of the Streaming Port. The available operation mode is:

Generic

In this operation mode Streaming Port B is linked to Streaming Port A. All data pins share the FSY and SCK signals. Clocking signals are enabled when Streaming Port A is created. Creating Streaming Port B is optional. Therefore, the following conditions must be taken into account when creating ports:

  • • The port configurations for both ports must have been set before the ports can be created.
  • • Streaming Port A must be created before Streaming Port B can be created.

When destroying the ports, the following must be taken into account:

  • • Streaming Port B must be destroyed before Streaming Port A can be destroyed.

Port option

This configuration setting defines the direction of the physical data pins of the port. Various options are available depending on the selected operation mode. See OS81118 Hardware Data Sheet [4] for an overview of available options.

Clock mode (Streaming Port A)

This configuration setting only applies to Streaming Port A when configured in operation mode Generic . If Streaming Port B is additionally configured in operation mode Generic , this means it shares the clock and synchronization signals with Streaming Port A, the clock configuration applies for data pins of both ports.

Output / Input

While configured as Output , INIC drives the FSY/SCK signals as outputs, frequency locked to the network clock.

When configured as Input , the FSY/SCK signals must be driven externally, where the RMCK, which is frequency locked to the network clock, is used as reference for clock generation.

Clock data delay (Streaming Port A)

This configuration setting applies only to Streaming Port A when configured in operation mode Generic . If Streaming Port B is additionally configured in operation mode Generic , this means it shares the clock and synchronization signals with Streaming Port A, the clock configuration applies for the data pins of both ports.

This setting indicates if there should be a single clock cycle delay between the start of frame and the start of the frame data. When enabled, start of frame data is required to occur on the falling edge of the synchronization signal. For example, left-channel audio data of a stereo stream should occur on the falling edge; this is required for I 2 S™ compatibility.

When set, only left-justified or sequential formats are available.

Dynamic Configuration Options

Clock speed

This configuration setting only applies to Streaming Port A when configured in operation mode Generic . However, if Streaming Port B is additionally configured in operation mode Generic , meaning it shares the clock and synchronization signals with Streaming Port A, the clock configuration applies for data pins of both ports.

This setting indicates the clock speed configuration of the SCK signal. Fs should be seen as an umbrella term referring to F Network , which is the MOST network sampling frequency used for the synchronous mode.

Data alignment

This configuration setting specifies in what way the data bytes are required to be located within the Streaming Port frame, so that they can be routed correctly. Multiple industry standard formats are supported, see OS81118 Hardware Data Sheet [4] for more information.

Sockets

A Streaming Port socket encapsulates the configuration settings required to enable routing of streaming data between a MOST network channel and a serial interface pin. The DataType can be specified by function INIC.StreamSocketCreate() .

Parameter PortOption of the Streaming Port’s base configuration configures the availability and direction of the data pins. The direction of a socket must comply with the direction of the pin to which it is associated.

The size of the socket specifies the number of bytes per Streaming Port frame to be routed. The clock speed configured for the Streaming Port and the chosen routing format limit the compatible sizes.

See Section 11.3.1 for an example where a routing format, compliant to the I 2 S standard, is configured. Refer to Section 21.2.8.4 for a reference of the API command used in INIC.StreamSocketCreate() .

For general socket information refer to Section 6.1.2 .

Typical Application Examples

Inter-IC Sound (I²S)

This section gives an example of how to configure the Streaming Port and sockets to setup a use case for 16-bit stereo audio streaming between the INIC and an external audio codec using an I 2 S-compatible format. The INIC generates the clock signals required by the codec. The clock signals are frequency locked to the time base of the MOST network (synchronous).

Approach 1: base configuration using the configuration string (see Chapter 22 )

Implement the steps as follows to configure Streaming Port A and Streaming Port B:

Set Base Configuration Load to LoadedAtStartup .
Note: This does not mean that the Streaming Port(s) resources are created per default. Only the base configuration is set.

  • 2. Set OperationMode (Port A Operation Mode and Port B Operation Mode) to Generic .
    Data pins of Streaming Port B share the clock and synchronization signals of Streaming Port A.
  • 3. Set PortOption (Port A Option and Port B Option) to InOut .
  • 4. Set the clock mode (Port A Clock Mode) to Output .
  • 5. Set the clock delay for data (Port A Clock Data Delay) to Delayed .
    This setting adjusts the start of frame such that it occurs on the falling edge of FSY . It also introduces one clock cycle of delay between start of frame and start of frame data. Enabling this setting is required for I 2 S compatibility.

    • Approach 2: base configuration using the INIC.StreamPortConfiguration.SetGet() command (see Section 21.2.8.1 )

    Send the following command to configure Streaming Port A:

    INIC.StreamPortConfiguration.SetGet() (Index = StreamPortA,
    OperationMode = Generic,
    PortOption = InOut,
    ClockMode = Output,
    ClockDataDelay = Delayed

    Send the following command to configure Streaming Port B:

    INIC.StreamPortConfiguration.SetGet() (Index = StreamPortB,
    OperationMode = Generic,
    PortOption = InOut,
    ClockMode = Wildcard,
    ClockDataDelay = Wildcard)

    After the base configuration is done, proceed with the steps as follows:

    Create the Streaming Port resource

    INIC.StreamPortCreate.StartResult ( Index = StreamPortA ,
    ClockConfig = 64Fs ,
    DataAlignment = Left16Bit)

    INIC.StreamPortCreate.Result (StreamPortHandle = 0x1600 )

    Create the Network Port socket of direction input (ConnectionLabel 0x0043 already exists on the network)

    INIC.MOSTSocketCreate.StartResult (MOSTPortHandle = 0x0D00,
    Direction = Input ,
    DataType = Sync ,
    Bandwidth = 0x0004,
    ConnectionLabel = 0x0043 )

    INIC.MOSTSocketCreate.Result(MOSTSocketHandle = 0x0E02 )

  • 2. Create a Streaming Port socket of direction output

    • INIC.StreamSocketCreate.StartResult(StreamPortHandle = 0x1600,
    Direction = Output ,
    DataType = Sync ,
    Bandwidth = 0x0004,
    StreamPinID = SRXA1)

    INIC.StreamSocketCreate.Result(StreamSocketHandle = 0x1703 )

  • 3. Connect the sockets

    • INIC.SyncCreate.StartResult(
    SocketHandleIn = MOSTSocketHandle (0x0E02),
    SocketHandleOut = StreamSocketHandle (0x1703),
    DefaultMute = False)

    INIC.SyncCreate.Result(SyncHandle = 0x0200 )

    By using either approach 1 or 2 for the base configuration and performing the steps required to setup the socket connection, now the 16-bit audio stream is routed to the output pin SRXA1 on Streaming Port A according to the Delayed-Bit Alignment format, see OS81118 Hardware Data Sheet [4] .

    RMCK Port

    RMCK Port

    The RMCK Port encapsulates the configuration of the RMCK pin. It can generate a clock signal that is synchronous to the network clock, which can be used as a master clock to synchronize external components on the node to the common network clock.

    Configuration

    The output frequency on the RMCK pin is decided by parameter Divisor , which divides a 3072Fs clock that is phase locked to the network, i.e., the output frequency is synchronous to the network clock.
    The RMCK Port can be opened by default by enabling it in the configuration string (see Port Create) and configured by setting the desired divisor (see Divisor).

    I2C Port

    I²C Port

    The Inter-Integrated Circuit (I 2 C) Port of the INIC allows to directly interface with devices that provide a standard I 2 C interface.

    The INIC offers two operation modes:

    • • Slave mode - only used in conjunction with an EHC applying the PMP protocol (see Chapter 2 )
    • • Master mode - INIC generates the clock signals and initiates the communication to a slave device

    Configuration

    The I 2 C Port can be created by customization of the Configuration String or via the INIC.I2CPortCreate() function, I2CPortCreate (0x6C1).

    If the I 2 C Port availability is configured via the configuration string, the port cannot be destroyed during runtime and it also remains persistent when the INIC enters Protected Mode.

    If it is desired to create the I 2 C Port during runtime, the INIC.I2CPortCreate() function must be used. In this case, the port will be destroyed when the INIC enters Protected Mode.

    Slave mode

    When the I 2 C Port is created at startup (Port Create in the configuration string must be set to CreatedAtStartup ), the INIC operates as an I 2 C-bus slave. This mode is static and therefore cannot be changed during runtime.

    Master mode

    To use the I 2 C Port as I 2 C-bus master, Port Create in the configuration string must be set to NotCreatedAtStartup . In addition, the interfaces for PMP communication (Configuration Interface and Application Interface) must be set to MediaLB or USB . If the INIC is not connected to an EHC, None must be selected.

    Calling the INIC.I2CPortCreate() function during runtime and setting the OperationMode to Master , enables the I 2 C-bus master mode. Using this mode makes the INT pin available as GPIO.

    Slave Mode

    Once the I 2 C Port is created in slave configuration, the port will be available to the EHC as the communication interface. Control message exchange is processed bi-directional, over the PMP channels, see Section 2.1.1 . The EHC acts as I 2 C bus master.

    The I 2 C bus master may drive the bus with a clock rate of up to 400 kHz. Clock stretching provides an appropriate handshake mechanism to let the INIC adapt the data transfer rate dynamically. The actual processing time varies, based on the overall load of tasks.

    The I 2 C slave address of the INIC is specified in the 7-bit slave addressing scheme. The value defaults to 0x20, however the Port Address can be changed via the configuration string.

    Besides the standard I 2 C signals ( SDA and SCL ), the INIC provides an interrupt line, INT (see the OS81118 Hardware Data Sheet [4] ), which is used for byte-level flow control such as required for half-duplex transmission. The INT line is used to signal the communication status to the bus master, which eliminates the need for a polling mechanism.

    The INT pin is an open-drain, active-low output that must be connected to the bus master’s interrupt logic, see Figure 13-1 .

    Figure 13-1: I²C Port Pin Connection

    Limitations in slave mode:

    Driving the I 2 C bus in slave mode does not support a repeated START condition. Therefore, each message must be terminated by a STOP condition before the next message can be started.

    Sending a Message
    Figure 13-2: I²C Write Transaction

    Sending a message to the I 2 C Port can be initiated by performing an I 2 C write transaction. Thus, the device address and the write identifier have to be exposed on the I 2 C bus. After the reception of the acknowledge bit, the message can be written to the port. A write transaction allows only a single message to be transmitted.

    Sending messages to the INIC does not involve the INT line.

    Receiving a Message
    Figure 13-3: I²C Read Transaction

    A read transaction allows only one message to be fetched. After an entire message is read, the INIC will drop the message from the queue. In addition, if more bytes are read than the message length specified by the PML or if no more messages are queued, the INIC will return zero values in the read result.

    Every time a message is available for reception, the INIC will drive the INT pin low to inform the bus master. The bus master has to react on this event and initiates a read transaction to fetch the pending message from the INIC queue.

    Figure 13-4: Single Read Transaction

    When the INIC is addressed by a read operation, it will release the INT line. The INT line may also be released if the INIC cancels the transmission of a message and empties its queue.

    During the STOP condition of a read transaction, the INT line will be driven low again if not all message bytes were read, see Figure 13-5 . This signals the master to repeat the read transaction for this message.

    Figure 13-5: Two-Staged Read Transaction

    After a message was completely fetched, the INIC sets the INT line low to signal that it is ready to transmit the next message from its queue. If there are no further messages in the queue, the INT line remains high.

    If the bus master (or the controlling application) does not completely fetch the message, the INIC will run into a timeout after t TxDriver (see Port Message Protocol Specification [3] ). Then the INIC will cancel the transaction and remove the failed message from its queue. If there are no further messages in the queue, the INT line will be switched high again.

    Note: If ICM, RCM or MCM PMP channels are connected to the I 2 C Port, then the INT pin will be pulled low right after power on or reset. This happens, since the INIC attempts to send a startup message for each control channel during startup. The INT pin will go back high after all messages were fetched, or if the EHC is not present at that time, all messages were canceled.

    Messages can be polled by the EHC without using the interrupt mechanism. Reading the PML value inside the first two bytes of the PMP header (see Figure 2-1 ) indicates if a message is pending. If this value is zero, no message can be read from the INIC. However, such a polling mechanism will keep the bus busy, hence preventing other transactions from being processed.

    The following methods can be used to fetch a pending message from the INIC. The methods are listed in recommended (most efficient to least efficient) order:

    • • The most common method is to read the message directly in a single read transaction, as shown in Figure 13-4 . Therefore the I 2 C bus master must be capable to pause the communication after reading the PML (first 2 bytes of the message). During this time, the bus master can allocate the necessary heap and proceed with reading the remaining bytes of the message. Such a feature may not be supported by any I 2 C driver. In such a case, one of the alternative methods (listed below) should be used.
    • • An alternative possibility is to read the control message in a two-staged transaction, as shown in Figure 13-5 . The first read transaction is necessary to acquire the length information (PML field). After allocating the required heap, the bus master must initiate a second read transaction to receive the entire message.
    • • Another alternative is to read the maximum length of the port message in one read cycle, every time. This happens regardless of the actual PML value and may result in a very high bus traffic when transmitting the attached remaining zero's. Such an inefficient way should only be chosen if the other ways can't be used.

    Master Mode

    Once the I 2 C Port is created in master configuration, the read and write sequences are initiated with the INIC.I2CPortRead() and INIC.I2CPortWrite() functions. The functions specify the handle of the port, the transfer mode ( Mode ), the slave address, and the length of data.

    The I 2 C-bus master driver supports the following message types:

    • • Single message - master writes n data bytes to a slave device ( DefaultMode )
    • • Single message - master reads n data bytes from a slave device ( DefaultMode )
    • • Single message - master writes n data bytes, divided in m blocks of chunks, to a slave device ( BurstMode )
    • • Combined message - master issues multiple reads/writes to one slave device ( RepeatedStartMode )

    Addressing Mode

    When operating as an I 2 C-bus master, the INIC supports the standard 7-bit addressing as well as the enhanced 10-bit addressing mode.

    7-bit Addressing

    This is the most commonly used addressing mode. The 7-bit address is transferred with the most significant bit first and followed by a direction bit.

    Figure 13-6: 7-bit Address Write

    Figure 13-7: 7-bit Address Read

    10-bit Addressing

    The 10-bit addressing expands the number of possible device addresses while maintaining backwards-compatibility with devices that only support 7-bit addressing.

    Per the I 2 C-bus specification [9] , a '11110' following a START condition indicates the use of the 10-bit addressing mode.

    For a 10-bit address write operation on a slave device, the first byte contains the two most significant bits of the 10-bit device address as well as the R/W flag. The remaining eight bits of the address are sent in the second byte. Therefore, if the message payload contains n data bytes, the length parameter must be set to n+1.

    Figure 13-8: 10-bit Address Write

    For a 10-bit address read operation on a slave device, a repeated start sequence has to be used. The first message ( INIC.I2CPortWrite() ) issues the 10-bit address and the second message ( INIC.I2CPortRead() ) initiates the read sequence.

    Figure 13-9: 10-bit Address Read

    Transfer Speed

    The INIC offers two different settings for the transfer speed: 100 kHz (Standard-mode, default) and 400 kHz (Fast-mode). Faster speed grades, such as Fast-mode Plus or High-speed mode, as defined in the I 2 C-bus specification [9] , are not supported.

    The transfer speed ( Speed ) can be set by using the INIC.I2CPortCreate() function.

    Clock Stretching

    The clock stretching mechanism, used by slave devices to control the transfer rate of the master, is also supported. In general, the slave device is permitted to pull down the clock line to reduce the transfer rate. This can happen, if a slave has not processed the current data request and the master tries to attempt sending the next bit or byte. To ensure backwards compatibility, the INIC supports clock stretching on bit and byte boundary.

    Multi-Master Support

    According to the I 2 C-bus Specification [9] , driving the I 2 C bus with more than one master device at the same time is allowed. INIC implements the necessary bus-busy-state detection and bus arbitration logic to prevent data collision during read/write transfers inside a multi-master environment.

    Repeated Start (Combined Format)

    Usually each I 2 C message consists of a START and STOP identifier. When the INIC is configured in RepeatedStartMode , it sends the START identifier, but suppresses the STOP condition. If the STOP condition is not issued, the bus remains busy and the controlling device can complete subsequent transactions.

    A typical example is the communication flow to an EEPROM device. If data is to be written to a certain address inside the EEPROM, an I 2 C transfer is initiated using INIC.I2CPortWrite.StartResult.Mode.RepeatedStartMode . The INIC sets a START identifier and issues the slave address of the EEPROM device. The address will be acknowledged and the following byte will set the desired memory address inside the EEPROM. The next message, for example INIC.I2CPortWrite.Start-Result.Mode.DefaultMode will write the payload into the memory address and generate a STOP condition on the bus.

    Figure 13-10: Repeated Start

    Error Conditions
    • • Arbitration Lost - If INIC detects a START condition issued by another bus master, the INIC acts as a slave device until the bus is free.
    • • Abort - An I 2 C transaction was aborted prior to completion.
    • • NACK - INIC detects a NACK condition on the bus. INIC responds by issuing a STOP condition.
    • • Internal Error - An unexpected event has occurred that is related to the I 2 C read/write transaction.
    Application Examples

    The following examples depict some standard communication sequences, which can be used for most use cases.

    Figure 13-11 shows an example of a single read/write transaction.

    Figure 13-11: I²C Read/Write

    Figure 13-12 shows an example of a burst transaction writing multiple data chunks.

    Figure 13-12: I²C Write Burst Mode

    Figure 13-13 shows an example of a repeated start transaction. At the beginning a write is initiated with a subsequent read.

    Figure 13-13: I²C Repeated Start

    GPIO Port

    GPIO Port

    The INIC allows certain pins to be reprogrammed from their default functionality to support general purpose input/output (GPIO) functionality. GPIOs are not available as long as they are used in any of the INIC API functions (apart from those that are related to GPIOs configuration) or configured in the configuration string.

    Configuration

    The GPIO Port can be created via the INIC.GPIOPortCreate() function, see Section 21.2.11.1 . Enabling the GPIO Port leaves the pin configuration untouched. To change a pin into a GPIO pin, it has to be configured via the INIC.GPIOPortPinMode() function, see Section 21.2.11.2 . Depending on the pin configuration, the controlling application (EHC or remote application) can receive a notification via INIC.GPIOPortTriggerEvent() , see Section 21.2.11.4 , when trigger events on the pins are detected.

    To allow pin re-configuration during runtime, the pin configuration is separated from the port creation. The following table shows the configurable pins and their limitations.

    Table 14-1: GPIO Pin Configuration and Limitations
GPIO Pin | Description
GP15...GP9 | These pins are not available for GPIO usage.
GP8 | The pin can be used as GPIO when the MUTE/ RSOUT /GP8 pin is not configured via the configuration string.
GP7 | The pins can be used as GPIO when the SPI Port is not configured via the configuration string or the INIC.SPIPortCreate() function.
GP6
GP5
GP4
GP3
GP2 | The pins can be used as GPIO when power management monitoring is switched-off via the configuration string.
GP1
GP0 | The pin can be used as GPIO when the I 2 C Port is not configured via the Port Create parameter in the configuration string.

    Trigger

    To get trigger events, the INIC.GPIOPortTriggerEvent() function must be entered in the notification matrix. For an EHC, notification is not supported when entering Device Attach Mode, instead the command INIC.Notification.Set() must be sent to activate notification on trigger events. The command must also be sent for a remote application.

    Note: INIC.Notification.Set() must be called before the first pin is configured with a trigger condition. If this is done later, the INIC.GPIOPortTriggerEvent() received for INIC.Notification.Set() may contain old/unspecified trigger events from already configured pins.

    The trigger condition is configured via the INIC.GPIOPortPinMode() function and describes the Mode on which the controlling application can react. The status message is sent when:

    • • the GPIO Port is created,
    • • the controlling application registers for notification, and
    • • a trigger event has been detected.

    The following trigger classes are available:

    Edge trigger

    Includes rising and falling edge triggers for input, debounced input and output (open-drain) pins. Each time a configured edge event is detected, a notification via
    INIC.GPIOPortTriggerEvent() is sent by the INIC.

    Level trigger

    Includes high-level and low-level triggers for input, debounced input, and output (open-drain) pins. Level triggers are implemented as one-shot triggers. Triggers of this type are signaled once only. To receive further trigger events, the trigger must be re-enabled by re-configuring parameter Mode of INIC.GPIOPortPinMode() .

    For more information on triggers refer to the OS81118 Hardware Data Sheet [4] .

    Application Examples

    Edge Sensitive Input

    Figure 14-1 shows an example sequence chart that handles the GP0 pin as an input trigger with an edge sensitive trigger configuration. The GP0 pin is configured to react on the InputTriggerRisingEdge .

    Figure 14-1: Edge Sensitive Input

    Level Sensitive Input

    Figure 14-2 shows an example sequence chart of how an controlling application can use the GP0 pin with the trigger configuration InputTriggerHighLevel .

    Figure 14-2: Level Sensitive Input

    Due to the fact that the trigger input is a level signal, the detection of any further input events of this signal will be disabled directly after the trigger message INIC.GPIOPortTriggerEvent.Status has been sent. The detection stays disabled until the controlling application calls INIC.GPIOPortPinMode() to tell the INIC that it can react on the next input level.

    Sticky Input

    Figure 14-3 shows an example sequence chart of how a controlling application can use the GP0 pin with the pin configuration InputStickyHighLevel to poll for small high level pulses.

    Figure 14-3: Sticky Input

    The sticky bit can be only reset when the controlling application calls INIC.GPIOPortPinMode() to tell the INIC that it can detect the next sticky level.

    Combiner

    Combiner

    A Combiner can be used for connections based on the synchronous data type ( Sync ). It is created with:

    • • a peripheral socket of direction Output ,
    • • the handle to the MOST Port on which the MOST sockets will be created, and
    • • a parameter, specifying the total number of MOST network frame bytes that will be routed per network frame (the combined size of all MOST sockets that will be connected with the same combiner).

    All combiner settings are configured through the INIC.CombinerCreate() function, see Section 21.2.14.6 . A combiner is shown in Figure 19-2 .

    Routing channel

    A routing channel is required to be allocated from the synchronous routing channel table. INIC handles allocation automatically. If there are no free channels, an error will be reported.

    Standard routing memory

    The number of resources required from the standard routing memory is decided by the value of combiner parameter BytesPerFrame .

    Note: While using a MediaLB socket with the combiner, the number of resources is decided by adjusting the value of parameter BytesPerFrame upwards to the closest even quadlet due to the real size of the physical MediaLB channel, which is quadlet aligned, as described in MediaLB Port.

    Aggregation routing memory

    If the socket used with the combiner is a USB socket, additional resources from the aggregation routing memory are required. The number of resources can be calculated using the following equation:

    MemorySpace = Number of bytes allocated in the aggregation routing memory

    Combiner with a USB OUT socket

    Since the duration of the MOST network frame is six times shorter than the duration of one USB Microframe, the minimum number of FramesPerTransaction must be 7. ‘n’ is the maximum number of FramesPerTransaction. The value of ‘n’ depends on the parameter BytesPerFrame. The data bytes per one bulk transaction must not exceed 512 bytes. Therefore, the product of FramesPerTransaction multiplied by the specified BytesPerFrame must be less than or equal to 512 bytes, see also the example shown below.

    If the data bytes within a bulk transaction are less than 512 bytes, padding is applied by the INIC. This means, INIC always sends a packet of 512 bytes to the EHC, whereas the remaining number of bytes will be filled with dummy bytes. If the EHC is sending the packets to the INIC, it can either send shorter packets (without dummy bytes) or the packets with dummy bytes. In the latter case, the INIC discards the dummy bytes.

    Example:

    There are three MOST sockets, MOST socket A to MOST socket C. Each of them has a size of 15 bytes. Therefore, parameter BytesPerFrame must be set to 45 bytes. The value defined in parameter FramesPerTransaction is 0x000B. The calculated number of bytes results in 495 bytes.

    Figure 15-1: Bulk Transaction with a Combiner

    Splitter

    Splitter

    A Splitter can be used for connections based on the synchronous data type ( Sync ). It is created with:

    • • either a port or a MOST socket of direction Input ,
    • • the handle to the MOST Port on which the MOST sockets will be created, and
    • • a parameter specifying the total number of MOST network frame bytes that will be routed per network frame (the combined size of all MOST sockets that will be used with the same splitter).

    All settings are configured through the INIC.SplitterCreate() function, see Section 21.2.14.7 . Splitter connections are shown in Figure 19-3 .

    Routing channel

    A routing channel is required to be allocated from the synchronous routing channel table, but only if it is not created with a MOST socket. INIC handles allocation automatically. If there are no free channels, an error will be reported and the connection cannot be created.

    Standard routing memory

    The number of bytes required from the standard routing memory is decided by the value of splitter parameter BytesPerFrame .

    Note: While using a MediaLB or MOST socket with the splitter, the number of resources is decided by adjusting the value of parameter BytesPerFrame upwards to the closest even quadlet due to the real size of the physical MediaLB channel, which is quadlet aligned, as described in MediaLB Port.

    Aggregation routing memory

    If the socket used with the splitter is a USB socket, additional bytes from the aggregation routing memory are required. The number of bytes can be calculated using the following equation:

    MemorySpace = Number of bytes allocated in the aggregation routing memory

    Control Connection

    Control Connection

    The control connection is used to send/receive MOST Control Messages to/from the MOST network. MCMs are then forwarded to internal FBlocks or Shadows and to the MCM PMP channel, to be delivered to the EHC.

    The data flow is shown in Figure 17-1 .

    Figure 17-1: Control Connection

    The MOST network socket and its appropriate control connection are automatically managed by INIC.

    The message transmission status that is reported when sending MCMs to the MOST network is shown in Table 2-3 .

    Control Low-Level Retries

    Control Low-Level Retries are done block wise. A block consists of the initial transmission attempt and 10 retries (fixed number). The time between the retries is internally pre-defined and varies between 5 and 8 units (1 unit = 16 MOST network frames). For the first block the time is set to 5 units. The number is increased by 1 for every control message transmission, regardless of whether retries are performed or not. If the cycle has passed the 8 th unit, it starts over at 5.

    Figure 17-2 exemplarily describes how Control Low-Level Retries are performed. At first, the example shows an initial control message transmission that has set the ControlLLRBlockCount to 0. This means, no retries are done. However, the used time unit is 5. Then, the ControlLLRBlockCount was set to 2. Two retries are done and it can be seen that the number of time units is continuously counted: the first retry starts at 6, the second retry is 7. Finally, the ControlLLRBlockCount was set to 4. The example depicts the start over of the time unit count after the 8 th unit was passed.

    Figure 17-2: Control Low-Level Retries

    Packet Connections

    Packet Connections

    Packet connections are used to exchange MOST Data Packets (MDP) and/or MOST Ethernet Packets (MEP) between the MOST network and the EHC.

    Note: A packet connection only accepts sockets bound to the same peripheral port.

    Message Formats

    Depending on whether the INIC exchanges data with an MDP or MEP sink/source device, the packet message format and the packet message length of the Port Message (PM) is different, see Figure 18-1 , Figure 18-2 and the data fields description below the figures.

    Figure 18-1: MOST Data Packet Message Format

    Figure 18-2: MOST Ethernet Packet Message Format

    The Port Message consists of a PML field that is followed by several data fields.

    • • PML - Port Message Length: 16-bit field that indicates the total number of bytes that follow the PML field.
    • • TgtDevType - Target Device Type: 8-bit sub-field that indicates the addressing mode used in the received message. The addressing mode can be:
      0x00: Logical addressing
      0x01: Physical addressing (Node Position)
      0x02: Broadcast addressing
      0x03: Groupcast addressing
    • • SrcDevID - Source Device ID: 16-bit sub-field that indicates the Logical Address of the device that sent the message.
      SourceID 0x0001 (LocalID) indicates that the message was sent from an internal FBlock.
    • • Retry/Prio - Retry/Priority: 8-bit sub-field that contains additional Low-Level Retry information, see table below. Values for priority and Low-Level Retries are each 4-bits comprising. Number of Low-Level Retries can be set in a range from 0x00 up to 0x0F, whereas 0x00 indicates the lowest value and 0x0F the highest. Priority is not supported, the value must be set to 0x00.
      • Prio Bits | Description | Size (Bits)
7...4 | Number of Low-Level Retries | 4
3...0 | Prio | 4
    • • TgtDevID - Target Device ID: 16-bit sub-field that indicates the device address to which the message is sent (DeviceID). The following addresses are reserved: 0x0000, 0x0001, 0xFFFF.
    • • Length: 16-bit field that indicates the number of data bytes in the packet message (length of the Data[1:n] field)
    • • Data[0:(n-1)]: contains the payload of the MDP message. The maximum message length is 1524 bytes.
    • • DestAddr - Destination Address: 48-bit field that refers to an address of an Ethernet device that is being targeted.
    • • SrcAddr - Source Address: 48-bit field that refers to the source address of an Ethernet device that is sourcing packet data.
    • • Data[0:(k-1)]: contains the payload of the MEP message including VLAN (32 bits, optional), Type (16 bits) and FCS (32 bits). When the message is sent, the maximum message length is 1510 bytes.
    • • QoSRxStatus - Quality of Service Rx Status: 8-bit sub-field that is only appended to the MEP message when QoS packets are transferred. The byte supports a verification mechanism, which helps to identify if the complete MEP reception was successful or erroneous. Bits [2:0] of the byte give information on the reception status that is as follows:
      110: Packet reception was successful and CRC was correct
      001: Packet reception was successful but CRC was incorrect
      010, 100: Packet reception failed due to another reason
      111: Network receive buffer overflow

    Packet

    The MOST network socket and the appropriate packet connection is automatically managed by INIC. Peripheral sockets must be created. This can be done in two different ways:

    • • If the socket should be available at INIC startup, the Packet Connection must be set in the configuration string.
      In this case, the INIC automatically creates the required peripheral sockets at startup and attaches them to the packet connection.
      A packet connection of this type cannot be destroyed during runtime and it also remains persistent when the EHC enters Protected Mode.
    • • If the socket is not required to be available at startup, the packet connection can be created during runtime by using the INIC.PacketAttachSockets() function, PacketAttachSockets (0x843). The function attaches the given peripheral sockets of the INIC to the packet connection. The port-specific sockets that were built during runtime are automatically detached from the packet connection and destroyed when INIC enters Protected Mode.
      The peripheral sockets can be detached by using the INIC.PacketDetachSockets() function.

    To allow the exchange of packet data, enough PacketBW must be made available on the MOST network (minimum is 4 bytes per frame).

    The data flow of a packet connection is shown in Figure 18-3 .

    Figure 18-3: Packet Connection

    Peripheral to MOST

    The information given in this section are based for applications that transmit packet data from one of the peripheral sockets to a MOST network socket.

    Bandwidth Source = Number of data bytes defined by PacketBW

    MediaLB socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    The real size of the physical MediaLB channel allocated is quadlet aligned, as described in Section 8.2.1 .

    USB socket

    Parameter FramesPerTransaction is fixed to 0xFFFF.

    No padding is applied by the INIC. Packet synchronization is performed as described in Section 18.4 .

    SPI socket

    The utilized bandwidth is adjusted dynamically, depending on the traffic throughput.

    MOST network socket

    The bi-directional MOST network socket is automatically managed by the INIC. The bandwidth of this socket corresponds to Bandwidth Source.

    MOST to Peripheral

    The information given in this section are based for applications that transmit packet data from a MOST network socket to one of the peripheral sockets.

    Bandwidth Source = Number of data bytes defined by PacketBW

    MOST network socket

    The bi-directional MOST network socket is automatically managed by the INIC. The bandwidth of this socket corresponds to Bandwidth Source.

    MediaLB socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    The real size of the physical MediaLB channel allocated is quadlet aligned, as described in Section 8.2.1 .

    Note: Packet loss will occur, if parameter Bandwidth is less than Bandwidth Source.

    USB socket

    Parameter FramesPerTransaction is fixed to 0xFFFF.

    No padding is applied by the INIC. Packet synchronization is performed as described in Section 18.4 .

    SPI socket

    The utilized bandwidth is adjusted dynamically, depending on the traffic throughput.

    Driver Control Interface Access

    When Driver Control Interface Access is enabled in the configuration string , the EHC can access an internal register set by using the packet connection with a prescribed message structure.

    Note: Driver Control Interface access is only possible via packet connection over a MediaLB Port or an SPI Port. For the USB Port, the Driver Control Interface access is done as described in Section 10.4.1 .

    Register status message

    Register values are always sent to the EHC device driver via the register status message by using an MDP read message (see Figure 18-1 ) that uses TelID 0x00. This TelID does not allow message segmentation.

    A register status message is triggered whenever changes occur regarding

    • • Parameter NodeAddress
    • • Parameters PacketEUI48_47to32 , PacketEUI48_31to16 , and
      PacketEUI48_15to0 , see Section 21.2.3.2
    • • Function INIC.MOSTNetworkStatus() , which can be either:
    • - 0x00 : NotAvailable
    • - 0x01 : Available

    or it is triggered by the read register command as shown in Figure 18-4 .

    The fields of the MDP read message carry the information as shown in Figure 18-1 and are described in detail below:

    PML: | 0x0018 |
TgtDevType: | 0x00 |
SrcDevID: | 0x0001 |
Length: | 0x0010 |
Data [0...15] | Data[0]: | FBlockID is NetBlock, 0x01
 | Data[1]: | InstID is the current position in the network (0x00, if undefined, e.g., network is in NotAvailable state or if TimingMaster)
 | Data[2]: | FktID_H is 0x00
 | Data[3]: | FktID_L_OPType is 0x3C
 | Data[4]: | TelID_TelLen_H is 0x00
 | Data[5]: | TelLen_L is 0x0A
 | Data[6]: | d0 is the high byte of the NodeAddress
 | Data[7]: | d1 is the low byte of the NodeAddress
 | Data[8]: | d2 is the status of the NetInterface
 | Data[9]: | d3 is Packet EUI-48™ 47:40
 | Data[10]: | d4 is Packet EUI-48 39:32
 | Data[11]: | d5 is Packet EUI-48 31:24
 | Data[12]: | d6 is Packet EUI-48 23:16
 | Data[13]: | d7 is Packet EUI-48 15:8
 | Data[14]: | d8 is Packet EUI-48 7:0
 | Data[15]: | d9 is 0x01, reports the current system configuration state. It will be ensured that no state change from OK to NotOK gets lost.

    Read registers

    A read register command is used to initiate a register status message being sent to the EHC device driver. The command has the following message format:

    Figure 18-4: Read Register Command

    Write register

    A write register command is used by the EHC device driver to update register settings. For the available register set refer to Chapter 20 .

    Figure 18-5: DCI Trigger Message Format

    Quality of Service

    A Quality of Service (QoS) packet connection uses the QoS IP Streaming isochronous subclass on the MOST network to transport MEPs over dedicated network Bandwidth . For the data transmission, the QoS IP Streaming sub-class utilizes the isochronous channel that is set up as a uni-directional point-to-point connection. The isochronous channel on the MOST network does not provide flow control, instead, the QoS Rx Status byte helps to identify if the transmission was successfully received.

    QoS packet connections are used for IP-based applications that require a pre-specified bandwidth/throughput. In contrast to standard packet connections, the Bandwidth of a QoS packet connection is reserved exclusively for a single source. By reserving the bandwidth, 100% QoS is provided.

    A connection between two sockets is created by using the API function
    INIC.QoSPacketCreate() . This command tells the INIC to set up a routing path through the chip between a MOST socket and a MediaLB socket.

    Figure 18-6 shows the data flow for QoS packet connections between a MOST network socket and a MediaLB socket.

    Figure 18-6: QoS Connection

    Resources

    Routing channel

    A routing channel is required to be allocated for the MOST network socket, see
    Table 6-3 .

    Standard routing memory

    The number of resources required from the standard routing memory is decided by the allocated Bandwidth on MOST, see Table 18-1 .

    Table 18-1: Allocated Bandwidth and Standard Routing Memory
Allocated Bandwidth on MOST [bytes] | Standard Routing Memory [bytes]
1…16 | 32
17…32 | 64
33…64 | 128
65…128 | 256
129…256 | 512
257…372 | 1024

    MediaLB to MOST

    As shown in Figure 18-2 , the format of an MEP message that is sent from the EHC to the INIC incorporates 8 bytes of overhead compared to a standard Ethernet frame. Hence, the data rate required on the peripheral interface is higher than the Ethernet data rate (DataRate E ) . To take this overhead into account, the Ethernet data rate is considered with the Factor given in the formula below.

    DataRate E = Maximum burst throughput rate on Ethernet [Mbit/s]

    Factor = 2.9297 [(byte) x (s/Mbit)]

    MediaLB socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    The real size of the physical MediaLB channel allocated is quadlet aligned, as described in Section 8.2.1 .

    MOST network socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    MOST to MediaLB

    The information given in this section are based for applications that transmit QoS packets from a MOST network socket to a MediaLB socket.

    Bandwidth Source = Number of data bytes allocated on the MOST network

    MOST network socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    MediaLB socket

    By definition, the INIC appends a QoSRxStatus byte to every Ethernet packet on MediaLB, to verify if the reception of the Ethernet packet was successful. Based on this overhead byte, the MediaLB socket Bandwidth is calculated as follows:

    Factor = 1.0139

    Parameter Bandwidth corresponds to Bandwidth MediaLB.

    Synchronization

    Synchronization is required to clean up internal routing resources and to synchronize external driver applications. There are two conditions on which the INIC needs to perform a synchronization process of a packet connection:

    • • MOST network shutdown
    • • Fatal packet communication errors caused by network disturbances, which can't be automatically recovered by hardware

    Depending on the communication characteristics of the peripheral interface involved in the packet connection, there are special synchronization mechanisms available, which are described below.

    MediaLB

    Packet connection

    When the synchronization process is started, the INIC forces the transmission to terminate. In case of an outgoing transmission, the pending packet is terminated by an AsyncBreak command. In case of a pending packet reception, the INIC responds with a ReceiverBreak status to enforce the transmitter to break.
    The next packet, after the synchronization process has been completed, starts with an AsyncStart command again.

    QoS packet connection

    Any pending transmission is stopped without an AsyncBreak command or a ReceiverBreak status. This behavior can result in a ProtocolError status from the INIC for the next incoming message after the synchronization has finished. For an outgoing transmission the EHC can respond to the next AsyncStart command with a ProtocolError status.

    USB

    The synchronization process required for USB packet connections needs additional communication effort, since a USB transfer containing one packet message can be divided into several USB bulk transactions. A packet message with a maximum size of 1536 bytes takes up to three USB bulk transactions to complete.

    The data transferred via a one-bulk transaction does not contain any additional information on data fragments. To keep synchronization, the following rules are applied:

    • • The start of a packet message is always located at the beginning of a bulk transaction.
    • • The end of a packet is either signaled by a bulk transaction with less than 512 bytes (short packet) or by a ZLP (zero-length packet).

    The INIC automatically discards incoming packet messages on USB upon the following error conditions:

    • • Missing ZLP
    • • Length mismatch between PML and received packet length
    • • Received PML is out of valid range
    • • Received a ZLP unexpectedly

    In such cases the synchronization process is not triggered.

    In addition to the common synchronization triggers mentioned above, on USB there is a DCI register available for each Endpoint that can be used by a driver application to manually trigger the synchronization process. This is needed whenever a driver is restarted during runtime to ensure packet synchronization. The DCI register is described in Section 20.1 et seqq.

    Whenever the synchronization process is triggered, the following sequence is executed by the INIC:

    Endpoints respond with NACKs
  • 2. IN Endpoint will be set to STALL state until the host driver sends
    ClearFeature(STALL)

    • A host driver has to implement the following rules to behave correctly in case of synchronization:

    • • On the reception of any STALL status an incomplete Rx message has to be discarded and a current transmission has to be canceled.
    • • A STALL state has to be cleared by sending a ClearFeature(STALL) as long as the state is reported.
    • • On every driver start, the STALL packet communication vendor request has to be sent for initial synchronization.

    Streaming Connections

    Streaming Connections

    Routing of streaming data is typically set-up by creating a connection between sockets that support the same data type, are of opposite directions, and located on different ports. Such a connection can be seen as a point-to-point connection and is the standard streaming connection type.

    A standard streaming connection can be defined for all streaming data types that are supported by INIC.

    In order to optimize the data transmission of streaming data, INIC internally uses advanced routing channels and memory resources that are allocated when a connection is created. The number of resources required depends on the routing objects used in the connection. All routing memory resources are shared. See section Routing Budget for more information.

    Muting of synchronous connections

    For synchronous connections the INIC supports muting-related features provided by function INIC.SyncCreate() . A connection can be kept muted when created or de-muted automatically. This setting is specified by parameter DefaultMute. The INIC's built-in resource monitoring mechanism supports individual handling of connections on detecting that the streamed data may be invalid. The configuration of this handling is done by parameter MuteMode. For more information on muting refer to Section 6.5.1 .

    Synchronous

    A Synchronous connection uses the synchronous transmission class on the MOST network for streaming data. A connection between two sockets is created by using the API function INIC.SyncCreate() . This command tells the INIC to setup a routing path through the chip between a MOST network channel and a port channel.

    A special case for a synchronous connection is the loop feature. With this feature it is possible to create a MOST socket of data type Sync and direction Input with the same ConnectionLabel as an existing Output socket of the same type. This socket type is called a loop socket. Loop sockets do not support muting and cannot be connected to or used in combination with a splitter or combiner.

    Figure 19-1 shows the data flow for synchronous connections between a MOST network socket and one of the peripheral sockets. It also shows the loop feature, in which the data is looped over the MOST network.

    Figure 19-1: Synchronous Connections

    Resources

    Routing channel

    A routing channel is required to be allocated for the MOST network socket, see
    Table 6-3 .

    Standard routing memory

    The number of bytes required from the standard routing memory (see Section 6.8.1 ) is decided by the Bandwidth of the sockets that need to be connected; the Bandwidth for both sockets must be equal.

    Note: While using a MediaLB socket in the connection, the number of resources is decided by adjusting the value of socket parameter Bandwidth upwards to the closest even quadlet due to the real size of the physical MediaLB channel, which is quadlet aligned, as described in MediaLB Port.

    Aggregation routing memory

    If one of the sockets used in the connection is a USB socket, additional resources from the aggregation routing memory are required. The number of resources can be calculated using the following equation:

    MemorySpace = Number of bytes allocated in the aggregation routing memory

    The number of required bulk transactions per USB Microframe is at least 1.

    Peripheral to MOST

    The information given in this section are based for applications that stream data from one of the peripheral sockets to a MOST network socket.

    For this connection type parameter Offset must be written 0.

    Bandwidth Source = Number of data bytes that should be routed

    MediaLB socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    The real size of the physical MediaLB channel allocated is quadlet aligned, as described in Section 8.2.1 .

    USB socket

    Parameter FramesPerTransaction defines the number of MOST network frames filled-in into one USB transaction. The size of one network frame is defined by parameter Bandwidth of the MOST network socket.

    If the data bytes within a bulk transaction are less than 512 bytes, padding is applied by the INIC, see Section 10.3.1 .

    Streaming socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    MOST network socket

    Parameter Bandwidth corresponds to Bandwidth Source and defines the size of the network channel that should be allocated on the MOST network.

    MOST to Peripheral

    The information given in this section are based for applications that stream data from a MOST network socket to one of the peripheral sockets.

    For this connection type parameter Offset must be written 0.

    Bandwidth Source = Number of data bytes allocated on the MOST network

    MOST network socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    MediaLB socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    The real size of the physical MediaLB channel allocated is quadlet aligned, as described in Section 8.2.1 .

    USB socket

    Parameter FramesPerTransaction defines the number of MOST network frames from which the synchronous data bytes are put and filled-in into one USB transaction. The size of one network frame is defined by parameter Bandwidth of the MOST network socket.

    If the data bytes within a bulk transaction are less than 512 bytes, padding is applied by the INIC, see Section 10.3.1 .

    Streaming socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    Synchronous with Combiner

    The API function INIC.SyncCreate() is used to create a routing path through the chip between a MOST network socket and a combiner.

    Figure 19-2 shows the data flow for synchronous connections with a combiner. The explanation on how to create a combiner is given in Chapter 15 .

    Figure 19-2: Combiner Connections

    Resources

    Routing channel

    A routing channel is required to be allocated for the MOST network socket, see
    Table 6-3 .

    MOST to Combiner

    The information given in this section are based for applications that stream data from MOST network sockets to a combiner.

    When using INIC.SyncCreate() the INIC establishes a routing path through the chip between a MOST network socket and a sub-section inside the peripheral socket that is connected to the combiner. The offset of the sub-section is specified by parameter Offset.

    Any event that may render the MOST network socket invalid will also render the combiner and any associated connections invalid.

    Bandwidth Source = Number of data bytes allocated on the MOST network

    MOST network socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    Combiner

    Bandwidth Source must be considered by parameter BytesPerFrame, when the combiner is created. BytesPerFrame is the size of all MOST network sockets that are connected to the combiner.

    Synchronous with Splitter

    The API function INIC.SyncCreate() is used to create a routing path through the chip between a splitter and a MOST network socket or a splitter and a peripheral socket.

    Figure 19-3 shows the data flow for synchronous connections with a splitter. The explanation on how to create a splitter is given in Chapter 16 .

    Figure 19-3: Splitter Connections

    Resources

    Routing channel

    A routing channel is either required to be allocated for the MOST network socket or for the connection with the peripheral socket, see Table 6-3 .

    Aggregation routing memory

    Note: These memory resources are only required for a splitter to USB socket connection.

    In this connection variant additional routing memory resources are required. The splitter parameter BytesPerFrame has to be used with the following equation to calculate the number of required bytes from the aggregation routing memory:

    MemorySpace = Number of bytes allocated in the aggregation routing memory

    Splitter to MOST

    The information given in this section are based for applications that stream data from a splitter to MOST network sockets.

    When using INIC.SyncCreate() the INIC establishes a routing path through the chip between a sub-section inside the peripheral socket that is connected to the splitter and the MOST network socket. The offset of the sub-section is specified by parameter Offset.

    Any event that may render the MOST network socket invalid will also render the splitter and any associated connections invalid.

    Bandwidth Source = Number of data bytes that should be routed

    Splitter

    Bandwidth Source must be considered by parameter BytesPerFrame, when the splitter is created. BytesPerFrame is the size of all MOST network sockets that are connected to the splitter.

    MOST network socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    Splitter to Peripheral

    The information given in this section are based for applications that stream data from a splitter connection to one of the peripheral sockets.

    When using INIC.SyncCreate() the INIC establishes a routing path through the chip between the MOST network socket that is connected to the splitter and the peripheral socket.

    Parameter Offset can only be 0. It is only possible to route the complete channel data from a MOST network socket. The splitter may be used in multiple connections with different peripheral sockets to stream the same MOST network data to multiple peripheral sockets.

    Any event that may render the MOST network socket invalid will also render the splitter and any associated connections invalid.

    Bandwidth Source = Number of data bytes that should be routed

    Splitter

    Bandwidth Source must be considered by parameter BytesPerFrame, when the splitter is created. BytesPerFrame is the size of all MOST network sockets that are connected to the splitter.

    MediaLB socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    The real size of the physical MediaLB channel allocated is quadlet aligned, as described in Section 8.2.1 .

    USB socket

    Parameter FramesPerTransaction defines the number of MOST network frames received by the splitter and filled-in into one USB transaction. The size of one network frame is defined by Bandwidth Source.

    If the data bytes within a bulk transaction are less than 512 bytes, padding is applied by the INIC, see Section 10.3.1 .

    Streaming socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    A/V Packetized

    An AVPacketized connection uses the A/V Packetized Isochronous Streaming transmission class on the MOST network for streaming of data that is not locked to the MOST network frame rate. The data either contains a time base, which is encoded in the data stream, or it does not require any time base information for transmission and synchronization. The data flow is shown in Figure 19-4 .

    Figure 19-4: A/V Packetized Connections

    A connection between two sockets is created by using the API function INIC.AVPacketizedCreate() . This command tells the INIC to setup a routing path through the chip between the MOST network socket and the peripheral socket.

    The packet sizes supported are specified by parameter IsocPacketSize in the call to INIC.AVPacketizedCreate() .

    Resources
    Note: Due to a hardware issue found in hardware revision D1A, an AVPacketized connection that is directed from MOST to USB cannot use the aggregation memory. By applying the firmware, the standard routing memory is used only.
    A detailed description of the hardware issue is given in the OS81118 Silicon Errata and Data Sheet Clarification document, 80000593D.pdf.

    Routing channel

    A routing channel is required to be allocated for the MOST network socket, see
    Table 6-3 .

    Standard routing memory

    The number of resources required from the standard routing memory is decided by the selected packet size, see Table 19-1 .

    Note: Use of the firmware in combination with hardware revision D1A means that AVPacketized connections that involve a USB Output socket have their routing resources allocated in the standard rouging memory as defined in Table 19-2 .
    Table 19-1 is not used in this case.

    Table 19-1: IsocPacketSize and Standard Routing Memory
IsocPacketSize | Standard Routing Memory | Unit
188 | 564 | Bytes
196 | 588
206 | 618

    Aggregation routing memory

    Note: Use of the firmware in combination with hardware revision D1A means that AVPacketized connections that involve a USB Output socket no longer use the aggregation routing memory.

    If one of the sockets used in the connection is a USB socket, additional resources from the aggregation routing memory are required, see Table 19-2 .

    Table 19-2: IsocPacketSize and Aggregation Routing Memory
Allocated Bandwidth on MOST [bytes] | Aggregation Routing Memory [bytes] | Number of Required Bulk Transactions Per Microframe
IsocPacketSize = 188 FramesPerTransaction = 0x0002
1-53 | 752 | 1
54-107 | 1504 | 2
108-161 | 2256 | 3
162-214 | 3008 | 4
215-268 | 3760 | 5
269-322 | 4512 | 6
323-372 | 5264 | 7
IsocPacketSize = 196 FramesPerTransaction = 0x0002
1-56 | 784 | 1
57-112 | 1568 | 2
113-168 | 2352 | 3
169-224 | 3136 | 4
225-280 | 3920 | 5
281-336 | 4704 | 6
337-372 | 5488 | 7
IsocPacketSize = 206 FramesPerTransaction = 0x0002
1-58 | 824 | 1
59-117 | 1648 | 2
118-176 | 2472 | 3
177-235 | 3296 | 4
236-294 | 4120 | 5
295-353 | 4944 | 6
354-372 | 5768 | 7
IsocPacketSize = 188, 196, or 206 FramesPerTransaction = 0xFFFF
1-73 | 1024 | 1
74-146 | 2048 | 2
147-219 | 3072 | 3
220-292 | 4096 | 4
293-365 | 5120 | 5
366-372 | 6144 | 6

    Peripheral to MOST

    The information given in this section are based for applications that stream data from one of the peripheral sockets to a MOST network socket.

    DataRate = Maximum burst throughput rate [Mbit/s]

    Factor = 2.6042 [(byte) x (s/Mbit)]

    MediaLB socket

    Parameter Bandwidth is calculated as follows:

    The real size of the physical MediaLB channel allocated is quadlet aligned, as described in Section 8.2.1 .

    USB socket

    Parameter FramesPerTransaction defines the number of isochronous packets filled-in into one USB transaction. The size of an isochronous packet can either be 188, 196, or 206 bytes.

    If FramesPerTransaction is 0x0002, padding is applied. If the value is 0xFFFF, no padding is applied. Refer to Section 10.3.2 for more information.

    MOST network socket

    Parameter Bandwidth is calculated as follows:

    Factor = 1.0053

    MOST to Peripheral

    The information given in this section are based for applications that stream data from a MOST network socket to one of the peripheral sockets.

    Bandwidth Source = Number of data bytes allocated on the MOST network

    MOST network socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    MediaLB socket

    For data packets with an IsocPacketSize of 188 or 196 bytes, parameter Bandwidth corresponds to Bandwidth Source.

    For data packets with an IsocPacketSize of 206 bytes, parameter Bandwidth corresponds to Bandwidth Source + 1.

    The real size of the physical MediaLB channel allocated is quadlet aligned, as described in Section 8.2.1 .

    USB socket

    Parameter FramesPerTransaction defines the number of isochronous packets filled-in into one USB transaction. The size of an isochronous packet can either be 188, 196, or 206 bytes.

    If FramesPerTransaction is 0x0002, padding is applied. If the value is 0xFFFF, no padding is applied. Refer to Section 10.3.2 for more information.

    DiscreteFrame Isochronous Streaming Phase

    A DiscreteFrame Isochronous Streaming phase connection uses the DiscreteFrame Isochronous Streaming transmission class on the MOST network for streaming time base information, which is asynchronous to the MOST network frequency. The supported use case is to transport the phase information over MediaLB and recover the clock with a companion device connected to MediaLB.

    The data flow for the DiscreteFrame Isochronous Streaming phase connections is shown in Figure 19-5 .

    Figure 19-5: DiscreteFrame Isochronous Streaming Phase Connections

    A connection between two sockets is created using the API function INIC.DiscFramePhaseCreate() . This command tells the INIC to setup a routing path through the chip between a MOST network socket and a MediaLB socket.

    Each packet is required to be made up by 8 phase samples where each phase sample is a 16-bit value; hence the packet size supported is 16 bytes. The transmitting MediaLB device is responsible to adopt this requirement.

    Resources

    Routing channel

    A routing channel is required to be allocated for the MOST network socket, see
    Table 6-3 .

    Standard routing memory

    The number of resources is 64 bytes.

    The size of a socket specifies the least required bandwidth to allow a data transmission without data loss during peak conditions.

    MediaLB to MOST

    The information given in this section are based for applications that establish a phase connection between a MediaLB socket and a MOST network socket.

    Bandwidth Source = 2 [bytes]

    The bandwidth is fixed to 2 bytes indicating the maximum phase data throughput.

    MediaLB socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    The real size of the physical MediaLB channel allocated is quadlet aligned, as described in Section 8.2.1 .

    MOST network socket

    Parameter Bandwidth corresponds to Bandwidth Source +1. The additional byte is used to compensate for the isochronous transmission mechanism.

    MOST to MediaLB

    The information given in this section are based for applications that establish a phase connection between a MOST network socket and a MediaLB socket.

    Bandwidth Source = Number of data bytes allocated on the MOST network

    MOST network socket

    Parameter Bandwidth corresponds to Bandwidth Source.

    MediaLB socket

    Parameter Bandwidth corresponds to Bandwidth Source -1. On the MOST network side there is one additional byte used to compensate for the isochronous transmission mechanism. This byte is not needed for the MediaLB Output socket.

    The real size of the physical MediaLB channel allocated is quadlet aligned, as described in Section 8.2.1 .

    Driver Control Interface

    Driver Control Interface

    The Driver Control Interface (DCI) can be used by EHC device drivers to retrieve status information from the INIC or to control low-level settings, such as the MAC address.

    Normally, all settings are handled from the EHC via the communication interface. However, for EHC device drivers that have no direct access to the communication interface, the DCI provides the possibility to directly access status information and low-level settings from the peripheral port to which they are connected. In doing so, the DCI eases the device driver implementation.

    The DCI consists of a dedicated, virtual register set that can be accessed remotely by read and write functions. The way registers can be accessed differs for each port.

    Figure 20-1: Driver Control Interface

    The DCI is supported by the USB Port (see Section 10.4.1 ) and the packet connection when connected with the SPI Port or the MediaLB Port (see Section 18.2.3 ).

    Common Register

    Table 20-1 lists all common registers that can be read and/or written by the DCI.

    Table 20-1: Common Register
Index | R/W | Valid Values | Description
0x0100 | R | 0x0000 0x0001 | See Availability
0x0101 | R | See PacketBW | -
0x0102 | R | See NodeAddress
0x0103 | R | See NodePosition
0x0140 | R/W | See PacketFilterMode
0x0141 | R/W | See PacketHash_63to48
0x0142 | R/W | See PacketHash_47to32
0x0143 | R/W | See PacketHash_31to16
0x0144 | R/W | See PacketHash_15to0
0x0145 | R/W | See PacketEUI48_47to32
0x0146 | R/W | See PacketEUI48_31to16
0x0147 | R/W | See PacketEUI48_15to0
0x0148 | R/W | See PacketLLRTime
0x0149 | R/W | 0x0001 = Wrong register address 0x0002 = Wrong register content | Error Bits are sticky and need to be written to ‘1’ to be cleared. Bit 0: Access to a register that doesn't exist Bit 1: Access to a register content that doesn't exist

    USB Register

    Table 20-2 lists all USB registers that can be read and/or written by the DCI.

    Table 20-2: USB Register (Continued)

    Index

    Offset

    R/W

    Valid Values

    Description

    0x1000

    -

    R/W

    0x0001 = System configuration state changed

    0x8000 = Invalid register access

    Event Flags

    When read: Event flags, used to signal which property has changed.
    Can be any combination (logical OR) of the given values.

    Can be polled to check for new events.

    When written: Clears event flags.

    Used by the EHC to clear already processed event flags by writing a ‘1’ to the corresponding event flag.
    Multiple flags can be cleared in one write operation by combining the values (logical OR).

    0x1001

    -

    R

    0x0000 = System configuration state is NotOK

    0x0001 = System configuration state is OK

    System Configuration State

    Reports the current system configuration state. It will be ensured that no state change from OK to NotOK gets lost.

    0x1100
    + (EndpointAddress x 16)

    1

    R/W

    0x0001 = Buffer overflow

    Error

    Bits are sticky and need to be written to ‘1’ to be cleared.

    Bit 0 (buffer overflow): Only applicable when DataType = AVPacketized .

    2

    W

    1 = Sync request

    Command

    When written, the appropriate command will be executed.

    Sync request: Triggers the synchronization process needed for packet connections. See Section 18.4 for more information.

    3

    R

    0xFFFF = Invalid

    0 = Disconnected

    1 = Connected

    Route State

    Denotes if the Endpoint is in use.
    If it is in use, it further indicates if the Endpoint is used in a combiner connection, splitter connection, or socket connection.
    Applies to all data types.
    Invalid: Indicates that no USB socket related to the given EndpointAddress was found.

    4

    R

    0xFFFF = Invalid
    0 = Sync
     1 = Packet
     2 = Control
     3 = AVPacketized

    Data Type

    Indicates the data type that is transfered via this Endpoint
    Invalid: Indicates that no USB socket related to the given EndpointAddress was found.

    5

    R

    0x0000 = Invalid

    See FramesPerTransaction

    Invalid: Indicates that no USB socket related to the given EndpointAddress was found.

    0x1100
    + (EndpointAddress x 16)

    6

    R

    0xFFFF = Invalid

    0 = Unknown

    1...372 = Sync

    188, 192, 206 = AVPacketized

    Framesize

    If DataType = Sync and the Endpoint is used in a USB socket connected with a MOST network socket, the value is the size of the MOST network socket.
    If the Endpoint is used in a USB socket connected to a combiner/splitter, the value equals parameter BytesPerFrame of the combiner/splitter.

    If DataType = AVPacketized , the value is the size of the transport stream packets.
    Invalid: Indicates that no USB socket related to the given EndpointAddress was found.

    Access via USB

    The access via USB is done through USB vendor requests. See Section 10.4 for more information.

    If an EHC driver needs to be notified about changed register content, it may become necessary to poll the DCI periodically. To ease the polling mechanism, the INIC provides an ‘event flags’ register that can be used to retrieve information about the registers that have been updated. It is not mandatory to use the event flags. E.g., if the driver is only interested in a single register, it can periodically read this register and ignore the event flags.

    Figure 20-2 describes the polling mechanism in detail.

    Figure 20-2: Polling Mechanism

    Access via Packet Connection

    If the DCI is accessed using the packet connection, the INIC will send a register status message to the EHC device driver whenever a change in any parameter of the register status message occurs. To explicitly trigger the reception of the register status message, the command read registers can be send, see Section 18.2.3 . By using the command write register, any register content can be written.

    Command Reference

    Command Reference

    FBlock NetBlock

    FBlock NetBlock functions are implemented according to the definitions prescribed by the MOST Cooperation in the MOST FunctionBlock NetBlock, Rev. 3.0.3 [2] specification.

    Note: FBlock NetBlock functions that are not processed by the INIC will be forwarded to the EHC. If no EHC is attached, the INIC will respond with error code 0x03, FktID not available, see MOST Specification [1] .

    An overview of the NetBlock functions is shown in Table 21-2 .

    Table 21-1: NetBlock Functions
Function Name | FktID | Possible to Notify | Page
FBlockIDs() | 0x000 | No | FBlockIDs (0x000)
NodePositionAddress() | 0x002 | No | NodePositionAddress (0x002)
NodeAddress() | 0x003 | No | NodeAddress (0x003)
GroupAddress() | 0x004 | No | GroupAddress (0x004)
ShutDown() | 0x006 | No | ShutDown (0x006)
RetryParameters() | 0x007 | No | RetryParameters (0x007)
EUI48() | 0x013 | No | EUI48 (0x013)
MOSTVersionInfo() | 0x014 | No | MOSTVersionInfo (0x014)
RBDResult() | 0x405 | No | RBDResult (0x405)

    FBlockIDs (0x000)

    This function inquires which function blocks are implemented within the device as well as the InstID of that function block. If the EHC is not attached, an empty list is returned from FBlock NetBlock. If the EHC is attached, the request is passed to the EHC.

    FBlockID | FktID | OPType | Parameters
NetBlock (0x01) | FBlockIDs (0x000) | Get (0x1) | -
 |  | SetGet (0x2) | FBlockID, OldInstID, NewInstID
 |  | Status (0xC) | FBlockIDList
 |  | Error (0xF) | ErrorCode, ErrorInfo
    FBlockID

    Functional address of an FBlock

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | Full range | 1 | None
    OldInstID

    Old InstID of the FBlock that is identified by FBlockID

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | Full range | 1 | None
    NewInstID

    New InstID of the FBlock that is identified by FBlockID

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | Full range | 1 | None
    FBlockIDList

    List of FBlockID / InstID pairs for the FBlocks that are implemented in the device. When an EHC is attached, it must respond with a list of FBlockIDs with corresponding InstIDs that are available in the device. When no EHC is attached, FBlock NetBlock only responds with an empty list. When no EHC exists (both Configuration Interface and Application Interface are configured None ) , FBlock INIC and its InstID will be reported in the list. For all devices that contain an EHC, FBlocks INIC and NetBlock are generally not reported, since they will not appear in the central registry of the NetworkMaster.

    Data Type | Number of Elements | Parameters
Stream | 0...n | { FBlockID, InstID }
    InstID

    Distinction of identical FBlocks in a system

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | Full range | 1 | None
    NodePositionAddress (0x002)

    This function obtains the node position address of a device. The node position address is determined by the node’s physical location in the MOST network, therefore this function is read only.

    FBlockID | FktID | OPType | Parameters
NetBlock (0x01) | NodePositionAddress (0x002) | Get (0x1) | -
 |  | Status (0xC) | NodePositionAddress
 |  | Error (0xF) | ErrorCode, ErrorInfo
    NodePositionAddress

    For details on parameter settings and the behavior of this parameter, refer to section Node Position Address. 0x0400 is reported, if MOST network is not available.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0400...0x043F | 1 | None
    NodeAddress (0x003)

    This function obtains the logical node address of the device.

    FBlockID | FktID | OPType | Parameters
NetBlock (0x01) | NodeAddress (0x003) | Get (0x1) | -
 |  | Status (0xC) | NodeAddress
 |  | Error (0xF) | ErrorCode, ErrorInfo
    NodeAddress

    For details on parameter settings and the behavior of this parameter, refer to section Node Address.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0010...0x02FF, 0x0500...0x0FEF | 1 | None
 |  | 0x0FFE | -
 |  | 0xFFFF
    GroupAddress (0x004)

    This function obtains the group address of a device.

    FBlockID | FktID | OPType | Parameters
NetBlock (0x01) | GroupAddress (0x004) | Get (0x1) | -
 |  | Status (0xC) | GroupAddress
 |  | Error (0xF) | ErrorCode, ErrorInfo
    GroupAddress

    For details on parameter settings and the behavior of this parameter, refer to section Group Address.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0300...0x03FF | 1 | None
    ShutDown (0x006)

    This function checks if a device is ready to shut down. If the application interface is in Protected Mode, the INIC does not suspend the NetBlock.ShutDown() procedure. If the application interface is in Attached Mode, the request is forwarded to the EHC.

    FBlockID | FktID | OPType | Parameters
NetBlock (0x01) | ShutDown (0x006) | Start (0x0) | Control
 |  | Result (0xC) | Control
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Control

    Used to query, suspend, or shut down the MOST network. For more information on the Control commands refer to the MOST Specification [1] .

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Query | Query for shut down
 | 0x01 | Suspend | Suspend for shut down
 | 0x02 | Execute | Process will be executed.
 | 0x03 | Temperature | Device is shut down as a result of temperature.
 | 0x04 | DeviceShutDown | Device is shut down.
 | 0x05 | WakeFromDeviceShutDown | Application is woken from DeviceShutDown.
    RetryParameters (0x007)

    This function returns fixed values for parameters RetryTime and RetryNumbers .

    Control Low-Level Retries are used by the INIC when an error occurs during control message transmission over the MOST network. Retries are performed based on an optimized retry mechanism (see Section 17.1 ).

    FBlockID | FktID | OPType | Parameters
NetBlock (0x01) | RetryParameters (0x007) | Get (0x1) | -
 |  | Status (0xC) | RetryTime, RetryNumbers
 |  | Error (0xF) | ErrorCode, ErrorInfo
    RetryTime

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0 | 1 | None
    RetryNumbers

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 11 | 1 | None
    EUI48 (0x013)

    This function derives the 48-bit MAC address (also referred to as EUI-48) of an Ethernet network device.

    EUI (Extended Unique Identifier) is a concatenation of a 24-bit OUI (Organizationally Unique Identifier) value and a 24-bit extension identifier.

    FBlockID | FktID | OPType | Parameters
NetBlock (0x01) | EUI48 (0x013) | Get (0x1) | -
 |  | Status (0xC) | EUI0, EUI1, EUI2, EUI3, EUI4, EUI5
 |  | Error (0xF) | ErrorCode, ErrorInfo
    EUI0

    The first byte of the OUI

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | Full range | 1 | None
    EUI1

    The second byte of the OUI

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | Full range | 1 | None
    EUI2

    The third byte of the OUI

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | Full range | 1 | None
    EUI3

    The first byte of the extension identifier

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | Full range | 1 | None
    EUI4

    The second byte of the extension identifier

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | Full range | 1 | None
    EUI5

    The third byte of the extension identifier

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | Full range | 1 | None
    MOSTVersionInfo (0x014)

    This function identifies the version of the underlying MOST Specification, the NetBlock, and the MOST transceiver.

    FBlockID | FktID | OPType | Parameters
NetBlock (0x01) | MOSTVersionInfo (0x014) | Get (0x1) | -
 |  | Status (0xC) | MOSTVersion, FBlockVersion, MOSTTransceiverVersion
 |  | Error (0xF) | ErrorCode, ErrorInfo
    MOSTVersion

    The version of the underlying MOST Specification

    Data Type | Size | Value
String | 9 | 03.00 E2
    FBlockVersion

    The version of the NetBlock

    Data Type | Size | Value
String | 9 | 03.00.03
    MOSTTransceiverVersion

    The version of the MOST transceiver

    Data Type | Size | Value
String | 8 | OS81118
    RBDResult (0x405)

    This function returns the result of the RBD test. It reports the status of the test and its diagnosis identifier via broadcast to the MOST network.

    FBlockID | FktID | OPType | Parameters
NetBlock (0x01) | RBDResult (0x405) | Status (0xC) | RBDStatus, DiagID
 |  | Error (0xF) | ErrorCode, ErrorInfo
    RBDStatus

    Status of the RBD result

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | ActivityButNoLock | Status is activity, but no lock ( Pos0WeakSig ).
 | 0x02 | NoActivity | Status is no activity ( PosDetected ).
    DiagID

    Diagnostic identifier of the device. The length value should be large enough, so that the message can be sent as an unsegmented control message.

    This parameter can be customized via the Configuration String.

    Data Type | Length | Description
Stream | 0x0000...0xFFFF | -

    FBlock INIC

    General Functions
    Notification (0x001)

    This function administers the notification matrix of the function block INIC.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | Notification (0x001) | Set (0x0) | Control, DeviceID, [ FktIDList ]
 |  | Get (0x1) | FktID
 |  | Status (0xC) | FktID, [ DeviceIDList ]
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Control

    Determines where the entry in the notification matrix must be made or where the deletion has to occur.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | SetAll | Enters DeviceID in all properties that support notification
 | 0x01 | SetFunction | Enters DeviceID for the functions listed in FktIDList . FktIDList is mandatory, i.e., it must contain at least one FktID .
 | 0x02 | ClearAll | Deletes DeviceID from all functions of the notification matrix
 | 0x03 | ClearFunction | Deletes DeviceID from the functions listed in FktIDList . FktIDList is mandatory, i.e., in this case it must contain at least one FktID .
    DeviceID

    Indicates the address of the sending device

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    [ FktIDList ]

    List of functions with a maximum of four elements. This parameter is only required if Control is SetFunction or ClearFunction .

    Data Type | Number of Elements | Parameters
Stream | 1...4 | FktID, { FktID }
    FktID

    Respective functions. The FktIDs are encoded as 16-bit values.

    Data Type | FktIDs | Function
Unsigned Word | 0x0220 | DeviceStatus()
 | 0x0520 | MOSTNetworkStatus()
 | 0x0602 | MOSTPortStatus()
 | 0x0705 | GPIOPortTriggerEvent()
 | 0x0802 | ResourceMonitor()
    [ DeviceIDList ]

    Device list

    Data Type | Number of Elements | Parameters
Stream | 0...1 | DeviceID
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | Notification is only allowed from network side, if in the configuration string the configuration interface is set to None .
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.

    Besides the listed ErrorCode , ErrorInfo , a MOST application (see MOST Specification [1] ) may report specific errors during execution by using OPType Error as well. In this event, ErrorCode 0x20, function specific , is also used.

    ErrorInfo | Description
0x10, FktIDList | The corresponding properties of FktIDList were rejected by the Notification.Set() command or the property is not supported in the Notification Service.
0x21 | Notification device table is full and does not allow more entries.
    Device Management Functions

    The functions in this section are used to handle device-relevant tasks, including the request of the revision information on the INIC’s hardware and firmware modules as well as the control of the power management behavior.

    An overview of the INIC’s device management functions is shown in Table 21-2 .

    Table 21-2: Device Management Functions
Function Name | FktID | Possible to Notify | Page
DeviceStatus() | 0x220 | Yes | DeviceStatus (0x220)
DeviceVersion() | 0x221 | No | DeviceVersion (0x221)
DevicePowerOff() | 0x222 | No | DevicePowerOff (0x222)
DeviceAttach() | 0x223 | No | DeviceAttach (0x223)
DeviceSync() | 0x224 | No | DeviceSync (0x224)

    DeviceStatus (0x220)

    This function reports several device properties. Its Status is sent to the EHC after the device has entered the Attached Mode.

    This function supports notification.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | DeviceStatus (0x220) | Status (0xC) | ConfigInterfaceMode, AppInterfaceMode, PowerState, BIST, LastResetReason
 |  | Error (0xF) | ErrorCode, ErrorInfo
    ConfigInterfaceMode

    The regular operation mode of the configuration interface is the Attached Mode. A mode change from Attached to Protected can happen in case of PMP channel synchronization loss, see Figure 2-5 .

    At startup, the mode is set to Protected .

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Protected | The configuration interface is in Protected Mode.
 | 0x01 | Attached | The configuration interface is in Attached Mode.
 | 0x02 | RemoteControl | The configuration interface is in Remote Control Mode.
    AppInterfaceMode

    The application interface is in Attached Mode. A mode change from Attached to Protected can happen in case of PMP channel synchronization loss, see Figure 2-9 .

    At startup, the mode is set to Protected .

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Protected | The application interface is in Protected Mode.
 | 0x01 | Attached | The application interface is in Attached Mode.
    PowerState

    State of PS0 and PS1 pins. For information on the power management refer to Chapter 3 .

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | UNormal | Normal power state
 | 0x01 | ULow | Erroneous power state
 | 0x02 | STP | Switch-to-Power power state
 | 0x03 | UCritical | Critical power state
 | 0xFF | NoMonitoring | No monitoring of PS0 / PS1 pins
    BIST

    Result of the Built-in Self-Test.

    At startup, the mode is set to OK .

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | Error | BIST error due to - a failure in the RAM, - an old boot-monitor was found, - a production string failure, - cPHY was selected on a BF package, or - a failure in the flash memory.
 | 0x02 | OK | BIST verification has no error.
    LastResetReason

    Shows the last reset reason of the device

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | PowerOn | Startup reset due to Power-on-Reset (POR)
 | 0x01 | HardwareWatchdog | Reset due to hardware watchdog
 | 0x02 | StackOverflow | Reset due to stack overflow
 | 0x03 | Internal | Reset due to an internal reset request caused by function ExtendedNetworkControl.MemorySessionOpen() .
 | 0x04 | External | External RST pin is held low (see OS81118 Hardware Data Sheet [4] ).
    DeviceVersion (0x221)

    This function contains information on the hardware and firmware modules of the INIC.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | DeviceVersion (0x221) | Get (0x1) | -
 |  | Status (0xC) | ProductIdentifier, MajorVersion, MinorVersion, ReleaseVersion, BuildVersion, HardwareRevision, DiagID, Extension
 |  | Error (0xF) | ErrorCode, ErrorInfo
    ProductIdentifier

    Unique identifier that represents the product name

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Long | 0 | 0x00000000... 0xFFFFFFFF | - | None
    MajorVersion

    Major version number of the firmware

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    MinorVersion

    Minor version number of the firmware

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    ReleaseVersion

    Release version number of the firmware

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    BuildVersion

    Build version number of the firmware. The number can be either a date code or the release build number.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Long | 0 | 0x00000000... 0xFFFFFFFF | 1 | None
    HardwareRevision

    Chip revision number

    Data Type | Valid Values | Step | Unit
Unsigned Byte | 0x00...0xFF | 1 | None
    DiagID

    Unique diagnosis identifier of the device

    Data Type | Valid Values | Step | Unit
Unsigned Word | 0x0000...0xFFFF | 1 | None
    Extension

    Contains revision information. Information given within this stream is not used for validation purposes and should be seen only as additional information to the device’s version information.

    Data Type | Number of Elements | Parameters
Stream | - | { ExtIdentifier, ExtMajorVersion, ExtMinorVersion, ExtReleaseVersion }
    ExtIdentifier

    Unique identifier that represents an extension

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | CFGS | Configuration string
    ExtMajorVersion

    Major version number of the extension

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    ExtMinorVersion

    Minor version number of the extension

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    ExtReleaseVersion

    Release version number of the extension

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    DevicePowerOff (0x222)

    This function controls the PWROFF pin of the INIC. INIC.DevicePowerOff(PowerOff = True) may be triggered for instance when an INIC.DeviceStatus.Status(PowerState = ULow ) message is sent to the EHC, which drives the INIC’s PWROFF pin high. For normal operation, the EHC may call INIC.DevicePowerOff.SetGet(PowerOff = False) , which drives the PWROFF pin low.

    Note: This function cannot be called in Protected Mode. On a transition to Protected Mode, PowerOff is automatically set to False .

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | DevicePowerOff (0x222) | Get (0x1) | -
 |  | SetGet (0x2) | PowerOff
 |  | Status (0xC) | PowerOff
 |  | Error (0xF) | ErrorCode, ErrorInfo
    PowerOff

    External power management power-off indicator

    Data Type | Bit # | Valid Values | Description
Boolean | 0 | False (0) | PWROFF pin is set to low.
 |  | True (1) | PWROFF pin is set to high.
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 |  | 0xF1 | Configuration interface is in Protected Mode.
    DeviceAttach (0x223)

    This function is used by an EHC to attach to the INIC. If an INIC.DeviceAttach() command is sent to the INIC, the INIC’s notification service will be triggered for all properties that support notification, except INIC.GPIOTriggerEvent() . If it is desired to get notifications on INIC.GPIOTriggerEvent() , an INIC.Notification.Set(FktID = GPIOPortTriggerEvent) command must be sent explicitly.

    A request will be blocked as long as INIC hasn’t finished a still running internal detach/cleanup process.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | DeviceAttach (0x223) | StartResult (0x2) | -
 |  | Result (0xC) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | A wrong device tries to attach; a device attach can be only performed by EHC.
 |  | 0x31 | ICM and RCM PMP channels must be synchronized before the device can be attached.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 | 0x04 | 0x40 | An already attached device tries to attach.
    DeviceSync (0x224)

    This function allows remote synchronization of devices that do not incorporate an EHC.

    INIC.DeviceSync() must be called from MOST network side. In advance to the function call, it must be ensured that the settings in the configuration string support the command: Configuration Interface is None . Otherwise an error is returned.

    For detailed information on how the command is used refer to Chapter 2 .

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | DeviceSync (0x224) | StartResult (0x2) | Synchronization
 |  | Result (0xC) | Synchronization
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Synchronization

    Used by an external device to unsynchronize/synchronize the INIC

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | UnSync | Unsynchronize INIC
 | 0x01 | Sync | Synchronize INIC
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | The last INIC.DeviceSync() call has not yet been finished.
 | 0x03 | 0x30 | INIC.DeviceSync() must not be called from EHC side.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    MOST Network Functions

    The functions in this section are used to handle network-relevant tasks, including the retrieval of network status and configuration information. It also provides the methods to startup and shutdown the MOST network as well as the capability to run the Ring Break Diagnosis.

    An overview of the INIC’s MOST network management functions is summarized in Table 21-3 .

    Table 21-3: MOST Network Functions
Function Name | FktID | Possible to Notify | Page
MOSTNetworkStatus() | 0x520 | Yes | MOSTNetworkStatus (0x520)
MOSTNetworkConfiguration() | 0x521 | No | MOSTNetworkConfiguration (0x521)
MOSTNetworkFrameCounter | 0x523 | No | MOSTNetworkFrameCounter (0x523)
MOSTNetworkStartup() | 0x524 | No | MOSTNetworkStartup (0x524)
MOSTNetworkShutdown() | 0x525 | No | MOSTNetworkShutdown (0x525)
MOSTNetworkRBD() | 0x526 | No | MOSTNetworkRBD (0x526)
MOSTNetworkRBDResult() | 0x527 | No | MOSTNetworkRBDResult (0x527)
MOSTNetworkForceNotAvailable() | 0x52B | No | MOSTNetworkForceNotAvailable (0x52B)
MOSTNetworkSystemDiagnosis() | 0x52C | No | MOSTNetworkSystemDiagnosis (0x52C)
MOSTNetworkSystemDiagnosisEnd() | 0x52D | No | MOSTNetworkSystemDiagnosisEnd (0x52D)
    MOSTNetworkStatus (0x520)

    This function reports information on the whole MOST network, including MOST Supervisor states, system parameters and packet bandwidth.

    This function supports notification.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MOSTNetworkStatus (0x520) | Status (0xC) | Events, Availability, AvailabilityInfo, AvailabilityTransitionCause, NodeAddress, NodePosition, MaxPosition, PacketBW
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Events

    The Events bit is related to the MOST network interface functionality. It is cleared once it was sent to all notified devices. A newly attached device gets a cleared Events field.

    Data Type | Bit # | Description
Unsigned Word | 0 | NCE
 |  | 0: No Network Change Event (NCE) available
 |  | 1: NCE happened. There was a change in the Maximum Position Information. If the network is available, the event flag will be set after the Maximum Position value is valid and the network is in stable lock. The event is delayed at least 100 ms after the Maximum Position Information change has been detected. It is also reported if the new value is equal to the previous value, but the interim value that caused a change in the Maximum Position information was invalid.
    Availability

    Indicates if the MOST network is available

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | NotAvailable | The MOST network is not available. In this state the network is not started up or startup is not yet completed ( AvailabilityInfo is Regular ). Furthermore, it is possible that diagnosis mode has been started ( AvailabilityInfo is Diagnosis ).
 | 0x01 | Available | The MOST network is available.
    AvailabilityInfo

    Indicates the sub state to parameter Availability

    Availability is NotAvailable

    Data Type

    Valid Values

    Mnemonic

    Description

    Enum

    0x00

    Regular

    Network is in NetInterface Off or Init state. It is pending to become available again. If AvailabilityTransitionCause is ErrorSystem , the error condition may be freed first, before the network can be started.

    0x02

    Diagnosis

    - INIC enters this state when RBD is started. It stays in this state until diagnosis is finished. After RBD is finished, INIC.MOSTNetworkRBD.Result() is returned, containing the result of the RBD.
    An inquiry of INIC.MOSTNetworkRBD-Result() also reports the result of the RBD.

    - INIC enters this state after starting the ExtendedNetworkControl.PhysicalLayerTest() , system diagnosis or device diagnosis.

    0x06

    ForcedNA

    INIC was forced to enter NotAvailable state.

    Availability is Available
Data Type | Valid Values | Mnemonic | Description
Enum | 0x10 | Unstable | Unlocks have been detected.
 | 0x11 | Stable | Network is in stable lock.
    AvailabilityTransitionCause

    Indicates the transition cause of the MOST network going from NotAvailable to Available or vice versa. This parameter behaves like an event. Once reported, it is cleared to NoTransition . A new attached device will also see NoTransition , which implies that AvailabilityTransitionCause is not remembered from the past, e.g., after a device went through Protected Mode.

    The default value is 0xFF.

    Data Type | Transition from | Valid Values | Mnemonic | Description
Enum | NotAvailable to Available | 0x00 | Command | Startup is initiated by chip e.g., INIC.MOSTNetworkStartup() , MOSTNetworkStartup (0x524).
 |  | 0x01 | RxActivity | Chip is woken up by network activity.
 | Available to NotAvailable | 0x10 | Normal | - Network is shutdown standardly by an INIC.MOSTNetworkShutdown() command (MOSTNetworkShutdown (0x525)), initiated locally or by a node positioned upstream (in the latter case, the shutdown flag indicates a Normal Shutdown). - RBD or the physical layer test has been started.
 |  | 0x11 | ErrorSuddenSignalOff | Network is shut down due to an error. In this case the shutdown reason was a sudden signal off. No shutdown flag is present.
 |  | 0x12 | ErrorCriticalUnlock | Network is shut down due to an error. In this case the shutdown reason was a critical unlock. No shutdown flag is present.
 |  | 0x13 | ErrorSystem | Network is shut down due to a chip or system error. Possible reasons are: - INIC enters ForcedNA state.
 | - | 0xFF | NoTransition | No transition
    NodeAddress

    For details on parameter settings and the behavior of this parameter, refer to section Node Address.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0100...0x013F | 1 | None
 |  | 0x0010...0x00FF, 0x0140...0x02FF, 0x0500...0x0FEF
 |  | 0x0FFE | -
 |  | 0xFFFF (factory default value)
    NodePosition

    Current valid NodePosition if network is available. Zero is reported for a TimingMaster device. 0xFF is reported if the MOST network is not available.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0...63 | 1 | None
 |  | 0xFF | -
    MaxPosition

    Current number of nodes in the MOST network if network is available. Value is updated with the Network Change Event. 0xFF is reported if the MOST network is not available.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 1...64 | 1 | None
 |  | 0xFF | -
    PacketBW

    Current size of packet bandwidth while the MOST network is available, see also Table 21-4 for bandwidth allocation. 0xFFFF is reported if the MOST network is not available.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0...372 | 4 | Byte
 |  | 0xFFFF | -
    MOSTNetworkConfiguration (0x521)

    This function covers general MOST network-related configuration settings as well as packet and control data-related settings. Packet-related parameters can be modified by setting the appropriate bits inside the Mask parameter. Parameter PacketFilterMode enables various options for the destination address match logic for MOST Ethernet Packets (MEP). The packet hash parameters access the 64-bit hash table to allow reception of multi-cast Ethernet frames.

    FBlockID

    FktID

    OPType

    Parameters

    INIC

    (0x00)

    MOSTNetwork-
    Configuration

    (0x521)

    Get (0x1)

    -

    SetGet (0x2)

    Mask, NodeAddress, GroupAddress,
    ControlLLRBlockCount, PacketFilterMode,
    PacketHash_63to48, PacketHash_47to32,

    PacketHash_31to16, PacketHash_15to0,
    PacketEUI48_47to32, PacketEUI48_31to16, PacketEUI48_15to0, PacketLLRTime

    Status (0xC)

    NodeAddress, GroupAddress,
    ControlLLRBlockCount, PacketFilterMode,
    PacketHash_63to48, PacketHash_47to32,

    PacketHash_31to16, PacketHash_15to0,
    PacketEUI48_47to32, PacketEUI48_31to16, PacketEUI48_15to0, PacketLLRTime

    Error (0xF)

    ErrorCode, ErrorInfo
    Mask

    Changes a single, multiple or all parameters in one SetGet operation. Parameters which are not being set are transmitted as dummy values; they are not decoded by INIC.
    The mask bits can either be set to 0 or 1 and behave as follows:
    0: The parameter is not considered in the operation.
    1: The parameter is considered in the operation.

    Data Type | Bit # | Parameters
Unsigned Word | 0 | NodeAddress
 | 1 | GroupAddress
 | 2 | ControlLLRBlockCount
 | 3 | PacketFilterMode
 | 4 | PacketHash_15to0, PacketHash_31to16, PacketHash_47to32, PacketHash_63to48
 | 5 | PacketEUI48_47to32, PacketEUI48_31to16, PacketEUI48_15to0
 | 6 | PacketLLRTime
    NodeAddress

    NodeAddress of the device. If the NodeAddress is set in the dynamic range (0x0100...0x013F), parameter NodeAddress in the Status message will return 0xFFFF. Values 0x0F00...0x0FEF, 0x0FFE and 0xFFFF cannot be set.
    The actual NodeAddress is retrieved by function INIC.MOSTNetworkStatus() .
    For details on parameter settings and the behavior of this parameter, refer to section Node Address.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0100...0x013F | 1 | None
 |  | 0x0010...0x00FF, 0x0140...0x02FF, 0x0500...0x0FEF
 |  | 0x0FFE | -
 |  | 0xFFFF
    GroupAddress

    For details on parameter settings and the behavior of this parameter, refer to section Group Address.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0300...0x03FF | 1 | None
    ControlLLRBlockCount

    Defines the block count for control Low-Level Retries for all messages generated by the INIC itself. For more information refer to Section 17.1 .

    The default value is 10.

    This parameter can be customized via the Configuration String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0...100 | 1 | None
    PacketFilterMode

    Determines the mode of the address match filter for MOST Ethernet Packets

    Data Type | Bit # | Description
Unsigned Word | 0 | PASEL (physical address filter select)
 |  | 0: Physical address perfect filter enabled ( default)
 |  | 1: Physical address hash filter
 | 1 | PAPAS (physical address pass)
 |  | 0: Physical address match enabled (default)
 |  | 1: All physical addresses are received
 | 2 | MCSEL (multi-cast address filter select)
 |  | 0: Multi-cast address perfect filter enabled (default)
 |  | 1: Multi-cast address hash filter enabled
 | 3 | MCPAS (multi-cast address pass)
 |  | 0: Multi-cast address match enabled (default)
 |  | 1: All multi-cast addresses are received
 | 4 | INVFILT (inverse filter)
 |  | 0: Filter is not inverted (default)
 |  | 1: Filter is inverted, i.e., all single- and multi-cast addresses that do not match the filter (broadcast addresses are not influenced)
 | 5 | BISBCST (broadcast receive disable)
 |  | 0: Broadcast packets can be received (default)
 |  | 1: All broadcast frames are ignored

    Examples:
    Mode (5:0) is 1XXXXX: All broadcast frames disabled (FF:FF:FF:FF:FF:FF)

    Mode (5:0) is 000000: All addresses that match the perfect filter

    Mode (5:0) is 000100: Physical addresses that match the perfect filter; multi-cast addresses that match the hash filter

    Mode (5:0) is 000101: All addresses that match the hash filter

    Mode (5:0) is 010000: All addresses that do not match the perfect filter

    Mode (5:0) is 001010: All addresses

    Mode (5:0) is 001000: All multi-cast addresses; physical addresses that match the perfect filter

    Mode (5:0) is 001001: All multi-cast addresses; physical addresses that match the hash filter

    PacketHash_63to48

    Defines bits 63:48 of the hash table

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    PacketHash_47to32

    Defines bits 47:32 of the hash table

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    PacketHash_31to16

    Defines bits 31:16 of the hash table

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    PacketHash_15to0

    Defines bits 15:0 of the hash table

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    PacketEUI48_47to32

    Defines bits 47:32 of the EUI-48.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    PacketEUI48_31to16

    Defines bits 31:16 of the EUI-48.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    PacketEUI48_15to0

    Defines bits 15:0 of the EUI-48.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    PacketLLRTime

    Wait time between Low-Level Retries for data packets in number of MOST network frames.

    The default value is 0.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0...255 | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | A change of the Node Address is not allowed; either the device is in - System Mode UNICENS , - system diagnosis mode or - device diagnosis mode.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    MOSTNetworkFrameCounter (0x523)

    This function is used to synchronize clocks on a MOST network frame basis.

    The frame counter is automatically enabled at network startup. The counter cannot be disabled; it is always active, independent of the NetInterface state or the INIC’s device mode.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MOSTNetworkFrameCounter (0x523) | Get (0x1) | Reference
 |  | Status (0xC) | Reference, FrameCounter, FrameCounterLock
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Reference

    Reference frame counter

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Long | 0 | 0x00000000... 0xFFFFFFFF | 1 | None
    FrameCounter

    Contains the MOST network frame counter at the moment the request was processed by the INIC

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Long | 0 | 0x00000000... 0xFFFFFFFF | 1 | None
    FrameCounterLock

    Indicates if the frame counter is locked to the MOST network.

    Data Type | Bit # | Valid Values | Description
Boolean | 0 | False (0) | Frame counter is not locked to the MOST network.
 |  | True (1) | Frame counter is locked to the MOST network.
    MOSTNetworkStartup (0x524)

    This function initializes the NetInterface, thus waking up the MOST network. The waking device always operates as TimingMaster.

    If Available state is reached, the result is reported.

    If INIC.MOSTNetworkStartup() is initiated in NET_OFF before either timer t Restart or timers t SSO_ShutDown + t Restart (timers are started in NET_OFF ) have timed out, the startup request will be postponed chip-internal and executed when the timer(s) have timed out. If INIC enters Protected Mode when a startup is pending, the startup process will be canceled automatically by INIC.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MOSTNetworkStartup (0x524) | StartResult (0x2) | AutoForcedNotAvailableTime, PacketBW
 |  | Result (0xC) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    AutoForcedNotAvailableTime

    Determines the delay for network shut down after the INIC has entered Protected Mode. The INIC does not shut down the Network, if this value is set to 65535 ms.

    After the timer is expired, state INIC.MOSTNetworkForceNotAvailable.Status(Force = True) is entered. The state can be left by calling INIC.MOSTNetworkForceNotAvailable.SetGet(Force = False) .

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 10...65535 | 1 | ms
    PacketBW

    Packet data bandwidth on the MOST network configured by a TimingMaster device. The applied value is reported with INIC.MOSTNetworkStatus() , MOSTNetworkStatus (0x520).

    The default value is 52.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0...372 | 4 | Byte

    Table 21-4: Bandwidth Configurations
Available Bandwidth for Packet Data (in Number of Bytes per Frame) | Available Bandwidth for Streaming Data (in Number of Bytes per Frame)
0 | 372
4 | 368
8 | 364
... | ...
52 (default) | 320
... | ...
364 | 8
368 | 4
372 | 0
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | - The last INIC.MOSTNetworkStartup() call has not yet been finished. - INIC.MOSTNetworkShutdown() has not yet been finished.
 | 0x02 | 0x20 | - RBD is active, or - physical layer test is running, or - ForcedNA was set, or - system diagnosis is running, or - the device is already in device diagnosis mode.
 |  | 0x21 | Available state cannot be reached, since - INIC.MOSTNetworkShutdown() is called, or - RBD is started, or - physical layer test is started, or - ForcedNA is set, or - system diagnosis is started.
 | 0x03 | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 |  | 0xF3 | Configuration interface is not in Attached Mode.
 | 0x04 | 0x40 | Calling INIC.MOSTNetworkStartup() is not possible in Available state.
    MOSTNetworkShutdown (0x525)

    This function shuts down the NetInterface. Once the NetInterface is in NetInterface Off state, the signal at the output turns off causing a chain reaction, shutting down all the devices in the MOST network. Typically, only the PowerMaster may switch off the signal, except during special error cases (see MOST Specification [1] ). The result will be sent after t Restart or timers t SSO_ShutDown + t Restart have expired. If the network is already in NetInterface Off state and t Restart is elapsed, the result is returned immediately without an error.

    The INIC enters NetInterface Off state automatically, when no network signal is present at its input.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MOSTNetworkShutdown (0x525) | StartResult (0x2) | -
 |  | Result (0xC) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | - The last INIC.MOSTNetworkShutdown() call has not yet been finished.
 | 0x02 | 0x20 | - RBD is active, or - physical layer test is running, or - ForcedNA was set, or - system diagnosis is running.
 | 0x03 | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 |  | 0xF3 | Configuration interface is not in Attached Mode.
    MOSTNetworkRBD (0x526)

    This function starts the Ring Break Diagnosis. The INIC.MOSTNetworkStatus() function indicates the MOST network is in NotAvailable state and AvailabilityInfo Diagnosis has been entered. After RBD has been finished, the result is reported via function INIC.MOSTNetworkRBDResult() , see Section 21.2.3.6 . After RBD is finished, the INIC enters NetInterface Off state.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MOSTNetworkRBD (0x526) | StartResult (0x2) | Type
 |  | Result (0xC) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Type

    Indicates whether the INIC performs the RBD as TimingMaster or as TimingSlave

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | TimingSlave | INIC performs RBD as TimingSlave.
 | 0x01 | TimingMaster | INIC performs RBD as TimingMaster.
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | The last INIC.MOSTNetworkRBD() call has not yet been finished.
 |  | 0x11 | RBD is active because it was triggered by PS0 and PS1 pins or it was started previous to DeviceAttach.
 | 0x02 | 0x20 | - Physical layer test is running or - ForcedNA was set.
 | 0x03 | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 |  | 0xF3 | Configuration interface is not in Attached Mode.
 | 0x04 | 0x41 | The MOST Port is configured in full duplex coax mode.
    MOSTNetworkRBDResult (0x527)

    This function contains the result of the Ring Break Diagnosis. The RBD can be started by PS0 and PS1 pins or by method INIC.MOSTNetworkRBD() , see Section 21.2.3.6 . If the method has been started, the results of the ring break can be inquired by using this function.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MOSTNetworkRBD-Result (0x527) | Get (0x1) | -
 |  | Status (0xC) | RBDResult, RBDPosition, RBDStatus, RBDDiagID
 |  | Error (0xF) | ErrorCode, ErrorInfo
    RBDResult

    Describes the result type

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | NoError | No error
 | 0x01 | PosDetected | Position detected
 | 0x02 | DiagFailed | Diagnosis failed
 | 0x03 | Pos0WeakSig | PosDetected is 0 and unlockable signal on Rx was detected
 | 0xFE | Pending | RBD is running
 | 0xFF | NoResult | No result
    RBDPosition

    Relative position to the ring break. This parameter is only used for RBDResult PosDetected ; for all others, 0 is returned.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0...63 | 1 | None
    RBDStatus

    Status of the RBD result after the ring break. The status is received via the NetBlock.RBDResult() message, distributed in Phase 3 of the Ring Break Diagnosis. 0xFF is reported when the message was not received.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | ActivityButNoLock | Status is activity, but no lock ( Pos0WeakSig ).
 | 0x02 | NoActivity | Status is no activity ( PosDetected ).
 | 0xFF | NoResult | No result
    RBDDiagID

    Diagnostic identifier of the device located after the ring break. The identifier is received via the NetBlock.RBDResult() message, distributed in Phase 3 of the Ring Break Diagnosis. 0xFFFF is reported when the message was not received.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    MOSTNetworkForceNotAvailable (0x52B)

    This function controls the behavior of the MOST network interface. INIC.MOSTNetworkForceNotAvailable.SetGet(Force = True) may be triggered for instance when an INIC.DeviceStatus.Status(PowerState = ULow ) message is sent to the EHC. If Force is set to True , Availability in INIC.MOSTNetworkStatus() is set to NotAvailable , AvailabilityInfo is set to ForcedNA and AvailabilityTransitionCause is set to ErrorSystem . For normal operation, the EHC may call INIC.MOSTNetworkForceNotAvailable.SetGet(Force = False) .

    Note: This function cannot be called in Protected Mode. On a transition to Protected Mode, Force is automatically set to False .

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MOSTNetworkForceNotAvailable (0x52B) | Get (0x1) | -
 |  | SetGet (0x2) | Force
 |  | Status (0xC) | Force
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Force

    Used to force the INIC to enter network NotAvailable state

    Data Type | Bit # | Valid Values | Description
Boolean | 0 | False (0) | INIC is not forced to network NotAvailable state.
 |  | True (1) | INIC is forced to network NotAvailable state (static Tx-Off).
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 |  | 0xF1 | Configuration interface is in Protected Mode.
    MOSTNetworkSystemDiagnosis (0x52C)

    This function is used to start the system diagnosis.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MOSTNetworkSystemDiagnosis (0x52C) | StartResult (0x2) | -
 |  | Result (0xC) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | - The last INIC.MOSTNetworkSystemDiagnosis() call has not yet been finished. - INIC.MOSTNetworkSystemDiagnosisEnd() has not yet been finished.
 | 0x02 | 0x22 | - Device is not in NET_OFF state. - Device is already in device diagnosis mode.
 | 0x03 | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    MOSTNetworkSystemDiagnosisEnd (0x52D)

    This function is used to end the system diagnosis.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MOSTNetworkSystemDiagnosisEnd (0x52D) | StartResult (0x2) | -
 |  | Result (0xC) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | The last INIC.MOSTNetworkSystemDiagnosisEnd() call has not yet been finished.
 | 0x02 | 0x22 | MOST network is not in system diagnosis state.
 | 0x03 | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 |  | 0xF3 | Configuration interface is not in Attached Mode.
    MOST Port Functions

    The functions in this section are used to handle the behavior of a MOST Port, including the return of the port status, and the creation of a MOST socket. Furthermore, the functions are used to define all parameters that are required to enable data transfer over a port and its sockets.

    A MOST Port is in direct relation to the MOST network management.

    To get more information on the MOST Port, refer to Chapter 7 .

    An overview of the INIC’s MOST Port functions is shown in Table 21-5 .

    Table 21-5: MOST Port Functions
Function Name | FktID | Possible to Notify | Page
MOSTPortStatus() | 0x602 | Yes | MOSTPortStatus (0x602)
MOSTSocketCreate() | 0x611 | No | MOSTSocketCreate (0x611)
    MOSTPortStatus (0x602)

    This function reports streaming-related information for a MOST Port, including the state of the port and available streaming bandwidth.

    This function supports notification.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MOSTPortStatus (0x602) | Status (0xC) | MOSTPortHandle, Availability, AvailabilityInfo, FullStreamingEnabled, FreeStreamingBW
 |  | Error (0xF) | ErrorCode, ErrorInfo
    MOSTPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0D yy | 1 | None
    Availability

    Indicates if the MOST Port is available and ready for streaming data connections

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | NotAvailable | MOST Port is not available for streaming data. FreeStreamingBW is set to 0xFFFF. All created sockets on this port become invalid.
 | 0x01 | Available | MOST Port is available and it is possible to have streaming data connections.
    AvailabilityInfo

    Indicates the sub state to parameter Available

    Availability is NotAvailable
Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Regular | The MOST Port is not available for streaming data. This is for instance the case if the MOST network is shut down or Ring Break Diagnosis is running.

    Availability is Available
Data Type | Valid Values | Mnemonic | Description
Enum | 0x10 | Unstable | Unlocks have been detected at the MOST Port and streaming is temporarily not available.
 | 0x11 | Stable | The MOST Port is in stable lock.
    FullStreamingEnabled
    Data Type | Bit # | Valid Values | Description
Boolean | 0 | False (0) | Streaming is disabled.
    FreeStreamingBW

    Specifies the number of free streaming bandwidth for the MOST Port, see also Table 21-4 for bandwidth allocation. 0xFFFF is reported if the MOST Port is not available.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0...372 | 1 | None
 |  | 0xFFFF | -

    MOSTSocketCreate (0x611)

    This function creates a MOST socket bound to the MOST Port.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MOSTSocketCreate (0x611) | StartResult (0x2) | MOSTPortHandle, Direction, DataType, Bandwidth, ConnectionLabel
 |  | Result (0xC) | MOSTSocketHandle, ConnectionLabel
 |  | Error (0xF) | ErrorCode, ErrorInfo
    MOSTPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0D yy | 1 | None
    Direction

    Indicates the direction of the data stream from the INIC’s perspective

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Input | Socket transfers data into INIC.
 | 0x01 | Output | Socket transfers data out of INIC.
    DataType

    Specifies the data type

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Sync | Specifies the Synchronous Streaming data type
 | 0x03 | AVPacketized | Specifies the A/V Packetized Isochronous Streaming data type
 | 0x04 | QoSPacket | Specifies the Quality of Service packet data type
 | 0x05 | DiscFramePhase | Specifies the DiscreteFrame Isochronous Streaming data type, phase information
    Bandwidth

    Required socket bandwidth in bytes. Maximum value depends on currently free network resources.

    Data Type | Exp. | Socket Bandwidth | Description | Step | Unit
DataType = Sync , AVPacketized , and QoSPacket
Unsigned Word | 0 | 1...372 | For calculating the required bandwidth refer to . | 1 | Byte
DataType = DiscFramePhase
Unsigned Word | 0 | 3 | Fixed size of 3 bytes | - | Byte
    ConnectionLabel

    MOST network connection label. When used as parameter with direction Input , the connection label is used to connect to the appropriate MOST network frame bytes. When used as parameter with direction Output , the connection label is not used and must be set to 0xFFFF.

    When ConnectionLabel is used as Result, it specifies the MOST network connection label.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x000C...0x017F ( Input ) | 1 | None
 |  | 0xFFFF ( Output ) | -
    MOSTSocketHandle

    Socket resource handle of the created socket. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0E yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | The last INIC.MOSTSocketCreate() call has not yet been finished.
 | 0x02 | 0x20 | A communication error has occurred, for example: the operation was interrupted by network disturbance. The EHC may try to create the socket again. It should wait at least 20 ms before retrying during normal network conditions or otherwise wait until stable network lock has been re-gained.
 | 0x03 | 0x30 | A socket of direction Input was requested to be created, and - there is no network channel available that matches the provided ConnectionLabel , or - there was already an Input socket created with the provided ConnectionLabel , or - an Output socket was found that is not a loop socket, or - the provided channel size mismatches with the actual size of the network channel, or - the MOST Port has no streaming resources.
 |  | 0x31 | - A socket of direction Output was requested to be created, but the used ConnectionLabel is not 0xFFFF. - A socket of direction Input was requested to be created, but the used ConnectionLabel is 0xFFFF.
0x20 | 0x03 | 0x32 | Parameter Bandwidth is invalid for the data type DiscFramePhase , or Bandwidth does not match the loop socket.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 |  | 0xF1 | Configuration interface is in Protected Mode.
 | 0x04 | 0x40 | The MOST network is in NotAvailable state.
 |  | 0x41 | A socket of direction Output was requested to be created, and - there is not enough free bandwidth on the MOST network available to complete the allocation request or - the MOST Port has no streaming resources.
 |  | 0x42 | The socket cannot be created, since there is no socket entry possible.
    MediaLB Port Functions

    The functions in this section are used to handle the behavior of the MediaLB Port, including the creation of the port and a socket on it. Furthermore, the functions are used to define all parameters that are required to enable data transfer over the port and its sockets.

    To get more information on the MediaLB Port, refer to Chapter 8 .

    An overview of the INIC’s MediaLB Port functions is shown in Table 21-6 .

    Table 21-6: MediaLB Port Functions
Function Name | FktID | Possible to Notify | Page
MediaLBPortCreate() | 0x621 | No | MediaLBPortCreate (0x621)
MediaLBSocketCreate() | 0x631 | No | MediaLBSocketCreate (0x631)
MediaLBPacketMuxSocketCreate() | 0x632 | No | MediaLBPacketMuxSocketCreate (0x632)
    MediaLBPortCreate (0x621)

    This function creates the MediaLB Port with its associated port instance identifier.

    If the MediaLB Port has been already created, an error message will be returned.

    A MediaLB Port can be created when INIC starts up. In this case, the appropriate settings need to be written to the Configuration String. If the MediaLB Port is created at startup, it cannot be destroyed during runtime. It remains created when EHC re-attaches, since the port is part of the INIC’s default configuration.

    If a MediaLB Port is created during runtime using INIC.MediaLBPortCreate() , it will be automatically destroyed when EHC detaches.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MediaLBPortCreate (0x621) | StartResult (0x2) | Index, ClockConfig
 |  | Result (0xC) | MediaLBPortHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Index

    MediaLB Port instance

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00 | 1 | None
    ClockConfig

    Stores the clock speed configuration. The value is a multiple of the MOST network frame rate Fs; this means the MediaLB Port can only be frequency locked to the network’s system clock.

    This parameter can be customized via the Configuration String.

    Data Type | Valid Values | Mnemonic | Description
Enum |  |  | MediaLB Pin Configuration | Clk | Available Quadlets | Available Bytes
 | 0x00 | 256Fs | 3-Pin mode | 256 x Fs | 7 | 28
 | 0x01 | 512Fs |  | 512 x Fs | 15 | 60
 | 0x02 | 1024Fs |  | 1024 x Fs | 31 | 124
 | 0x03 | 2048Fs | 6-Pin mode | 2048 x Fs | 57 | 228
 | 0x04 | 3072Fs |  | 3072 x Fs | 86 | 344
 | 0x05 | 4096Fs |  | 4096 x Fs | 116 | 464
 | 0x06 | 6144Fs |  | 6144 x Fs | 160 | 640
 | 0x07 | 8192Fs |  | 8192 x Fs | 214 | 856
    MediaLBPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0A yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x38 | The MediaLB Port has been already created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    MediaLBSocketCreate (0x631)

    This function creates a MediaLB socket bound to the MediaLB Port with the associated port instance identifier. If the EHC detaches, the MediaLB socket will be automatically destroyed.

    Flow control is always disabled for data type Sync .

    For all other data types, flow control is enabled when data is sent from the EHC to the INIC. Consequently, the INIC drives the RxStatus field to signal the EHC if it is ready to receive data (ReceiverReady) or if it is busy (ReceiverBusy). If data is sent from INIC to EHC, flow control is only enabled for Control and Packet data types. The INIC receives the RxStatus from the EHC and if the EHC signals ReceiverBusy, the INIC retransmits the last quadlet until the RxStatus changes.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MediaLBSocketCreate (0x631) | StartResult (0x2) | MediaLBPortHandle, Direction, DataType, Bandwidth, ChannelAddress
 |  | Result (0xC) | MediaLBSocketHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    MediaLBPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0A yy | 1 | None
    Direction

    Indicates the direction of the data stream from the INIC’s perspective

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Input | Socket transfers data into INIC.
 | 0x01 | Output | Socket transfers data out of INIC.
    DataType

    Specifies the data type

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Sync | Specifies the Synchronous Streaming data type
 | 0x01 | Packet | Specifies the packet data type
 | 0x02 | Control | Specifies the control data types
 | 0x03 | AVPacketized | Specifies the A/V Packetized Isochronous Streaming data type
 | 0x04 | QoSPacket | Specifies the Quality of Service packet data type
 | 0x05 | DiscFramePhase | Specifies the DiscreteFrame Isochronous Streaming data type, phase information
    Bandwidth

    Required socket bandwidth in bytes. The socket bandwidth is dependent on the used DataType , therefore consider the following limitations:

    • • Packet : The minimum valid value must be 4. Due to the quadlet requirement for packet data, the step must be 4.
    • • Control : Fixed size of 4 bytes.
    • • DiscFramePhase : Fixed size of 2 bytes.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 1...856 | 1 | Byte
    ChannelAddress

    Indicates the MediaLB ChannelAddress to which the socket is mapped. If the MediaLB Port is configured by the configuration string property Configuration Interface as default, channel addresses 0x0002 and 0x0004 are reserved and cannot be used.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | MediaLB 3-Pin: 0x0002...0x003E | 2 | None
 |  | MediaLB 6-Pin: 0x0002...0x007E
    MediaLBSocketHandle

    Socket resource handle of the created socket. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0B yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | Parameter ChannelAddress does not fit the range specified for the used MediaLB pin mode.
 |  | 0x31 | Parameter Bandwidth is invalid for the given data type.
 |  | 0x38 | Parameter ChannelAddress is already in use.
 |  | 0x39 | The port associated with the given MediaLBPortHandle was not created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 | 0x04 | 0x41 | The bandwidth cannot be allocated.
 |  | 0x42 | The MediaLB socket cannot be created, since there is no further socket entry possible.
    MediaLBPacketMuxSocketCreate (0x632)

    This function is used to enable the multiplexing feature.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | MediaLBPacketMuxSocketCreate (0x632) | StartResult (0x2) | MediaLBSocketHandle
 |  | Result (0xC) | MediaLBSocketHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    MediaLBSocketHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0B yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | The socket is not of data type Packet .
 |  | 0x31 | The bandwidth is less than 12 bytes.
 |  | 0x38 | - The generated multiplex channel address is already in use, or - the socket provided is already used in a multiplex configuration, or - the socket provided is already attached to the packet connection.
 |  | 0x39 | The socket associated with the given MediaLBSocketHandle was not created or the resource at the index does not match the specified resource type.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 | 0x04 | 0x42 | The MediaLB socket cannot be created, since there is no further socket entry possible.
    SPI Port Functions

    The functions in this section are used to handle the behavior of the SPI Port, including the creation of the port and the sockets on it. Furthermore, the functions are used to define all parameters that are required to enable data transfer over the port and its sockets.

    To get more information on the SPI Port, refer to Chapter 9 .

    An overview of the INIC’s SPI Port functions is shown in Table 21-7 .

    Table 21-7: SPI Port Functions
Function Name | FktID | Possible to Notify | Page
SPIPortCreate() | 0x641 | No | SPIPortCreate (0x641)
SPISocketCreate() | 0x651 | No | SPISocketCreate (0x651)
    SPIPortCreate (0x641)

    This function creates the SPI Port with its associated port instance identifier.

    If the SPI Port has been already created, an error message will be returned.

    An SPI Port can be created when INIC starts up. In this case, the appropriate settings need to be written to the Configuration String. If the port was created at startup, it cannot be destroyed during runtime. It will also remain created when EHC re-attaches, since the port is part of the INIC’s default configuration.

    If an SPI Port is created during runtime using INIC.SPIPortCreate() function, it will be automatically destroyed when EHC re-attaches.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | SPIPortCreate (0x641) | StartResult (0x2) | Index, ClockMode
 |  | Result (0xC) | SPIPortHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Index

    SPI Port instance

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00 | 1 | None
    ClockMode

    Indicates the configuration of the phase and polarity of the SCLK signal.
    This parameter can be customized via the Configuration String.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | SCLKLowSFCR | SCLK is low when idle. Data switches on the falling edge, needs to be captured on the rising edge.
 | 0x01 | SCLKLowSRCF | SCLK is low when idle. Data switches on the rising edge, needs to be captured on the falling edge.
 | 0x02 | SCLKHighSRCF | SCLK is high when idle. Data switches on the rising edge, needs to be captured on the falling edge.
 | 0x03 | SCLKHighSFCR | SCLK is high when idle. Data switches on the falling edge, needs to be captured on the rising edge.
    SPIPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x10 yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x37 | Required GPIO pins are locked.
 |  | 0x38 | The SPI Port has been already created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    SPISocketCreate (0x651)

    This function creates an SPI socket bound to the SPI Port with its associated port instance identifier. If EHC detaches, the SPI socket will be automatically destroyed.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | SPISocketCreate (0x651) | StartResult (0x2) | SPIPortHandle, Direction, DataType
 |  | Result (0xC) | SPISocketHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SPIPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x10 yy | 1 | None
    Direction

    Indicates the direction of the data stream from the INIC’s perspective

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Input | Socket transfers data into INIC.
 | 0x01 | Output | Socket transfers data out of INIC.
    DataType

    Specifies the data type

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | Packet | Specifies the packet data type
    SPISocketHandle

    Socket resource handle of the created socket. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x11 yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x39 | The port associated with the given SPISocketHandle was not created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 | 0x04 | 0x42 | The SPI socket cannot be created, since there is no socket entry possible.
    USB Port Functions

    The functions in this section are used to handle the behavior of the USB Port, including the creation of the port and a socket on it. Furthermore, the functions are used to define all parameters that are required to enable data transfer over the port and its sockets.

    To get more information on the USB Port, refer to Chapter 10 .

    An overview of the INIC’s USB Port functions is shown in Table 21-8 .

    Table 21-8: USB Port Functions
Function Name | FktID | Possible to Notify | Page
USBPortCreate() | 0x661 | No | USBPortCreate (0x661)
USBSocketCreate() | 0x671 | No | USBSocketCreate (0x671)

    USBPortCreate (0x661)

    This function creates the USB Port with its associated port instance identifier.

    If the USB Port has been already created, an error message will be returned.

    Consider that a previously created port is not automatically destroyed by the INIC when doing another call to INIC.USBPortCreate() .

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | USBPortCreate (0x661) | StartResult (0x2) | Index, PhysicalLayer, DeviceInterfaces, StreamingIfEpOutCount, StreamingIfEpInCount
 |  | Result (0xC) | USBPortHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Index

    USB Port instance

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00 | 1 | None
    PhysicalLayer

    Selects the interface of the USB Port’s physical layer.

    This parameter can be customized via the Configuration String.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Standard | Standard - USB uses the standard physical layer with analog transceivers for board communication.
 | 0x01 | HSIC | HSIC - USB uses the High-Speed Inter-Chip physical layer without analog transceivers for board communication.
    DeviceInterfaces

    Activates one or more of the USB device interfaces provided by the INIC.

    Note: The deactivation of all device interfaces yields an invalid configuration.

    Data Type | Bit # | Description
Unsigned Word | 0 | EnableControlIf (control interface activate)
 |  | 0: Deactivates the control interface
 |  | 1: Activates the control interface with Endpoints 0x0F (OUT) and 0x8F (IN) (default)
 | 1 | EnablePacketIf (packet interface activate)
 |  | 0: Deactivates the packet interface (default)
 |  | 1: Activates the packet interface with Endpoints 0x0E (OUT) and 0x8E (IN)
Unsigned Word | 3 | EnableStreamingIf (streaming interface activate)
 |  | 0: Deactivates the streaming interface
 |  | 1: Acitivates the streaming interface (default), count of OUT and IN Endpoints depends on parameters StreamingIfEpOutCount and StreamingIfEpInCount
    StreamingIfEpOutCount

    Defines the number of OUT Endpoints inside the streaming interface, starting with Endpoint 0x01. This value must be zero if the streaming interface is disabled.

    This parameter can be customized via the Configuration String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0...10 | 1 | None
    StreamingIfEpInCount

    Defines the number of IN Endpoints inside the streaming interface, starting with Endpoint 0x81. This value must be zero if the streaming interface is disabled.

    This parameter can be customized via the Configuration String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0...10 | 1 | None
    USBPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x12 yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x31 | EnableStreamingIf is disabled and the parameter values for StreamingIfEpOutCount and StreamingIfEpInCount have not been set to zero.
 |  | 0x32 | EnableStreamingIf is enabled and the parameter values for StreamingIfEpOutCount and StreamingIfEpInCount are set to zero.
 |  | 0x33 | The USB PhysicalLayer interface does not correspond with the initially selected one.
 |  | 0x38 | The USB Port has been already created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    USBSocketCreate (0x671)

    This function creates a USB socket bound to the USB Port with its associated port instance identifier. If the EHC detaches, the USB socket will be automatically destroyed.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | USBSocketCreate (0x671) | StartResult (0x2) | USBPortHandle, Direction, DataType, EndpointAddress, FramesPerTransaction
 |  | Result (0xC) | USBSocketHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    USBPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x12 yy | 1 | None
    Direction

    Indicates the direction of the data stream from the INIC’s perspective

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Input | Socket transfers data into INIC.
 | 0x01 | Output | Socket transfers data out of INIC.
    DataType

    Specifies the data type

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Sync | Specifies the Synchronous Streaming data type
 | 0x01 | Packet | Specifies the packet data type
 | 0x02 | Control | Specifies the control data types
 | 0x03 | AVPacketized | Specifies the A/V Packetized Isochronous Streaming data type
    EndpointAddress

    Specifies the address of a USB Endpoint as per its description in the USB 2.0 Specification [5] .

    0x01...0x0F: Indicates the OUT Endpoints
    0x81...0x8F: Indicates the IN Endpoints

    Note: A USB socket of direction Input only accepts a USB Endpoint address of direction OUT and a USB socket of direction Output only accepts a USB Endpoint address of direction IN.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x01...0x0F | 1 | None
 |  | 0x81...0x8F
    FramesPerTransaction

    Indicates the number of MOST network frames/packets per one USB transaction

    Data Type | Exp. | Valid Value | Description | Step | Unit
DataType = Sync
Unsigned Word | 0 | 0x0007...n | Number of MOST network frames from which the synchronous data bytes are put and filled-in into one USB transaction. For more information refer to Section 10.3.1 . Padding is applied. | 1 | None
DataType = AVPacketized
Unsigned Word | 0 | 0x0002 | Two A/V Packetized Isochronous Streaming data packets per USB transaction. For more information refer to Section 10.3.2 . Padding is applied. | - | None
 |  | 0xFFFF | USB transaction is completely filled with A/V Packetized Isochronous Streaming data. No padding is applied.
DataType = Control and Packet
Unsigned Word | 0 | 0xFFFF | No padding is applied. | - | None
    USBSocketHandle

    Socket resource handle of the created socket. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x13 yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | The value in FramesPerTransaction does not match the data type.
 |  | 0x31 | The USB Endpoint is already in use or not available.
 |  | 0x33 | The USB Endpoint does not match the socket’s direction setting.
 |  | 0x39 | The port associated with the given USBPortHandle was not created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 | 0x04 | 0x42 | The USB socket cannot be created, since there is no socket entry possible.
    Streaming Port Functions

    The functions in this section are used to handle the behavior of the Streaming Port, including the creation of the port and a socket on it. Furthermore, the functions are used to define all parameters that are required to enable data transfer over the port and its sockets. In addition the configuration of an internal loopback is provided.

    To get more information on the Streaming Port, refer to Chapter 11 .

    An overview of the Streaming Port functions is shown in Table 21-9 .

    Table 21-9: Streaming Port Functions
Function Name | FktID | Possible to Notify | Page
StreamPortConfiguration() | 0x680 | No | StreamPortConfiguration (0x680)
StreamPortCreate() | 0x681 | No | StreamPortCreate (0x681)
StreamPortLoopback() | 0x683 | No | StreamPortLoopback (0x683)
StreamSocketCreate() | 0x691 | No | StreamSocketCreate (0x691)

    StreamPortConfiguration (0x680)

    Streaming Ports can be configured either by using this function or by customizing the Configuration String. When using this function, the configuration is cleared on an EHC detach event. If the configuration is done by the configuration string, the setting will be persistent.

    Note: It is required to set the configuration of both Streaming Port instances, A and B, before any of the Streaming Ports can be created.

    Since Streaming Port B has no external clock signals, the configuration of Streaming Port B is slightly different from that of Streaming Port A. Therefore, when assigning a configuration, some parameter values do not apply and wildcard values have to be used instead. If the configuration has not been set and INIC.StreamPortConfiguration.Get() is called, an error code is returned; an error code is also returned if the configuration has already been set and INIC.StreamPortConfiguration.SetGet() is called again.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | StreamPortConfiguration (0x680) | Get (0x1) | Index
 |  | SetGet (0x2) | Index, OperationMode, PortOption, ClockMode, ClockDataDelay
 |  | Status (0xC) | Index, OperationMode, PortOption, ClockMode, ClockDataDelay
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Index

    Streaming Port instance:
    0x00: Streaming Port A
    0x01: Streaming Port B

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0x01 | 1 | None
    OperationMode

    Defines the operation mode of the Streaming Port.

    This parameter can be customized via the Configuration String.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Generic | If Index is PortB , data pins are linked to PortA clock configuration.
    PortOption

    Configures the direction of the physical pins of the indexed Streaming Port.

    This parameter can be customized via the Configuration String.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | InOut | Two serial interface pins are available; one for direction IN (Streaming Port A: SRA0 , Streaming Port B: SRB0 ) and one for direction OUT (Streaming Port A: SXA1 , Streaming Port B: SXB1 ).
 | 0x01 | DualIn | Two serial interface pins are available for direction IN.
 | 0x02 | DualOut | Two serial interface pins are available for direction OUT.
    ClockMode

    Indicates if FSY / SCK signals are configured as outputs or inputs. FSY / SCK signals are shared between all pins used for Generic streaming, including any linked pins to Streaming Port B.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Output | INIC drives the FSY / SCK signals as outputs, frequency locked to the network clock.
 | 0x01 | Input | FSY / SCK signals are configured as inputs and are driven from outside the INIC. Use RMCK, frequency locked to the network clock, as reference for clock generation.
 | 0xFF | Wildcard | -
    ClockDataDelay

    This setting is only applicable to data pins used for Generic streaming including any linked pins to Streaming Port B. All data pins share the same FSY / SCK signals, hence this setting applies to all data pins.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | NonDelayed | Data is not delayed by a single SCK clock delay.
 | 0x01 | Delayed | There is a single SCK clock delay between the start of frame (falling edge of FSY ) and the start of the frame data on the data pins.
 | 0xFF | Wildcard | -
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x32 | The wrong ClockMode parameter is used.
 |  | 0x33 | The wrong ClockDataDelay parameter is used.
 |  | 0x38 | The port configuration already exists.
 |  | 0x39 | The port configuration has not yet been set.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    StreamPortCreate (0x681)

    This function creates the Streaming Port with its associated port instance identifier.

    If a Streaming Port is created during runtime using INIC.StreamPortCreate() , it will be automatically destroyed when EHC detaches.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | StreamPortCreate (0x681) | StartResult (0x2) | Index, ClockConfig, DataAlignment
 |  | Result (0xC) | StreamPortHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Index

    Streaming Port instance:
    0x00: Streaming Port A
    0x01: Streaming Port B

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0x01 | 1 | None
    ClockConfig

    Clock speed configuration of the SCK signal. Fs should be seen as an umbrella term referring to F Network , which is the MOST network sampling frequency used for the synchronous mode.

    When creating the Streaming Port B resource, the Wildcard value should always be used for this parameter.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x03 | 64Fs | 64 x Fs
 | 0x04 | 128Fs | 128 x Fs
 | 0x05 | 256Fs | 256 x Fs
 | 0x06 | 512Fs | 512 x Fs
 | 0xFF | Wildcard | Should be used for the PortB instance
    DataAlignment

    Defines the alignment of the data bytes within the streaming port frame. While ClockDataDelay is set to Delayed , only left-justified or sequential formats are available.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Left16Bit | Left-justified, 16 bit, legacy
 | 0x01 | Left24Bit | Left-justified, 24 bit, legacy
 | 0x02 | Right16Bit | Right-justified, 16 bit, legacy
 | 0x03 | Right24Bit | Right-justified, 24 bit, legacy
 | 0x04 | Seq | Sequential
    StreamPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x16 yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | The wrong ClockConfig parameter is used.
 |  | 0x31 | The wrong DataAlignment parameter is used.
 |  | 0x37 | The port configuration for both ports has not yet been set.
 |  | 0x38 | The Streaming Port has been already created.
 |  | 0x39 | Streaming Port A and B are configured as linked, however Streaming Port A has not been created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    StreamPortLoopback (0x683)

    This function enables an internal loopback on a Streaming Port: data of an output pin is internally looped back to an input pin. Loopback is only applicable if the port is configured for Generic streaming.

    This function can be used for delay measurements in microphone array applications. When loopback is enabled, the output pin may be muted after the loopback, such that the delay measurement does not disturb external logic.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | StreamPortLoopback (0x683) | Get (0x1) | StreamPortHandle, PinPair
 |  | SetGet (0x2) | StreamPortHandle, PinPair, LoopbackMode, OutputMode
 |  | Status (0xC) | PinPair, LoopbackMode, OutputMode
 |  | Error (0xF) | ErrorCode, ErrorInfo
    StreamPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x16 yy | 1 | None
    PinPair

    Selects the pin-pair for which the internal loopback mechanism shall be enabled or disabled

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | SRXA1ToSRXA0 | SRXA1 -> SRXA0 , valid for PortA , Generic , InOut
 | 0x10 | SRXB1ToSRXB0 | SRXB1 -> SRXB0 , valid for PortB , Generic , InOut
    LoopbackMode

    Enables or disables the internal loopback mechanism

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | LoopbackDisabled | The internal loopback mechanism is disabled.
 | 0x01 | LoopbackEnabled | The internal loopback mechanism is enabled.
    OutputMode

    Enables or disables data on the output pin. This setting is only applicable if LoopbackMode is enabled. It is possible to alter the output mode by using INIC.StreamPortLoopback.SetGet() , with parameter LoopbackMode set to LoopbackEnabled , and providing different values to this parameter.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | OutputDisabled | The data on the serial interface output pin is disabled.
 | 0x01 | OutputEnabled | The data on the serial interface output pin is enabled.
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x31 | The wrong PinPair parameter is used.
 |  | 0x39 | The port associated with the given StreamPortHandle was not created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    StreamSocketCreate (0x691)

    This function creates a Synchronous socket bound to the Streaming Port with the specified port instance identifier. If INIC enters Protected Mode, the socket will be automatically destroyed.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | StreamSocketCreate (0x691) | StartResult (0x2) | StreamPortHandle, Direction, DataType, Bandwidth, StreamPinID
 |  | Result (0xC) | StreamSocketHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    StreamPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x16 yy | 1 | None
    Direction

    Indicates the direction of the data stream from the INIC’s perspective

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Input | Socket transfers data into INIC.
 | 0x01 | Output | Socket transfers data out of INIC.
    DataType

    Specifies the data type

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Sync | Specifies the Synchronous Streaming data type
    Bandwidth

    Required socket bandwidth in bytes

    Data Type | Exp. | Bandwidth | Description | Step | Unit
DataType = Sync
Unsigned Word | 0 | 2 | When used with 64Fs (0x03) or higher, and Left16Bit or Right16Bit data alignment, this size corresponds to a mono 16-bit channel that will be routed as left channel data. | 1 | Byte
 |  | 3 | When used with 64Fs (0x03) or higher, and Left24Bit or Right24Bit data alignment, this size corresponds to a mono 24-bit channel that will be routed as left channel data.
 |  | 4 | When used with 64Fs (0x03) or higher, and Left16Bit or Right16Bit data alignment, this size corresponds to a stereo 16-bit channel.
 |  | 6 | When used with 64Fs (0x03) or higher, and Left24Bit or Right24Bit data alignment, this size corresponds to a stereo 24-bit channel.
 |  | 1...8 | Variable size when used with 64Fs (0x03) and sequential data alignment.
 |  | 1...16 | Variable size when used with 128Fs (0x04) and sequential data alignment.
 |  | 1...32 | Variable size when used with 256Fs (0x05) and sequential data alignment.
 |  | 1...64 | Variable size when used with 512Fs (0x06) and sequential data alignment.
    StreamPinID

    ID of the serial interface pin of the addressed Streaming Port instance to which the socket should be attached

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | SRXA0 | PortA , pin 5
 | 0x01 | SRXA1 | PortA , pin 6
 | 0x10 | SRXB0 | PortB , pin 7
 | 0x11 | SRXB1 | PortB , pin 8
    StreamSocketHandle

    Socket resource handle of the created socket. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x17 yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | The wrong Bandwidth parameter is used.
 |  | 0x31 | The wrong StreamPinID parameter is used for a Sync connection.
 |  | 0x32 | The wrong Direction parameter is used.
 |  | 0x37 | Parameter StreamPinID is already in use by a socket.
 |  | 0x39 | The port associated with the given StreamPortHandle was not created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 | 0x04 | 0x42 | The Streaming Port socket cannot be created, since there is no socket entry possible.
    RMCK Port Function

    The function below is used to create an RMCK Port and to define the settings of it.
    To get more information on the RMCK Port, refer to Chapter 12 .

    RMCKPortCreate (0x6A1)

    This function creates an RMCK Port with its associated port instance identifier.

    If an RMCK Port is created during runtime using INIC.RMCKPortCreate() , it will be automatically destroyed when the EHC detaches.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | RMCKPortCreate (0x6A1) | StartResult (0x2) | Index, ClockSource, Divisor
 |  | Result (0xC) | RMCKPortHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Index

    RMCK Port instance

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00 | 1 | None
    ClockSource

    Indicates the source of the RMCK clock

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | NetworkSystem | RMCK is locked to the system clock.
    Divisor

    Divisor of the clock source. Validity of the divisor depends on parameter ClockSource . The frequency of the clock source is divided by the Divisor to give the output frequency. An even Divisor gives a 50/50 duty cycle; an odd Divisor has a duty cycle of 1/ Divisor high and the rest low (for example a Divisor of 3 will have a duty cycle of 1/3 high and 2/3 low).

    This parameter can be customized via the Configuration String.

    Data Type | Exp. | Valid Values | Step | Unit
ClockSource is NetworkSystem (3072Fs)
Unsigned Word | 0 | 0x0002...0x0FFF | 1 | None
 |  | 0x1000...0x1FFE | 2
    RMCKPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x1A yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x38 | The RMCK Port has been already created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    I ² C Port Functions

    The functions in this section are used to handle the behavior of the I 2 C Port, including the creation and configuration of the hardware port.

    To get more information on the I 2 C Port, refer to Chapter 13 .

    An overview of the I 2 C Port functions is shown in Table 21-10 .

    Table 21-10: I²C Port Functions
Function Name | FktID | Possible to Notify | Page
I2CPortCreate() | 0x6C1 | No | I2CPortCreate (0x6C1)
I2CPortRead() | 0x6C3 | No | I2CPortRead (0x6C3)
I2CPortWrite() | 0x6C4 | No | I2CPortWrite (0x6C4)
    I2CPortCreate (0x6C1)

    This function is used to define the I 2 C Port working as I 2 C-bus master. The function creates the I 2 C Port with its associated port instance identifier.

    If the I 2 C Port has been already created, an error message will be returned.

    An I 2 C Port can be created when INIC starts up. In this case, the appropriate settings need to be written to the Configuration String. If the port was created at startup, it cannot be destroyed during runtime. It will also remain created when EHC re-attaches, since the port is part of the INIC’s default configuration.

    If an I 2 C Port is created during runtime using the INIC.I2CPortCreate() function, it will be automatically destroyed when EHC re-attaches.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | I2CPortCreate (0x6C1) | StartResult (0x2) | Index, Address, OperationMode, Speed
 |  | Result (0xC) | I2CPortHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Index

    I 2 C Port instance

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00 | 1 | None
    Address

    Specifies the 7-bit I 2 C Port slave address. This parameter is ignored in OperationMode Master .

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0x7F | 1 | None
    OperationMode

    Defines the operation mode of the I 2 C Port

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | Master | Sets I 2 C operation mode to master.
    Speed

    Specifies the speed grade of the I 2 C Port

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | SlowMode | Speed grade of the port is 100 kHz.
 | 0x01 | FastMode | Speed grade of the port is 400 kHz.
    I2CPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0F yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x38 | The I 2 C Port has been already created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    I2CPortRead (0x6C3)

    This function reads a block of bytes from an I 2 C device at a specified I 2 C address.

    Note: The function can only be used, if the I 2 C Port has been configured as Master . If the I 2 C Port was configured as I 2 C-bus slave via the configuration string, an error message will be returned.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | I2CPortRead (0x6C3) | StartResult (0x2) | I2CPortHandle, SlaveAddress, Length, Timeout
 |  | Result (0xC) | I2CPortHandle, SlaveAddress, Length, DataList
 |  | Error (0xF) | ErrorCode, ErrorInfo
    I2CPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0F yy | 1 | None
    SlaveAddress

    Specifies the 7-bit I 2 C slave address of the peripheral to be read.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0x7F | 1 | None
    Length

    Number of bytes to be read from the address

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 1...32 | 1 | Byte
    Timeout

    Specifies the timeout for the I 2 C Port read

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 10...65535 | 1 | ms
    DataList

    List of data bytes to be read from the addressed I 2 C peripheral

    Data Type | Number of Elements | Parameters
Stream | 1...32 | { Data }
    Data

    Data bytes to be read from the addressed I 2 C peripheral

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | The firmware is busy due to a previous request.
 | 0x02 | 0x21 | A NACK signal has been detected on the I 2 C bus.
 |  | 0x23 | A timeout has been detected. Pending transfers will be canceled and terminated by a STOP condition. It should be considered to reset the slave device.
 |  | 0x24 | The I 2 C bus has lost arbitration.
 | 0x03 | 0x37 | The I 2 C Port is not configured in master mode.
 |  | 0x39 | The I 2 C master port has not been created.

    I2CPortWrite (0x6C4)

    This function writes a block of bytes to an I 2 C device at a specified I 2 C address. The function supports also a burst write mechanism for optimized transactions.

    Note: The function can only be used, if the I 2 C Port has been configured as Master . If the I 2 C Port was configured as I 2 C-bus slave via the configuration string, an error message will be returned.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | I2CPortWrite (0x6C4) | StartResult (0x2) | I2CPortHandle, Mode, BlockCount, SlaveAddress, Length, Timeout, DataList
 |  | Result (0xC) | I2CPortHandle, SlaveAddress, Length
 |  | Error (0xF) | ErrorCode, ErrorInfo
    I2CPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0F yy | 1 | None
    Mode

    Specifies the write transfer mode

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | DefaultMode | Repeated start mode is disabled. After transaction of the DataList a STOP condition is issued and the bus is released. This is the default operation mode.
 | 0x01 | RepeatedStartMode | Repeated start mode is enabled. After transaction of the DataList the STOP condition will be suppressed and the controlling application is able to initiate further read or write sequences.
 | 0x02 | BurstMode | Burst mode is enabled. This mode supports writing multiple blocks of bytes of the same size to the specified I 2 C address.
    BlockCount

    Specifies the number of blocks to be written to the I 2 C address. If parameter Mode is not set to BurstMode, the value of BlockCount has to be set to 0. Otherwise the valid range for this parameter is from 1 to 30.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0 | - | None
 |  | 1...30 | 1
    SlaveAddress

    Specifies the 7-bit I 2 C Port slave address of the peripheral to be read.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0x7F | 1 | None
    Length

    Number of bytes to be written to the I 2 C address. If parameter Mode is set to BurstMode, the valid range of this parameter goes from 1 to 30, since the maximum overall length for a burst transfer is limited to a size of 30 bytes ( BlockCount x Length ). For all other modes, the full range is applicable.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 1...32 | 1 | Byte
    Timeout

    Specifies the timeout for the I 2 C Port write

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 10...65535 | 1 | ms
    DataList

    List of data bytes to be written to the addressed I 2 C peripheral

    Data Type | Number of Elements | Parameters
Stream | 1...32 | { Data }
    Data

    Data bytes to be written to the addressed I 2 C peripheral

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | The firmware is busy due to a previous request.
 | 0x02 | 0x21 | A NACK signal has been detected on the I 2 C bus.
 |  | 0x23 | A timeout has been detected. Pending transfers will be canceled and terminated by a STOP condition. It should be considered to reset the slave device.
 |  | 0x24 | The I 2 C bus has lost arbitration.
 | 0x03 | 0x31 | The wrong Mode or BlockCount value was chosen.
 |  | 0x32 | The maximum burst size value ( Length x BlockCount) was exceeded or the DataList does not match the product of Length and BlockCount .
 |  | 0x37 | The I 2 C Port is not configured in master mode.
 |  | 0x39 | The I 2 C master port has not been created.

    GPIO Port Functions

    The functions in this section are used to handle the behavior of the GPIO Port, including the creation and the configuration of the port.

    To get more information on the GPIO Port, refer to Chapter 14 .

    An overview of the GPIO Port functions is shown in Table 21-11 .

    Table 21-11: GPIO Port Functions
Function Name | FktID | Possible to Notify | Page
GPIOPortCreate() | 0x701 | No | GPIOPortCreate (0x701)
GPIOPortPinMode() | 0x703 | No | GPIOPortPinMode (0x703)
GPIOPortPinState() | 0x704 | No | GPIOPortPinState (0x704)
GPIOPortTriggerEvent() | 0x705 | Yes | GPIOPortTriggerEvent (0x705)
    GPIOPortCreate (0x701)

    This function creates the GPIO Port with its associated port instance identifier.

    If the GPIO Port has been already created, an error message will be returned.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | GPIOPortCreate (0x701) | StartResult (0x2) | Index, DebounceTime
 |  | Result (0xC) | GPIOPortHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Index

    GPIO Port instance

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00 | 1 | None
    DebounceTime

    Specifies the timeout for the GPIO debounce timer (in ms). Each pin is debounced with its own timer that starts to count on every pin event. The pin is debounced, when the signal stays stable for DebounceTime . Since the debounce timer is a software implemented timer, the debounce value may jitter to higher values than the DebounceTime . Note, the INIC needs some additional time to send the notification.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 1...5000 | 1 | ms
    GPIOPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x1D yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x38 | The GPIO Port has been already created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    GPIOPortPinMode (0x703)

    This function is used for GPIO pin configuration.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | GPIOPortPinMode (0x703) | Get (0x1) | GPIOPortHandle
 |  | SetGet (0x2) | GPIOPortHandle, PinConfiguration
 |  | Status (0xC) | GPIOPortHandle, PinConfiguration
 |  | Error (0xF) | ErrorCode, ErrorInfo
    GPIOPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x1D yy | 1 | None
    PinConfiguration

    Defines the GPIO pin configuration and clears the trigger conditions on level-sensitive inputs and sticky inputs thereby allowing reporting of further trigger events. Note that trigger conditions are automatically cleared for all edge-sensitive input/output GPIO classes when the INIC.GPIOPortTriggerEvent.Status message is sent.

    Data Type | Number of Elements | Parameters
Stream | - | { Pin , Mode }
    Pin

    Defines the GPIO pin that is to be configured. GPIO pins that can’t be used return an error.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0...15 | 1 | None
    Mode

    Defines the mode of the GPIO pin. Configuring an unused pin as GPIO may preclude the usage of special functions bound to this pin. For example, configuration of GP0 as a GPIO excludes the use of I 2 C in parallel.

    The value Unavailable is not allowed to be used in combination with OpType SetGet. OpType Status returns Unavailable for pins that are not configurable as GPIO, since the pin is used in its special function, e.g., I 2 C for GP0 .

    The value Unused in OpType Status indicates that the pin is neither used as GPIO pin nor in its special function mode. The value can be used in OpType SetGet to reset a GPIO pin, then the pin is without configuration.

    When configuring the debounced edge trigger modes, the debounce logic must detect a stable debounced level before the first edge is notified. Debounce level is low for rising edge triggers and high for falling edge triggers. The detection of debounced values starts always with the configuration of the pin.
    Sticky pin modes are capable to detect brief pulses using a dedicated hardware mechanism, see the OS81118 Hardware Data Sheet [4] . The dedicated hardware mechanism is also used to detect level triggers for input pins.

    Data Type | Valid Values | Mnemonic
Enum | 0x00 | Unavailable
 | 0x01 | Unused
 | 0x10 | Input
 | 0x11 | InputStickyHighLevel
 | 0x12 | InputStickyLowLevel
 | 0x13 | InputTriggerRisingEdge
 | 0x14 | InputTriggerFallingEdge
 | 0x15 | InputTriggerRisingFallingEdge
 | 0x16 | InputTriggerHighLevel
 | 0x17 | InputTriggerLowLevel
 | 0x30 | InputDebounced
 | 0x33 | InputDebouncedTriggerRisingEdge
 | 0x34 | InputDebouncedTriggerFallingEdge
 | 0x35 | InputDebouncedTriggerRisingFallingEdge
 | 0x36 | InputDebouncedTriggerHighLevel
 | 0x37 | InputDebouncedTriggerLowLevel
 | 0x40 | OutputDefaultLow
 | 0x41 | OutputDefaultHigh
 | 0x50 | OutputOpenDrain
 | 0x53 | OutputOpenDrainTriggerRisingEdge
 | 0x54 | OutputOpenDrainTriggerFallingEdge
 | 0x56 | OutputOpenDrainTriggerHighLevel
 | 0x57 | OutputOpenDrainTriggerLowLevel
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | ErrorParameter | Description of the Error
0x20 | 0x03 | 0x30 | GPIOPortHandle , Pin , Mode | The used Pin or Mode value is out of range. All preceding PinConfiguration pairs have been configured correctly and can be used. All PinConfiguration pairs after the erroneous one are ignored.
 |  | 0x31 | GPIOPortHandle , Pin , Mode | The used pin is not available for GPIO usage. All preceding PinConfiguration pairs have been configured correctly and can be used. All PinConfiguration pairs after the erroneous one are ignored.
 |  | 0x39 | GPIOPortHandle | The GPIO Port has not been created.
0x20 | 0x03 | 0xF0 | - | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    GPIOPortPinState (0x704)

    This function is used for GPIO pin state configuration.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | GPIOPortPinState (0x704) | Get (0x1) | GPIOPortHandle
 |  | SetGet (0x2) | GPIOPortHandle, Mask, Data
 |  | Status (0xC) | GPIOPortHandle, CurrentState, StickyState
 |  | Error (0xF) | ErrorCode, ErrorInfo
    GPIOPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x1D yy | 1 | None
    Mask

    Specifies the GPIO pin to be written. For pins not configured as GPIO, the value is ignored.

    Data Type | Bit # | Valid Values | Description
Unsigned Word | 0 | False | GPIO 00 Untouched
 |  | True | Change GPIO 00
 | ...
 | 15 | False | GPIO 15 Untouched
 |  | True | Change GPIO 15
    Data

    Specifies the state of the GPIO pin to be written. For pins not configured as GPIO, the value is ignored.

    Data Type | Bit # | Valid Values | Description
Unsigned Word | 0 | False | GPIO 00 Low
 |  | True | GPIO 00 High
 | ...
 | 15 | False | GPIO 15 Low
 |  | True | GPIO 15 High
    CurrentState

    Specifies the current state of the GPIO pin. For pins not configured as GPIO, the value is always set to False.

    Data Type | Bit # | Valid Values | Description
Unsigned Word | 0 | False | GPIO 00 Low
 |  | True | GPIO 00 High
 | ...
 | 15 | False | GPIO 15 Low
 |  | True | GPIO 15 High
    StickyState

    Specifies the sticky state of all GPIO pins configured as sticky inputs. For pins not configured as sticky input, the value is always set to False.

    Data Type | Bit # | Valid Values | Description
Unsigned Word | 0 | False | GPIO 00 Low
 |  | True | GPIO 00 High
 | ...
 | 15 | False | GPIO 15 Low
 |  | True | GPIO 15 High
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x39 | The GPIO Port has not been created.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    GPIOPortTriggerEvent (0x705)

    This function notifies controllers of trigger events detected on GPIO pins, on which an event trigger has been configured using INIC.GPIOPinMode.Set . In addition, the function is used to re-enable (via INIC.GPIOPinMode.Set ) the reporting of subsequent trigger events for level-sensitive inputs and sticky inputs.

    This function supports notification.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | GPIOPortTriggerEvent (0x705) | Status (0xC) | GPIOPortHandle, RisingEdges, FallingEdges, Levels
 |  | Error (0xF) | ErrorCode, ErrorInfo
    GPIOPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x1D yy | 1 | None
 |  | 0xFFFF
    RisingEdges

    Specifies the GPIO pins on which a rising-edge trigger condition was detected by rising edge or dual edge detection logic. Detection logic is specified by the Mode parameter of INIC.GPIOPinMode.SetGet . If a rising edge has been detected for a given pin, the bit is set. A clear bit indicates that no rising edge was detected or that rising edge/dual edge detection logic is not enabled.

    Data Type | Bit # | Valid Values | Description
Unsigned Word | 0 | False | GPIO 00 Idle
 |  | True | GPIO 00 RisingEdge
 | ...
 | 15 | False | GPIO 15 Idle
 |  | True | GPIO 15 RisingEdge
    FallingEdges

    Specifies the GPIO pins on which a falling-edge trigger condition was detected by falling edge or dual edge detection logic. Detection logic is specified by the Mode parameter of INIC.GPIOPinMode.SetGet . If a falling edge has been detected for a given pin, the bit is set. A clear bit indicates that no falling edge was detected or that falling edge/dual edge detection logic is not enabled.

    Data Type | Bit # | Valid Values | Description
Unsigned Word | 0 | False | GPIO 00 Idle
 |  | True | GPIO 00 FallingEdge
 | ...
 | 15 | False | GPIO 15 Idle
 |  | True | GPIO 15 FallingEdge
    Levels

    Specifies the GPIO pins on which a logic level condition was detected by level detection logic. The levels apply to high-level as well as to low-level detection. If high-level detection logic is enabled, high levels are indicated by a set bit, if low-level detection logic is enabled, low levels are indicated by a set bit. A clear bit indicates that no level was detected or that level detection logic is not enabled.

    Detection logic is specified by the Mode parameter of INIC.GPIOPinMode.SetGet .

    Data Type | Bit # | Valid Values | Description
Unsigned Word | 0 | False | GPIO 00 Idle
 |  | True | GPIO 00 Level
 | ...
 | 15 | False | GPIO 15 Idle
 |  | True | GPIO 15 Level
    Resource Management Functions

    The functions in this section are used to handle resource management relevant tasks, these are tasks that are related to a resource object, e.g., a port, a socket, or a connection.

    To get more information on the resource management, refer to Chapter 6 .

    An overview of the INIC’s resource management functions is shown in Table 21-12 .

    Table 21-12: Resource Management Functions
Function Name | FktID | Possible to Notify | Page
ResourceDestroy() | 0x800 | No | ResourceDestroy (0x800)
ResourceInvalidList() | 0x801 | No | ResourceInvalidList (0x801)
ResourceMonitor() | 0x802 | Yes | ResourceMonitor (0x802)

    ResourceDestroy (0x800)

    This function destroys the resource associated with the given resource handle. A resource is either a port, a socket, or a connection. For more information on destroying resources, refer to Section 6.3 .

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | ResourceDestroy (0x800) | StartResult (0x2) | ResourceHandleList
 |  | Result (0xC) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    ResourceHandleList

    Unique resource handle list

    Data Type | Number of Elements | Parameters
Stream | 1...10 | ResourceHandle , { ResourceHandle }
    ResourceHandle

    Unique resource handle

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFE | 1 | None
    ErrorCode, ErrorInfo

    ErrorCode

    ErrorInfo

    ErrorClass

    ErrorID

    ErrorParameter

    Description of the Error

    0x20

    0x01

    0x10

    ResourceHandle

    The last INIC.ResourceDestroy() call has not yet been finished.

    0x03

    0x30

    -

    The message length is wrong (must be a multiple of two bytes).

    0x31

    -

    There are too many elements in parameter ResourceHandleList .

    0x32

    ResourceHandle

    The handle currently being processed was not found or cannot be destroyed, because it is persistent.

    0xF0

    -

    Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.

    0x20

    0x04

    0x40

    ResourceHandle

    Resource dependency violation.

    There are still resources remaining that have a dependency on the resource that was requested to be destroyed:

    - A connection still uses the socket, combiner, or splitter resource.

    - A combiner or splitter still uses the socket resource.

    - A socket still uses the port resource.

    - Streaming Port A and B are configured as linked. Streaming Port A was requested to be destroyed before Streaming Port B was destroyed.

    - A MediaLB packet multiplex socket still uses the socket resource.
    ResourceInvalidList (0x801)

    This function is used to get resources that were marked as invalid by the INIC.

    The returned list always contains the currently invalid handles, sorted in the order they must be destroyed. If there are more handles as that can fit into one message, the preceding handles must be destroyed to get the remaining handles and to reach the END identifier.

    For more information on how invalid resources are reported, refer to Chapter 6 .

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | ResourceInvalidList (0x801) | Get (0x1) | -
 |  | Status (0xC) | ResourceHandleList
 |  | Error (0xF) | ErrorCode, ErrorInfo
    ResourceHandleList

    Unique resource handle list

    Data Type | Number of Elements | Parameters
Stream | 1...22 | ResourceHandle, { ResourceHandle }
    ResourceHandle

    Unique resource handle. 0xFFFF is the END identifier. Receiving only the END identifier in the result indicates that there are no more invalid resources.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFE | 1 | None
 |  | 0xFFFF | -
    ResourceMonitor (0x802)

    This function notifies the state of the resource monitor in the INIC. The Status is only sent via notification; it notifies when the EHC must perform some actions and when it has returned to its default state. The Set operation is used to reset the resource monitor back to its default state.

    This function supports notification.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | ResourceMonitor (0x802) | Set (0x0) | Control
 |  | Status (0xC) | State
 |  | Error (0xF) | ErrorCode, ErrorInfo
    Control

    Used to reset the resource monitor to its default state and release the MUTE pin. This will always trigger a notification.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Reset | Requests the resource monitor to go back to the OK state and release the MUTE pin
    State

    Specifies the current state of the resource monitor, which can be either OK for the normal state when it requires no attention or ActionRequired when the EHC may have to destroy invalid resources and finally reset the resource monitor.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | OK | Default state. There are no actions required from the EHC.
 | 0x01 | ActionRequired | There are actions required from the EHC.
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    Packet Connection Functions

    The functions in this section are used to setup packet connections for different data types.

    To get more information on packet connections, refer to Chapter 18 .

    An overview of the packet connection functions is shown in Table 21-13 .

    Table 21-13: Packet Connection Functions
Function Name | FktID | Possible to Notify | Page
PacketAttachSockets() | 0x843 | No | PacketAttachSockets (0x843)
PacketDetachSockets() | 0x844 | No | PacketDetachSockets (0x844)
QoSPacketCreate() | 0x851 | No | QoSPacketCreate (0x851)

    PacketAttachSockets (0x843)

    This function attaches the given peripheral sockets to the packet data connection.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | PacketAttachSockets (0x843) | StartResult (0x2) | PacketHandle, SocketHandleIn, SocketHandleOut
 |  | Result (0xC) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    PacketHandle

    Packet resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x01 yy | 1 | None
    SocketHandleIn

    The resource handle of the Input socket that is attached to the packet connection. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | MediaLB socket: 0x0B yy | 1 | None
 |  | SPI socket: 0x11 yy
 |  | USB socket: 0x13 yy
    SocketHandleOut

    The resource handle of the Output socket that is attached to the packet connection. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | MediaLB socket: 0x0B yy | 1 | None
 |  | SPI socket: 0x11 yy
 |  | USB socket: 0x13 yy
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | Parameter SocketHandleIn is invalid. This error can be returned for several reasons: - the socket is not of direction Input , or - the socket is not of data type Packet , or - the socket is already used in a connection.
 |  | 0x31 | Parameter SocketHandleOut is invalid. This error can be returned for several reasons: - the socket is not of direction Output , or - the socket is not of data type Packet , or - the socket is already used in a connection.
0x20 | 0x03 | 0x32 | Resource type of SocketHandleIn and SocketHandleOut is different.
 |  | 0x38 | The packet data connection has already sockets attached.
 |  | 0x39 | Parameter SocketHandleIn or SocketHandleOut indicates a resource that does not exist.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    PacketDetachSockets (0x844)

    This function detaches the given peripheral sockets from the packet data connection.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | PacketDetachSockets (0x844) | StartResult (0x2) | PacketHandle
 |  | Result (0xC) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    PacketHandle

    Packet resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x01 yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | The last INIC.PacketDetachSockets() call has not yet been finished.
 | 0x03 | 0x30 | Sockets cannot be detached, since the connection was configured via the configuration string.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    QoSPacketCreate (0x851)

    This function creates a Quality of Service packet connection.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | QoSPacketCreate (0x851) | StartResult (0x2) | SocketHandleIn, SocketHandleOut
 |  | Result (0xC) | QoSHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SocketHandleIn

    The ID number of the opened socket that is the starting point of the link. Must be a socket of type Input . Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | MediaLB socket: 0x0B yy | 1 | None
 |  | MOST socket: 0x0E yy
    SocketHandleOut

    The ID number of the opened socket that is the ending point of the link. Must be a socket of type Output . Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | MediaLB socket: 0x0B yy | 1 | None
 |  | MOST socket: 0x0E yy
    QoSHandle

    Resource handle of the Quality of Service packet connection. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x05 yy | 1 | None
    ErrorCode, ErrorInfo

    ErrorCode

    ErrorInfo

    ErrorClass

    ErrorID

    Description of the Error

    0x20

    0x03

    0x30

    Parameter SocketHandleIn is invalid. This error can be returned for several reasons:
    - the socket is not of direction Input or

    - the socket is already used in a connection, or

    - the socket is of the wrong data type.

    0x31

    Parameter SocketHandleOut is invalid. This error can be returned for several reasons:
    - the direction of the socket is not Output or

    - the socket is of the wrong data type, or

    - the socket is already used in a connection or

    - both sockets are network sockets or peripheral sockets. In this case parameter SocketHandleOut will be in conflict with parameter SocketHandleIn .

    0x20

    0x03

    0x32

    The socket bandwidth is in conflict with the connection type requirements.

    0x39

    Parameter SocketHandleIn or SocketHandleOut indicates a resource that does not exist or the resource at the index does not match the specified resource type.

    0xF0

    Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.

    0x04

    0x40

    Parameter SocketHandleIn or SocketHandleOut indicates a resource that has been rendered invalid and may not be used in a new socket connection.

    0x42

    This error can be returned for several reasons:

    - no free slot in the connection table or

    - insufficient free routing resources, or

    - MediaLB Port and USB Port are used in parallel.
    Streaming Connection Functions

    The functions in this section are used to setup streaming connections for different data types.

    To get more information on streaming connections, refer to Chapter 19 .

    An overview of the streaming connection functions is shown in Table 21-14 .

    Table 21-14: Streaming Connection Functions
Function Name | FktID | Possible to Notify | Page
Sub-Group is A/V Packetized Connection
AVPacketizedCreate() | 0x861 | No | AVPacketizedCreate (0x861)
Sub-Group is Synchronous Connection
SyncCreate() | 0x871 | No | SyncCreate (0x871)
SyncMute() | 0x873 | No | SyncMute (0x873)
SyncDemute() | 0x874 | No | SyncDemute (0x874)
DiscFramePhaseCreate() | 0x881 | No | DiscFramePhaseCreate (0x881)
CombinerCreate() | 0x901 | No | CombinerCreate (0x901)
SplitterCreate() | 0x911 | No | SplitterCreate (0x911)

    AVPacketizedCreate (0x861)

    This function creates an A/V Packetized Isochronous Streaming data connection.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | AVPacketizedCreate (0x861) | StartResult (0x2) | SocketHandleIn, SocketHandleOut, IsocPacketSize
 |  | Result (0xC) | AVPHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SocketHandleIn

    The ID number of the opened socket that is the starting point of the link. Must be a socket of type Input . Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | MediaLB socket: 0x0B yy | 1 | None
 |  | USB socket: 0x13 yy
 |  | MOST socket: 0x0E yy
    SocketHandleOut

    The ID number of the opened socket that is the ending point of the link. Must be a socket of type Output . Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | MediaLB socket: 0x0B yy | 1 | None
 |  | USB socket: 0x13 yy
 |  | MOST socket: 0x0E yy
    IsocPacketSize

    Specifies the size of data packets that are to be transported over the isochronous channel

    Data Type | Exp. | Valid Values | Description | Step | Unit
DataType = AVPacketized
Unsigned Word | 0 | 188 | Standard MPEG2 Transport Stream packet size, no encryption | - | Byte
 |  | 196 | DTCP Supplement B, DTCP over MOST
 |  | 206 | DTCP Supplement E, DTCP over IP
    AVPHandle

    Resource handle of the A/V Packetized Isochronous Streaming connection. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x04 yy | 1 | None
    ErrorCode, ErrorInfo

    ErrorCode

    ErrorInfo

    ErrorClass

    ErrorID

    Description of the Error

    0x20

    0x03

    0x30

    Parameter SocketHandleIn is invalid. This error can be returned for several reasons:
    - the socket is not of direction Input , or

    - the socket is already used in a connection, or

    - the socket is of the wrong data type.

    0x31

    Parameter SocketHandleOut is invalid. This error can be returned for several reasons:
    - the direction of the socket is not Output , or

    - the socket is of the wrong data type, or

    - the socket is already used in a connection, or

    - both sockets are network sockets or peripheral sockets. In this case parameter SocketHandleOut will be in conflict with parameter SocketHandleIn .

    0x32

    The socket bandwidth is in conflict with the connection type requirements.

    0x39

    Parameter SocketHandleIn or SocketHandleOut indicates a resource that does not exist or the resource at the index does not match the specified resource type.

    0xF0

    Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.

    0x04

    0x40

    Parameter SocketHandleIn or SocketHandleOut indicates a resource that has been rendered invalid and may not be used in a new socket connection.

    0x42

    No free slot in the connection table or insufficient free routing resources.
    SyncCreate (0x871)

    This function creates a synchronous data connection between sockets, sockets and combiners as well as sockets and splitters.

    Note: Before a new socket connection is created, ensure that the socket is not already used in a socket connection or with a splitter or combiner.

    Note: It is not possible to connect a splitter with a combiner.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | SyncCreate (0x871) | StartResult (0x2) | SocketHandleIn, SocketHandleOut, DefaultMute, MuteMode, Offset
 |  | Result (0xC) | SyncHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SocketHandleIn

    The ID number of the opened socket or splitter object that is the starting point of the link. Must be a socket of type Input . Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | Streaming socket: 0x17 yy | 1 | None
 |  | MediaLB socket: 0x0B yy
 |  | USB socket: 0x13 yy
 |  | MOST socket: 0x0E yy
 |  | Splitter: 0x08 yy
    SocketHandleOut

    The ID number of the opened socket or combiner object that is the ending point of the link. Must be a socket of type Output . Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | Streaming socket: 0x17 yy | 1 | None
 |  | MediaLB socket: 0x0B yy
 |  | USB socket: 0x13 yy
 |  | MOST socket: 0x0E yy
 |  | Combiner: 0x07 yy
    DefaultMute

    Specifies if the connection is muted by default

    Data Type | Bit # | Valid Values | Description
Boolean | 0 | False (0) | Connection is not muted by default.
 |  | True (1) | Connection is muted by default.
    MuteMode

    Configures how the resource monitor shall handle events that may make the streamed data invalid.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | NoMuting | No mute monitoring
 | 0x01 | MuteSignal | The MUTE pin will be asserted if any registered connection may stream corrupted data.
 | 0x02 | AutoMute | The INIC will route zeros during conditions that may corrupt the streamed data.
    Offset

    Specifies the offset from where the socket data should be routed from a splitter; it also specifies the offset to where socket data should be routed to a combiner.
    When a standard socket connection is to be created, the offset must be sent as 0. This applies also for connections between a socket and a splitter based on a MOST socket.
    For all other combinations the valid range of the offset applies.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0...383 | 1 | None
    SyncHandle

    Resource handle of the synchronous connection. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x02 yy | 1 | None
    ErrorCode, ErrorInfo

    ErrorCode

    ErrorInfo

    ErrorClass

    ErrorID

    Description of the Error

    0x20

    0x03

    0x30

    Parameter SocketHandleIn is invalid. This error can be returned for several reasons:

    - the socket is not of direction Input , or

    - the socket is not of data type Sync , or

    - the socket is a loop socket, or

    - the socket is already used in a connection or with a splitter, or

    - the socket was requested to be connected with a combiner, but is not a MOST socket.

    0x20

    0x03

    0x31

    Parameter SocketHandleOut is invalid. This error can be returned for several reasons:

    - the socket is not of direction Output , or

    - the socket is not of data type Sync , or

    - the socket is already used in a connection or with a combiner, or

    - the socket was requested to be connected with another socket, but both are MOST sockets, or both are peripheral sockets, which are invalid combinations, or

    - the socket is tried to be connected with a splitter and both the socket and the splitter’s socket are created on peripheral ports (either the same or different ports), or

    - both the socket and the splitter’s socket are MOST sockets.

    If the resource is a combiner, then the following can happen in addition:

    - a combiner was tried to be connected to a splitter.

    0x32

    The bandwidth of the resources is in conflict with the connection type requirements. When connecting two sockets, the bandwidth must be equal. When connecting a splitter/combiner, the size of the socket being connected, considering the offset, must fit inside the splitter/combiner.

    0x33

    The Offset value of the connection variant is invalid, due to several reasons:

    - for a standard socket connection, the Offset must be 0.

    - for a connection between a socket and a splitter (based on a MOST socket) the Offset must be set to 0.

    0x34

    Parameter DefaultMute or MuteMode is invalid; the connection does not support muting or parameter MuteMode is MuteSignal , but there is no MuteSignal available, since the MUTE pin has not been enabled.

    0x39

    Parameter SocketHandleIn or SocketHandleOut indicates a resource that does not exist or the resource at the index does not match the specified resource type.

    0xF0

    Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.

    0x04

    0x40

    Parameter SocketHandleIn or SocketHandleOut indicates a resource that has been rendered invalid and may not be used in a new connection.

    0x42

    No free slot in the connection table or insufficient free routing resources.
    Note: This error code may be returned when creating a Sync connection between a USB socket and a MOST network socket or a Splitter based on a MOST network socket. Parameter FramesPerTransaction and the MOST socket bandwidth exceeded the allowed value of 512 bytes.
    SyncMute (0x873)

    This function manually mutes a synchronous data connection.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | SyncMute (0x873) | StartResult (0x2) | SyncHandle
 |  | Result (0xC) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SyncHandle

    Resource handle of the synchronous connection. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x02 yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x31 | The resource indicated by SyncHandle does not support muting.
 |  | 0x39 | Parameter SyncHandle is invalid. The handle indicates a resource that does not exist.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    SyncDemute (0x874)

    This function manually de-mutes a synchronous data connection.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | SyncDemute (0x874) | StartResult (0x2) | SyncHandle
 |  | Result (0xC) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SyncHandle

    Resource handle of the synchronous connection. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x02 yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x39 | Parameter SyncHandle is invalid. The handle indicates a resource that does not exist.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
    DiscFramePhaseCreate (0x881)

    This function creates a DiscreteFrame Isochronous Streaming phase connection.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | DiscFramePhase- Create (0x881) | StartResult (0x2) | SocketHandleIn, SocketHandleOut
 |  | Result (0xC) | DiscFramePhaseHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SocketHandleIn

    Resource handle of the DiscreteFrame Isochronous Streaming phase socket. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | MediaLB socket: 0x0B yy | 1 | None
 |  | MOST socket: 0x0E yy
    SocketHandleOut

    Resource handle of the DiscreteFrame Isochronous Streaming phase socket. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | MediaLB socket: 0x0B yy | 1 | None
 |  | MOST socket: 0x0E yy
    DiscFramePhaseHandle

    Resource handle of the DiscreteFrame Isochronous Streaming phase connection. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x09 yy | 1 | None
    ErrorCode, ErrorInfo

    ErrorCode

    ErrorInfo

    ErrorClass

    ErrorID

    Description of the Error

    0x20

    0x03

    0x30

    Parameter SocketHandleIn is invalid. This error can be returned for several reasons:
    - the socket is not of direction Input , or

    - the socket is already used in a connection, or

    - the socket is of the wrong data type.

    0x31

    Parameter SocketHandleOut is invalid. This error can be returned for several reasons:
    - the direction of the socket is not Output , or

    - the socket is of the wrong data type, or

    - the socket is already used in a connection, or

    - both sockets are network sockets or peripheral sockets. In this case parameter SocketHandleOut will be in conflict with parameter SocketHandleIn .

    0x20

    0x03

    0x39

    Parameter SocketHandleIn or SocketHandleOut indicates a resource that does not exist or the resource at the index does not match the specified resource type.

    0xF0

    Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.

    0x04

    0x40

    Parameter SocketHandleIn or SocketHandleOut indicates a resource that has been rendered invalid and may not be used in a new socket connection.

    0x42

    No free slot in the connection table or insufficient free routing resources.
    CombinerCreate (0x901)

    This function creates a combiner for a synchronous data connection.

    Note: Before a combiner is created, ensure that the socket is not already used in a socket connection or with a combiner.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | CombinerCreate (0x901) | StartResult (0x2) | SocketHandleOut, MOSTPortHandle, BytesPerFrame
 |  | Result (0xC) | CombinerHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SocketHandleOut

    Resource handle of the synchronous socket. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | Streaming socket: 0x17 yy | 1 | None
 |  | MediaLB socket: 0x0B yy
 |  | USB socket: 0x13 yy
    MOSTPortHandle

    Port resource handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0D yy | 1 | None
    BytesPerFrame

    Specifies the total number of data bytes to be transferred each MOST network frame

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 1...384 | 1 | None

    Note: While creating a combiner with a Streaming or MediaLB socket, this parameter equals the socket bandwidth.
    Additionally, for the MediaLB use case the contents of the padded bytes are not guaranteed.
    CombinerHandle

    Resource handle of the combiner. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x07 yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | Parameter SocketHandleOut is invalid. This error can be returned for several reasons: - the socket is not of direction Output , or - the socket is not of data type Sync , or - the socket is already used in a connection or with another combiner.
 |  | 0x32 | Parameter BytesPerFrame conflicts with the size of the socket indicated by parameter SocketHandleOut . Can be only returned if SocketHandleOut indicates a Streaming Port or MediaLB socket.
 |  | 0x39 | Parameter SocketHandleOut indicates a resource that does not exist or the resource at the index does not match the specified resource type.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 | 0x04 | 0x42 | No free slot in the combiner table or insufficient free routing resources. Note: This error code may be returned when creating a combiner based on a USB socket. Parameters FramesPerTransaction and BytesPerFrame exceeded the allowed value of 512 bytes. See Padding in Synchronous Bulk Transactions for more information.
    SplitterCreate (0x911)

    This function creates a splitter for a synchronous data connection.

    Note: Before a splitter is created, ensure that the socket is not already used in a socket connection or with a splitter.

    FBlockID | FktID | OPType | Parameters
INIC (0x00) | SplitterCreate (0x911) | StartResult (0x2) | SocketHandleIn, MOSTPortHandle, BytesPerFrame
 |  | Result (0xC) | SplitterHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SocketHandleIn

    Resource handle of the synchronous socket. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | Streaming socket: 0x17 yy | 1 | None
 |  | MediaLB socket: 0x0B yy
 |  | USB socket: 0x13 yy
 |  | MOST socket: 0x0E yy
    MOSTPortHandle

    Port resource handle. When the splitter is created with a MOST socket, the socket must be created on the same port indicated by this handle. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0D yy | 1 | None
    BytesPerFrame

    Specifies the total number of data bytes to be transferred each MOST network frame

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 1...384 | 1 | None

    Note: While creating a splitter with a Streaming, MediaLB, or MOST socket, this parameter equals the socket bandwidth.
    Additionally, for the MediaLB use case the contents of the padded bytes are not guaranteed.

    SplitterHandle

    Resource handle of the splitter. Valid value is a combination of resource identifier and index (yy).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x08 yy | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | Parameter SocketHandleIn is invalid. This error can be returned for several reasons: - the socket is not of direction Input , or - the socket is not of data type Sync , or - the socket is a loop socket, or - the socket is already used in a connection or with another splitter.
 |  | 0x32 | Parameter BytesPerFrame conflicts with the size of the socket indicated by parameter SocketHandleIn . Can be only returned if SocketHandleIn indicates a Streaming, MediaLB, or MOST socket.
 |  | 0x39 | Parameter SocketHandleIn indicates a resource that does not exist or the resource at the index does not match the specified resource type.
 |  | 0xF0 | Configuration interface is not in Remote Control Mode and a request to modify data was received from network side.
 | 0x04 | 0x40 | Parameter SocketHandleIn indicates a resource that has been rendered invalid and may not be used in a new splitter.
 |  | 0x42 | No free slot in the splitter table or insufficient free routing resources. Note: This error code may be returned when creating a splitter based on a USB socket. Parameters FramesPerTransaction and BytesPerFrame exceeded the allowed value of 512 bytes. See Padding in Synchronous Bulk Transactions for more information.

    FBlock DebugMessages

    NIC_DebugMessage (0x001)

    This function provides debug events which are generated by the INIC and sent to the MOST network. For more information refer to Diagnosis.

    FBlockID | FktID | OPType | Parameters
DebugMessages (0x09) | NIC_DebugMessage (0x001) | Status (0xC) | DebugLevel, TimeStamp, CaseIdentifier, CaseSpecificValues
    DebugLevel

    Determines the debug level of the debug event

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | DebugLevelError | Debug level is Error
 | 0x02 | DebugLevelWarning | Debug level is Warning
    TimeStamp

    TimeStamp always returns 0xFFFFFFFF.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Long | 0 | 0xFFFFFFFF | 1 | ms
    CaseIdentifier

    16-bit value that identifies the debug event that occurred

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0002, 0x0005... 0x0007 | - | None
    CaseSpecificValues
    Data Type | Number of Elements | CaseIdentifier | Parameters
Stream | 1...2 | 0x0002 | Reset
 |  | 0x0005 | SyncLostICM, SyncLostRCM
 |  | 0x0006 | AutoForcedNATime
 |  | 0x0007 | SyncLostMCM
    Reset

    Debug message is sent if the NetInterface is in Normal Operation state after reset, in case the reset was caused by the appropriate reason.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x02 | HWWatchdog | Reset due to hardware watchdog that has snapped - DebugLevel is Error
 | 0x08 | StackOverflow | Reset due to stack overflow - DebugLevel is Error
    SyncLostICM

    ICM channel synchronization loss due to one of the following conditions:

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x02 | Internal | Channel was unsynchronized due to a synchronization loss on the RCM channel. - DebugLevel is Error
 | 0x03 | Command | Channel was unsynchronized due to a PMP SYNC or UNSYNC command. - DebugLevel is Error
 | 0x04 | AckTimeOut | Acknowledge time of previously transmitted message has expired. - DebugLevel is Error
 | 0x05 | WDTimeOut | PMP watchdog time has expired (communication got stuck). - DebugLevel is Error
 | 0x06 | TxTimeOut | Transmit time has expired and transmission was canceled. - DebugLevel is Error
    SyncLostRCM

    RCM channel synchronization loss due to one of the following conditions:

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x02 | Internal | Channel was unsynchronized due to a synchronization loss on the ICM channel. - DebugLevel is Error
 | 0x03 | Command | Channel was unsynchronized due to a PMP SYNC or UNSYNC command. - DebugLevel is Error
 | 0x04 | AckTimeOut | Acknowledge time of previously transmitted message has expired. - DebugLevel is Error
 | 0x05 | WDTimeOut | PMP watchdog time has expired (communication got stuck). - DebugLevel is Error
 | 0x06 | TxTimeOut | Transmit time has expired and transmission was canceled. - DebugLevel is Error
    AutoForcedNATime

    Refer to AutoForcedNotAvailableTime . DebugLevel is Warning.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 10...65535 | 1 | ms
    SyncLostMCM

    MCM channel synchronization loss due to one of the following conditions:

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x03 | Command | Channel was unsynchronized due to a PMP SYNC or UNSYNC command. - DebugLevel is Error
 | 0x04 | AckTimeOut | Acknowledge time of previously transmitted message has expired. - DebugLevel is Error
 | 0x05 | WDTimeOut | PMP watchdog time has expired (communication got stuck). - DebugLevel is Error
 | 0x06 | TxTimeOut | Transmit time has expired and transmission was canceled. - DebugLevel is Error

    FBlock ExtendedNetworkControl

    The functions in this section are used to control a device via the EHC or the MOST network.

    An overview of the ExtendedNetworkControl functions is shown in Table 21-15 .

    Table 21-15: ExtendedNetworkControl Functions
Function Name | FktID | Possible to Notify | Page
Hello() | 0x200 | No | Hello (0x200)
Welcome() | 0x201 | No | Welcome (0x201)
Signature() | 0x202 | No | Signature (0x202)
Init() | 0x203 | No | Init (0x203)
EnablePort() | 0x210 | No | EnablePort (0x210)
CableLinkDiagnosis() | 0x211 | No | CableLinkDiagnosis (0x211)
PhysicalLayerTest() | 0x220 | No | PhysicalLayerTest (0x220)
PhysicalLayerTestResult() | 0x221 | No | PhysicalLayerTestResult (0x221)
MemorySessionOpen() | 0x300 | No | MemorySessionOpen (0x300)
MemorySessionClose() | 0x301 | No | MemorySessionClose (0x301)
MemoryRead() | 0x302 | No | MemoryRead (0x302)
MemoryWrite() | 0x303 | No | MemoryWrite (0x303)
    Hello (0x200)

    This function is used to get the unique Signature of an INIC device.

    The requesting device sends ExtendedNetworkControl.Hello.Get as a broadcast message to the MOST network. Only those devices that have not successfully sent ExtendedNetworkControl.Welcome.Result will answer with the ExtendedNetworkControl.Hello.Status message. The ExtendedNetworkControl.Hello.Status message is sent by using source address 0x0FFE.

    FBlockID | FktID | OPType | Parameters
ExtendedNetworkControl (0x0A) | Hello (0x200) | Get (0x1) | VersionLimit
 |  | Status (0xC) | Version, Signature
 |  | Error (0xF) | ErrorCode, ErrorInfo
    VersionLimit

    Defines the maximum version of Signature the requesting device can handle

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 1...255 | 1 | None
    Version

    Defines the version of the Signature

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | v1 | Version 1 of the Signature
    Signature

    Uniques signature of a device

    Data Type | Number of Elements | Parameters
Stream | 16 | NodeAddress, GroupAddress, MACAddress_47to32, MACAddress_31to16, MACAddress_15to0, NodePositionAddress, DiagID, NumberOfPorts, ChipID, FWVersion_Major, FWVersion_Minor, FWVersion_Release, FWVersion_Build, CSVersion_Major, CSVersion_Minor, CSVersion_Release
    NodeAddress

    Node Address as entered in the identification string.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0100...0x013F | 1 | None
 |  | 0x0010...0x00FF, 0x0140...0x02FF, 0x0500...0x0EFF
 |  | 0xFFFF | -
    GroupAddress

    Group Address as entered in the identification string.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0300...0x03FF | 1 | None
    MACAddress_47to32

    Packet EUI-48 Bits 47:32 of the MAC address as entered in the identification string.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    MACAddress_31to16

    Packet EUI-48 Bits 31:16 of the MAC address as entered in the identification string.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    MACAddress_15to0

    Packet EUI-48 Bits 15:0 of the MAC address as entered in the identification string.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    NodePositionAddress

    Current valid NodePositionAddress if network is available. 0x0400 is reported if the MOST network is not available.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0400...0x043F | 1 | None
    DiagID

    DiagID as entered in the configuration string.

    This parameter can be customized via the Configuration String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    NumberOfPorts

    Number of MOST ports available by chip

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x01 | 1 | None
    ChipID
    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x18 | 1 | None
    FWVersion_Major

    Major version number of the firmware

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    FWVersion_Minor

    Minor version number of the firmware

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    FWVersion_Release

    Release version number of the firmware

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    FWVersion_Build

    Build version number of the firmware

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Long | 0 | 0x00000000... 0xFFFFFFFF | 1 | None
    CSVersion_Major

    Major version number of the configuration string.

    This parameter can be customized via the Configuration String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    CSVersion_Minor

    Minor version number of the configuration string.

    This parameter can be customized via the Configuration String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    CSVersion_Release

    Release version number of the configuration string.

    This parameter can be customized via the Configuration String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | Device is already welcomed.
    Welcome (0x201)

    This function is used to welcome a device in the MOST network.

    The function uses the Signature which was returned by the ExtendedNetworkControl.Hello.Status message. The receiving device compares the signature of the ExtendedNetworkControl.Welcome.StartResult message with its own signature sent by the ExtendedNetworkControl.Hello.Status() message. If the signature matches and the AdminNodeAddress is in the range of 0x0F00...0x0FEF, the NodeAddress is set to the AdminNodeAddress .

    The message is always send to the NodePositionAddress , see Section 4.11.2 .

    FBlockID | FktID | OPType | Parameters
ExtendedNetworkControl (0x0A) | Welcome (0x201) | StartResult (0x2) | AdminNodeAddress, Version, Signature
 |  | Result (0xC) | Result, Version, Signature
 |  | Error (0xF) | ErrorCode, ErrorInfo
    AdminNodeAddress

    The node address used during system diagnosis and device diagnosis. If 0xFFFF is applied, the Node Address configured in the identification string is used (only valid if device is not in system diagnosis mode and System Mode is UNICENS ).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0F00...0x0FEF | 1 | None
 |  | 0xFFFF
    Version

    Defines the version of the Signature

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | v1 | Version 1 of the Signature
    Signature

    Contains the Signature values as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Number of Elements | Parameters
Stream | 16 | NodeAddress, GroupAddress, MACAddress_47to32, MACAddress_31to16, MACAddress_15to0, NodePositionAddress, DiagID, NumberOfPorts, ChipID, FWVersion_Major, FWVersion_Minor, FWVersion_Release, FWVersion_Build, CSVersion_Major, CSVersion_Minor, CSVersion_Release
    NodeAddress

    Contains the NodeAddress as returned by parameter ExtendedNetworkControl.Hel-lo.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0100...0x013F | 1 | None
 |  | 0x0010...0x00FF, 0x0140...0x02FF, 0x0500...0x0EFF
 |  | 0xFFFF | -
    GroupAddress

    Contains the GroupAddress as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0300...0x03FF | 1 | None
    MACAddress_47to32

    Contains bits 47:32 of the MAC address as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    MACAddress_31to16

    Contains bits 31:16 of the MAC address as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    MACAddress_15to0

    Contains bits 15:0 of the MAC address as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    NodePositionAddress

    Contains the NodePositionAddress as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0400...0x043F | 1 | None
    DiagID

    Contains the DiagID as returned by parameter ExtendedNetworkControl.Hel-lo.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    NumberOfPorts

    Contains the NumberOfPorts as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x01 | 1 | None
    ChipID

    Contains the ChipID as returned by parameter ExtendedNetworkControl.Hel-lo.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x18 | 1 | None
    FWVersion_Major

    Contains the major firmware version as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    FWVersion_Minor

    Contains the minor firmware version as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    FWVersion_Release

    Contains the release firmware version as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    FWVersion_Build

    Build version number of the firmware

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Long | 0 | 0x00000000... 0xFFFFFFFF | 1 | None
    CSVersion_Major

    Contains the major configuration string version as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    CSVersion_Minor

    Contains the minor configuration string version as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    CSVersion_Release

    Contains the release configuration string version as returned by parameter ExtendedNetworkControl.Hello.Status.Signature

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    Result

    Result of the Signature compare

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Success | Compare of the signature was successful.
 | 0x01 | NoSuccess | Compare of the signature was not successful.
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x02 | 0x20 | - RBD is active, or - physical layer test is running, or - ForcedNA was set.
 | 0x03 | 0x31 | Device has not yet received an ExtendedNetworkControl.Hello.Get() message.
 |  | 0x32 | Device has already successfully received an ExtendedNetworkControl.Welcome.StartResult() message.
 |  | 0x33 | AdminNodeAddress is 0xFFFF. This value is not supported during system diagnosis state.
 |  | 0x34 | AdminNodeAddress is 0xFFFF. This value is not supported in System Mode MOSTNetServices .
 |  | 0x35 | Value of Node Address in the identification string is not valid. The value is either 0xFFFF or in the dynamic range (see Section 4.11.1 ) while AdminNodeAddress is 0xFFFF.
 | 0x04 | 0x40 | INIC is already in device diagnosis mode.
    Signature (0x202)

    This function is used to get the unique Signature of an INIC device.

    Every network device responds to this message, regardless of whether it was already welcomed or not.

    FBlockID | FktID | OPType | Parameters
ExtendedNetworkControl (0x0A) | Signature (0x202) | Get (0x1) | VersionLimit
 |  | Status (0xC) | Version, Signature
 |  | Error (0xF) | ErrorCode, ErrorInfo
    VersionLimit

    Defines the maximum version of Signature the requesting device can handle

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 1...255 | 1 | None
    Version

    Defines the version of the Signature

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | v1 | Version 1 of the Signature
    Signature

    Contains the Signature values as returned by parameter ExtendedNetworkControl.Signature.Status.Signature

    Data Type | Number of Elements | Parameters
Stream | 16 | NodeAddress , GroupAddress , MACAddress_47to32 , MACAddress_31to16 , MACAddress_15to0 , NodePositionAddress , DiagID , NumberOfPorts , ChipID , FWVersion_Major , FWVersion_Minor , FWVersion_Release , FWVersion_Build , CSVersion_Major , CSVersion_Minor , CSVersion_Release
    NodeAddress

    Node Address as entered in the identification string.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0100...0x013F | 1 | None
 |  | 0x0010...0x00FF, 0x0140...0x02FF, 0x0500...0x0EFF
 |  | 0xFFFF | -
    GroupAddress

    Group Address as entered in the identification string.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0300...0x03FF | 1 | None
    MACAddress_47to32

    Packet EUI-48 Bits 47:32 of the MAC address as entered in the identification string.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    MACAddress_31to16

    Packet EUI-48 Bits 31:16 of the MAC address as entered in the identification string.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    MACAddress_15to0

    Packet EUI-48 Bits 15:0 of the MAC address as entered in the identification string.

    This parameter can be customized via the Identification String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    NodePositionAddress

    Contains the NodePositionAddress as returned by parameter ExtendedNetworkControl.Hello.Status() message. 0x04FF is reported in case no ExtendedNetworkControl.Hello.Get message was seen.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0400...0x043F | 1 | None
 |  | 0x04FF | -
    DiagID

    Diag ID as entered in the configuration string.

    This parameter can be customized via the Configuration String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    NumberOfPorts

    Number of MOST ports available by chip

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x01 | 1 | None
    ChipID
    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x18 | 1 | None
    FWVersion_Major

    Major version number of the firmware

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    FWVersion_Minor

    Minor version number of the firmware

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    FWVersion_Release

    Release version number of the firmware

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    FWVersion_Build

    Build version number of the firmware

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Long | 0 | 0x00000000... 0xFFFFFFFF | 1 | None
    CSVersion_Major

    Major version number of the configuration string.

    This parameter can be customized via the Configuration String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    CSVersion_Minor

    Minor version number of the configuration string.

    This parameter can be customized via the Configuration String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    CSVersion_Release

    Release version number of the configuration string.

    This parameter can be customized via the Configuration String.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    Init (0x203)

    This function is used to set back the FBlock ExtendedNetworkControl of a device into its initial state, which means:

    • • Sets the device to not welcomed (no ExtendedNetworkControl.Hello.Get() message was seen)
    • • Sets the NodeAddress to 0x0FFE if
    • - UNICENS is enabled or
    • - system diagnosis is running (see Section 4.7 )
    • • Ends the device diagnosis mode

    FBlockID | FktID | OPType | Parameters
ExtendedNetworkControl (0x0A) | Init (0x203) | Start (0x0) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    EnablePort (0x210)

    This function is used to enable a particular MOST Port.

    FBlockID | FktID | OPType | Parameters
ExtendedNetworkControl (0x0A) | EnablePort (0x210) | StartResult (0x2) | PortNumber, Enabled
 |  | Result (0xC) | -
 |  | Error (0xF) | ErrorCode, ErrorInfo
    PortNumber

    Number of MOST Port

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00 | 1 | None
    Enabled

    Indicates if the MOST Port is enabled or disabled

    Data Type | Bit # | Valid Values | Description
Boolean | 0 | False (0) | MOST Port is disabled.
 |  | True (1) | MOST Port is enabled.
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | Device is not in system diagnosis state and therefore no MOST Port can be enabled or disabled.
 |  | 0x32 | The slave’s clock reference MOST Port cannot be enabled or disabled.
 |  | 0x33 | The MOST Port is not used.
 | 0x04 | 0x40 | The MOST Port is not configured in full duplex coax mode.
    CableLinkDiagnosis (0x211)

    This function is used to start the cable link diagnosis. The cable link diagnosis is used to verify a full duplex MOST Port cable link.

    FBlockID | FktID | OPType | Parameters
ExtendedNetworkControl (0x0A) | CableLinkDiagnosis (0x211) | StartResult (0x2) | PortNumber
 |  | Result (0xC) | PortNumber, Result
 |  | Error (0xF) | ErrorCode, ErrorInfo
    PortNumber

    Number of MOST Port the diagnosis is running on

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00 | 1 | None
    Result

    Result of the cable link diagnosis.

    Cable link diagnosis was run without any test interruption.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | NoConnection | The cable is unconnected or has a short between inner and outer conductor.
 | 0x01 | TerminatedConnection | The cable end is correctly terminated with an appropriate impedance, but there is no responding signal from the receiving node. This points towards a properly connected cable with a receiving device that is not powered.
 | 0x02 | Passive- Connection | The receiving device is available, but the NetInterface is in passive bypass, e.g., the receiving device is in reset.
 | 0x03 | Active- Connection | The receiving device is available and the NetInterface is fully operational.

    Cable link diagnosis was run with test interruption.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x81 | DebugInt0 | Test was aborted since the Debug Header was used at the same time.
 | 0x91 | DebugInt1
 | 0x80 | Failure0 | Test was aborted due a common processing failure.
 | 0x82 | Failure1
 | 0x83 | Failure2
 | 0x87 | Failure3
 | 0x90 | Failure4
 | 0x92 | Failure5
 | 0x95 | Failure6
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | - The last INIC.CableLinkDiagnosis() call has not yet been finished.
 | 0x02 | 0x20 | - RBD is active or - ForcedNA was set.
 | 0x03 | 0x30 | Device is not in system diagnosis state and therefore cable link diagnosis cannot be triggered.
 |  | 0x31 | The respective MOST Port is not enabled.
 |  | 0x32 | Cable link diagnosis cannot be triggered on the slave’s clock reference MOST Port.
    PhysicalLayerTest (0x220)

    This function starts the physical layer test on a MOST Port.

    Once the physical layer test is started it will force the MOST network to enter NotAvailable state, indicating sub state AvailabilityInfo Diagnosis . After the test has been finished, it changes back to Regular and the chip is ready to start up again.
    If the network is Available when starting the test, the AvailabilityTransitionCause will be Normal .

    FBlockID | FktID | OPType | Parameters
ExtendedNetworkControl (0x0A) | PhysicalLayerTest (0x220) | Start (0x0) | PortNumber, Type, LeadIn, Duration, LeadOut
 |  | Error (0xF) | ErrorCode, ErrorInfo
    PortNumber

    Number of MOST Port the test is performed on

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00 | 1 | None
    Type

    Indicates the type of physical layer test. The device is switched back to its original mode after the physical layer test is finished and the MOST network has been started up again.

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | RetimedBypassMaster | Forces the device to enter RetimedBypassMaster mode independent of original mode.
 | 0x02 | RetimedBypassSlave | Forces the device to enter RetimedBypassSlave mode independent of original mode.
    LeadIn

    Lead in time of physical layer test

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 10...65535 | 1 | ms
    Duration

    Duration time of physical layer test

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Long | 0 | 50...4294967295 | 1 | ms
    LeadOut

    Lead out time of physical layer test

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 10...65535 | 1 | ms
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | The last PhysicalLayerTest() call has not yet been finished.
 | 0x02 | 0x20 | - RBD is active or - ForcedNA was set.
    PhysicalLayerTestResult (0x221)

    This function returns the result for the tested MOST Port, after the physical layer test has been finished.

    As soon as the physical layer test is started by executing function ExtendedNetworkControl.PhysicalLayerTest() , all parameters of ExtendedNetworkControl.PhysicalLayerTestResult() become invalid. This means:

    • • the PortNumber returns 0xFF,
    • • the LockStatus returns False, and
    • • the ErrorCounterValue returns 0.

    If the test is erroneous, all values will stay invalid. If the test can be finished successfully, the PortNumber changes to a valid number given during the test and LockStatus and ErrorCounterValue also return with evaluated values.

    After INIC reset, all values are invalidated. They are also invalidated after they have been read.

    FBlockID | FktID | OPType | Parameters
ExtendedNetworkControl (0x0A) | PhysicalLayer-TestResult (0x221) | Get (0x1) | -
 |  | Status (0xC) | PortNumber, LockStatus, ErrorCounterValue
 |  | Error (0xF) | ErrorCode, ErrorInfo
    PortNumber

    Number of MOST Port the test was performed on. If the handle is invalid, 0xFF is returned.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00 | 1 | None
 |  | 0xFF
    LockStatus

    Indicates if an unlock has occurred during the physical layer test

    Data Type | Bit # | Valid Values | Description
Boolean | 0 | False (0) | No unlock occurred
 |  | True (1) | Unlock occurred
    ErrorCounterValue

    Number of detected coding errors occurred during physical layer test

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    MemorySessionOpen (0x300)

    This function is used to open a memory session. A memory session is used to control access to the memory resources. Before a memory could be read or written, a session of the appropriate type has to be opened.

    Only a single memory session is supported. Once opened, the session must be first closed before a new session of a different type could be used.

    Some session types (0x01, 0x02 and 0x04) require a hardware reset after they were closed. If one of these sessions is opened to write the configuration string and/or the identification string, an INIC reset request is placed. Execution of the INIC reset happens when the INIC transitions to NetInterface Off state or after ExtendedNetworkControl.Init() was called, see Section 21.4.4 .

    This function also performs some preprocessing, depending on the SessionType . This includes the clearing of the configuration and identification strings in advance to programming or erasing the error memory.

    FBlockID | FktID | OPType | Parameters
ExtendedNetworkControl (0x0A) | MemorySessionOpen (0x300) | StartResult (0x2) | SessionType
 |  | Result (0xC) | SessionHandle
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SessionType

    Defines the set of MemIDs and the memory access type(s) (read and/or write)

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x01 | ProgramCS | Writes to MemID 0x00, configuration string
 | 0x02 | ProgramIS | Writes to MemID 0x01, identification string
 | 0x04 | ProgramCS_IS | Writes to MemID 0x00 and MemID 0x01
 | 0x08 | EraseEM | Erases the error memory
 | 0x10 | ReadIM | Reads the information memory MemID 0x00, MemID 0x01, MemID 0x02
 | 0x20 | Internal | Internal
    SessionHandle

    Unique number used to authorize memory access. Required as a parameter in functions ExtendedNetworkControl.MemoryRead() and ExtendedNetworkControl.MemoryWrite()

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x01 | 0x10 | Before a new session can be opened, a hardware reset must be applied.
 |  | 0x11 | The memory session using the SessionHandle is already active.
 | 0x02 | 0x20 | A configuration string erase error has occurred.
 |  | 0x21 | An error memory erase error has occurred.
    MemorySessionClose (0x301)

    This function is used to close an active memory session that was previously opened by function ExtendedNetworkControl.MemorySessionOpen() . In addition, the function performs some post-processing on given session types. This includes validation of the newly programmed configuration and identification strings as well as the deactivation of the current configuration and identification strings. In these cases, the new configuration becomes active after a hardware reset.

    FBlockID | FktID | OPType | Parameters
ExtendedNetworkControl (0x0A) | MemorySessionClose (0x301) | StartResult (0x2) | SessionHandle
 |  | Result (0xC) | SessionResult
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SessionHandle

    Unique number assigned to the active memory session by function ExtendedNetworkControl.MemorySessionOpen()

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    SessionResult

    Reports the memory session state on closing

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | Success | Memory session closed successfully
 | 0x01 | CRCErrorNewCS | CRC error found in the new configuration string
 | 0x02 | CRCErrorNewIS | CRC error found in the new identification string
 | 0x03 | CRCErrorOldCS | CRC error found in the active configuration string
 | 0x04 | CRCErrorOldIS | CRC error found in the active identification string
    MemoryRead (0x302)

    This function provides read access to the memories described by parameter MemID . In addition, the function can be used to retrieve the active Configuration String and Identification String.

    Reading the memory can only be done within an active memory session. Parameter SessionHandle authorizes the access to the memory resource defined by parameter MemID . The SessionHandle is provided by function ExtendedNetworkControl.MemorySessionOpen() , which must be called in advance to memory access.

    FBlockID | FktID | OPType | Parameters
ExtendedNetworkControl (0x0A) | MemoryRead (0x302) | StartResult (0x2) | SessionHandle, MemID, Address, UnitLen
 |  | Result (0xC) | SessionHandle, MemID, Address, UnitLen, UnitData
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SessionHandle

    Identifies the active memory session already opened to authorize the reading operation

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    MemID

    Represents the memory resource to be read

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | ConfigurationString | Reads the configuration string
 | 0x01 | IdentificationString | Reads the identification string
 | 0x02 | ErrorMemory | Reads the error memory
 | 0x03...0x09 | Internal | Internal
    Address

    Defines the memory location at which the reading operation starts.

    Note: Each memory has its own address range limits, which must not be exceeded for the particular MemID .

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Long | 0 | 0x00000000... 0xFFFFFFFF | 1 | None
    UnitLen

    Sets the number of memory units to be read. Memory units can be unsigned bytes, unsigned words or unsigned masked data depending on the memory type.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x01...0xFF | 1 | None
    UnitData

    Contains the data read from the memory resource and formatted as memory units

    Data Type | Number of Elements | Condition | Parameters
Stream | 1...18 | MemID = 0x00 | { ByteData }
 |  | MemID = 0x01 | { ByteData }
 |  | MemID = 0x02 | { ByteData }
 |  | MemID = 0x03 | { WordData }
 |  | MemID = 0x04 | { ByteData }
 |  | MemID = 0x05 | { ByteData }
 |  | MemID = 0x06 | { MaskedWordData }
 |  | MemID = 0x07 | { MaskedWordData }
 |  | MemID = 0x08 | { MaskedWordData }
 |  | MemID = 0x09 | { ByteData }
    ByteData

    Defines a stream of unsigned bytes

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    WordData

    Defines a stream of unsigned words

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 2 | None
    MaskedWordData

    Defines a stream formatted as pairs of unsigned words and their corresponding word bit masks

    Data Type | Number of Elements | Parameters
Stream | 2 | WordData, WordMask
    WordMask

    Always 0xFFFF on reading

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0xFFFF | 2 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | The SessionHandle does not match the current memory session.
 |  | 0x31 | The memory session does not support the requested MemID .
    MemoryWrite (0x303)

    This function provides write access to the memories described by parameter MemID . In addition, the function can be used to program a new Configuration String and Identification String.

    Writing the memory can only be done within an active memory session. Parameter SessionHandle authorizes the access to the memory resource defined by parameter MemID . The SessionHandle is provided by function ExtendedNetworkControl.MemorySessionOpen() , which must be called in advance to memory access.

    FBlockID | FktID | OPType | Parameters
ExtendedNetworkControl (0x0A) | MemoryWrite (0x303) | StartResult (0x2) | SessionHandle, MemID, Address, UnitLen, UnitData
 |  | Result (0xC) | SessionHandle, MemID
 |  | Error (0xF) | ErrorCode, ErrorInfo
    SessionHandle

    Identifies the active memory session already opened to authorize the writing operation

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 1 | None
    MemID

    Represents the memory resource to be written

    Data Type | Valid Values | Mnemonic | Description
Enum | 0x00 | ConfigurationString | Writes the configuration string
 | 0x01 | IdentificationString | Writes the identification string
 | 0x03...0x09 | Internal | Internal
    Address

    Defines the memory location at which the writing operation starts.

    Note: Each memory has its own address range limits, which must not be exceeded for the particular MemID .

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Long | 0 | 0x00000000... 0xFFFFFFFE | 2 | None
    UnitLen

    Sets the number of memory units to be written. Memory units can be unsigned bytes, unsigned words or unsigned masked data depending on the memory type.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x01...0xFE | 2 | None
    UnitData

    Contains the actual data written to the memory resource and formatted as memory units

    Data Type | Number of Elements | Condition | Parameters
Stream | 1...18 | MemID = 0x00 | { ByteData }
 |  | MemID = 0x01 | { ByteData }
 |  | MemID = 0x03 | { WordData }
 |  | MemID = 0x04 | { ByteData }
 |  | MemID = 0x05 | { ByteData }
 |  | MemID = 0x06 | { MaskedWordData }
 |  | MemID = 0x07 | { MaskedWordData }
 |  | MemID = 0x08 | { MaskedWordData }
 |  | MemID = 0x09 | { ByteData }
    ByteData

    Defines a stream of unsigned bytes

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0xFF | 1 | None
    WordData

    Defines a stream of unsigned words

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 2 | None
    MaskedWordData

    Defines a stream formatted as pairs of unsigned words and their corresponding word bit masks.

    Data Type | Number of Elements | Parameters
Stream | 2 | WordData, WordMask
    WordMask

    Bit mask where '1' corresponds to the bits in the data which can be written.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0000...0xFFFF | 2 | None
    ErrorCode, ErrorInfo
    ErrorCode | ErrorInfo
 | ErrorClass | ErrorID | Description of the Error
0x20 | 0x03 | 0x30 | The SessionHandle does not match the current memory session.
 |  | 0x31 | The memory session does not support the requested MemID .
 |  | 0x32 | The Address is odd when writing the memory.
 |  | 0x33 | The UnitLen is odd when writing the memory.

    Error Reporting

    The INIC’s error reporting is based on standard error codes as provided by the MOST Specification [1] . This includes error codes (0x01-0x06) that indicate format failures. A format failure occurs whenever a function or parameter-related setting was done that is not supported by the INIC API. In addition to these error codes, error code 0x0C is reported if a segmentation error occurs. The standard error codes are listed in Table 21-16 , including error code 0x20, which is function-specific. Function-specific error codes are related to errors that can only happen during runtime.

    Error code information consists of a code ( ErrorCode ) and a description of it ( ErrorInfo ), see Table 21-16 . A function-specific error code always has the ErrorCode number 0x20; its ErrorInfo contains the ErrorClass and the ErrorID. The ErrorClass describes the classification of the error, and the ErrorID and its description the details. A description of available error classes is given in Table 21-17 ; the ErrorID and its description can be found beneath the appropriate INIC API function in this chapter.

    Note: An error is reported only to the device that sent the instruction.

    Table 21-16: Standard ErrorCodes and ErrorInfo (Continued)
ErrorCode Data[0] On ErrorData[2] | Description | ErrorInfo Data[1]...Data[n] OnErrorData[3]... Data[n] | Description
0x01 | FBlockID not available | - | No info
0x02 | InstID not available | - | No info
0x03 | FktID not available | - | No info
0x04 | OPType not available | Return OPType | Invalid OPType
0x05 | Invalid length |  | No info
0x06 | Parameter wrong/ out of range: One or more of the parameters were wrong, i.e., not within the boundaries specified for the function. | Return parameter | Number of parameter (byte containing 1,2, …). Value of first incorrect parameter only (optional). Interpretation will be stopped then.
0x0C | Segmentation error: After this error code, the following ErrorInfo 0x01 up to 0x07 can be sent. | 0x01 | First segment missing
 |  | 0x02 | Receive buffer overflow. Message is too long.
 |  | 0x03 | Unexpected segment number
 |  | 0x04 | Receive buffer overflow. No free Rx slot available.
 |  | 0x05 | Timeout while waiting for the next segment
 |  | 0x06 | Device is not capable to handle segmented messages.
 |  | 0x07 | Segmented message has not been finished before the arrival of another message set by the same node.
0x20 | Function-specific error | ErrorClass and ErrorID | Refer to Table 21-17 . Additional error information can be found beneath the appropriate INIC API function.

    Table 21-17: List of ErrorClasses

    ErrorClass Data[1] OnErrorData[3]

    Description

    0x01

    Busy
    Process in INIC is currently busy. Retries are possible in a reasonable time.

    Example: Returned when a detach request is pending, but the application triggers an attach.

    0x02

    Processing error

    Process could not be finished. Retries are possible.

    Example: The MOST network cannot reach Available state.

    0x03

    Configuration error

    Wrong configuration (values are temporarily out of range).
    Retries are not useful.

    Example: Application has already opened a port that was requested to be opened again with a different, but valid setting.

    0x04

    System error

    Current state of INIC or network prevents a successful execution of the process and retries are not possible.
    Retries are only possible when the state changes, but it is not clear when or if this happens (dynamic error).

    Example: Occurs if it is requested to create streaming sockets while there is not enough streaming bandwidth available on the MOST network.

    Configuration

    Configuration

    The INIC provides two flash memory sections for configuration, namely the Configuration String and the Identification String. Each flash memory section consists of a list of properties, with a factory default value associated to each property. If the factory default values do not match the settings required for the application, the values can be adjusted and the string can be re-programmed.

    Configuration string

    This memory section includes the factory default values to be used as information on the INIC’s initial hardware configuration (e.g., the type of default port that is automatically opened for communication between the INIC and the EHC). Re-programming the configuration string is done during development or production.
    For information on how to program the string, refer to Device Update Process .

    Identification string

    This memory section includes the factory default values to be used for unambiguous device identification. Re-programming the identification string is done during device installation.
    For information on how to program the string, refer to Device Update Process .

    Configuration String

    This section lists the properties of the configuration string. The properties are grouped (e.g., Device Management, Power Management). To each property a general description is given that explains the intended use of the property and its valid values. The default value associated to every property is given in Table 22-1 .

    Properties
    Device Management
    Default Instance ID

    Sets the default instance identifier of FBlock INIC

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x01...0xFE | 1 | None
    Diag ID

    Defines the diagnostic identifier of the device.
    For available parameters refer to DiagID .

    MUTE/RSOUT Configuration

    Determines whether MUTE / RSOUT / GP8 pin is used to signal reset or mute. If the pin is configured to signal reset, the pin is driven low for 10 ms as soon as INIC enters Protected Mode.

    Data Type | Mnemonic | Description
Enum | Disabled | No action. MUTE/ RSOUT /GP8 pin can be used as GPIO pin, see Chapter 14 .
 | RSOUT | MUTE/ RSOUT /GP8 pin signals reset.
 | MUTE | MUTE/ RSOUT /GP8 pin is used to signal mute.
    Configuration Interface

    Selects the port for the configuration interface. The configuration interface defines that the port is used for the ICM and RCM PMP channels.

    Note: Configuration Interface and Application Interface property settings do not allow the combination of MediaLB and USB .

    Data Type | Mnemonic | Description
Enum | None | ICM and RCM PMP channels are disabled. This setting enables the use of the Remote Control Mode.
 | I2C | I 2 C Port is used for the ICM and RCM PMP channels.
 | MediaLB | MediaLB Port is used for the ICM and RCM PMP channels.
 | USB | USB Port is used for the ICM and RCM PMP channels.
    Application Interface

    Selects the port for the application interface. The application interface defines that the port is used for the MCM PMP channel.

    For limitations refer to Configuration Interface.

    Data Type | Mnemonic | Description
Enum | None | MCM PMP channel is disabled.
 | I2C | I 2 C Port is used for the MCM PMP channel.
 | MediaLB | MediaLB Port is used for the MCM PMP channel.
 | USB | USB Port is used for the MCM PMP channel.
    System Mode

    Selects the service that runs the device

    Data Type | Mnemonic | Description
Enum | MOSTNetServices | MOST NetServices runs the device.
 | UNICENS | UNICENS runs the device.

    Power Management

    By using the properties below, the following actions can be automatically initiated by INIC in Protected Mode.

    Monitoring

    Enables or disables the power management monitoring of the PS0 and PS1 pins

    Data Type | Mnemonic | Description
Enum | Disabled | Disables the power management monitoring of the PS0 and PS1 pins, but allows for limited property settings: configuration of Power Off Time is possible.
 | Enabled | Enables the power management monitoring of the PS0 and PS1 pins with further property settings, see below.
    Action On U_Low

    Determines the INIC’s behavior when it detects an erroneous power condition (U Low ) on the PS0/PS1 pins, see Table 3-1 .

    Data Type | Mnemonic | Description
Enum | None | No action
 | PowerOff | Drives PWROFF pin high
 | ForcedNA | Sets ForcedNA
 | PowerOffForcedNA | Drives PWROFF pin high and sets ForcedNA
    Action On STP

    Determines the INIC’s behavior when it detects an STP condition on the PS0/PS1 pins, see Table 3-1 .

    Data Type | Mnemonic | Description
Enum | None | No action
 | StartDiagnosisSlave | INIC starts Ring Break Diagnosis as TimingSlave when PS0 and PS1 pins indicate state STP, see Table 3-1 .
 | StartDiagnosisMaster | INIC starts Ring Break Diagnosis as TimingMaster when PS0 and PS1 pins indicate state STP, see Table 3-1 .
 | StartNetwork | INIC starts the MOST network as TimingMaster when PS0 and PS1 pins indicate state STP, see Table 3-1 . This action provides the ability for two further property settings, see below.

    StartNetwork-related settings are as follows:

    Auto Forced Not Available Time

    Sets the delay for network shut down when INIC resides in Protected Mode and NetInterface Off state has been left (e.g., network startup has been triggered).
    For available parameters refer to AutoForcedNotAvailableTime .

    Packet Bandwidth

    Determines the packet data bandwidth on the MOST network configured by a TimingMaster device.
    For available parameters refer to PacketBW .

    Power Off Time

    Defines the time after which the PWROFF pin is set high. The precondition for timer start is that both conditions must occur: the Network must be in NetInterface Off state (see
    Figure 4-1 ) and INIC must have entered Protected Mode. If one of the conditions is no longer met, the timer will stop.
    If the timer is set to 65535, it will be disabled and the INIC will never drive the PWROFF pin high, not even if the Network is in NetInterface Off state and INIC has entered Protected Mode.
    The default value is 65535 s.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 1...65535 | 1 | s

    Network Management
    Control Message Low Level Retry Block Count

    Defines the block count for control Low-Level Retries for all messages generated by the INIC itself.
    For available parameters refer to ControlLLRBlockCount .

    MOST Port
    Physical Layer

    Defines the physical layer used for MOST network communication

    Data Type | Mnemonic | Description
Enum | Optical | Optical physical layer is activated.
 | Coax | Coax physical layer is activated.
 | DefinedByPackage | Sets the physical layer to Coax for AF devices and to Optical for BF devices. For information on AF and BF devices, refer to the OS81118 Hardware Data Sheet [4] .

    I 2 C Port
    Port Create

    Creates the I 2 C Port of the device

    Note: Creation of an I 2 C Port at chip startup is only supported when the property setting of the Configuration Interface or the Application Interface is set to I2C .

    Data Type | Mnemonic | Description
Enum | NotCreatedAtStartup | At chip startup the port is not created. If the port is required, it can be created and configured per FBlock INIC API command.
 | CreatedAtStartup | At chip startup the port is created with further property settings, see below. The INIC operates as I 2 C-bus slave.
    Port Address

    Sets the 7-bit I 2 C slave address of the device

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0x00...0x7F | 1 | None

    MediaLB Port
    Port Create

    Creates the MediaLB Port of the device

    Data Type | Mnemonic | Description
Enum | NotCreatedAtStartup | At chip startup the port is not created. If the port is required, it can be created and configured per FBlock INIC API command.
 | CreatedAtStartup | At chip startup the port is created with further property settings, see below.
    Port Speed

    Defines the clock speed configuration.
    For available parameters refer to ClockConfig .

    USB Port
    Port Create

    Creates the USB Port of the device

    Data Type | Mnemonic | Description
Enum | NotCreatedAtStartup | At chip startup the port is not created. If the port is required, it can be created and configured per FBlock INIC API command.
 | CreatedAtStartup | At chip startup the port is created with further property settings, see below.
    Physical Layer

    Selects the interface of the USB Port’s physical layer.
    For available parameters refer to PhysicalLayer .

    Control Interface

    Enables or disables the control interface communication over the USB Port. This interface provides the Endpoints 0x0F (OUT) and 0x8F (IN).

    Data Type | Mnemonic | Description
Enum | Disabled | The control interface is disabled.
 | Enabled | The control interface is enabled.
    Packet Interface

    Enables or disables the packet interface communication over the USB Port. This interface provides the Endpoints 0x0E (OUT) and 0x8E (IN).

    Data Type | Mnemonic | Description
Enum | Disabled | The packet interface is disabled.
 | Enabled | The packet interface is enabled.
    Streaming Interface

    Enables or disables the streaming interface communication over the USB Port. This interface provides the Endpoints 0x01...0x0A (OUT) and 0x81...0x8A (IN), dependent on the configured count of OUT and IN Endpoints. The count is configured by parameters OUT Endpoint Count for Streaming Interface and IN Endpoint Count for Streaming Interface .

    Data Type | Mnemonic | Description
Enum | Disabled | The streaming interface is disabled.
 | Enabled | The streaming interface is enabled.
    OUT Endpoint Count for Streaming Interface

    Defines the number of USB OUT Endpoints being provided through the USB streaming interface. The first Endpoint starts at address 0x01 and increases by one for each additional Endpoint.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0...10 | 1 | None
    IN Endpoint Count for Streaming Interface

    Defines the number of USB IN Endpoints being provided through the streaming interface. The first Endpoint starts at address 0x81 and increases by one for each additional Endpoint.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Byte | 0 | 0...10 | 1 | None

    SPI Port
    Port Create

    Creates the SPI Port of the device

    Data Type | Mnemonic | Description
Enum | NotCreatedAtStartup | At chip startup the port is not created. If the port is required, it can be created and configured per FBlock INIC API command.
 | CreatedAtStartup | At chip startup the port is created with further property settings, see below.
    Clock Mode

    Sets the phase and polarity of the SCLK signal.
    For available parameters refer to ClockMode .

    Streaming Port Base Configuration
    Base Configuration Load

    Loads the base configuration. For more information refer to Chapter 11 .

    Data Type | Mnemonic | Description
Enum | NotLoadedAtStartup | At chip startup the base configuration is not loaded. If the base configuration is required, it can be configured per FBlock INIC command.
 | LoadedAtStartup | At chip startup the base configuration is loaded with further property settings, see below.
    Port A Option

    Defines the direction of the physical data pins of Streaming Port A.
    For available parameters refer to PortOption .

    Port A Operation Mode

    Defines the operation mode of Streaming Port A.
    For available parameters refer to OperationMode .

    Port A Clock Mode

    Defines the clock generation mode for Streaming Port A

    Data Type | Mnemonic | Description
Enum | Output | INIC drives the FSY / SCK signals as outputs, frequency locked to the network clock.
 | Input | FSY / SCK signals are configured as inputs and are driven from outside the INIC. Use RMCK, frequency locked to the network clock, as reference for clock generation.
    Port A Clock Data Delay

    Indicates if there should be a single clock cycle delay between the start of frame and the start of the frame data.

    Data Type | Mnemonic | Description
Enum | NonDelayed | Data is not delayed by a single SCK clock delay.
 | Delayed | There is a single SCK clock delay between the start of frame (falling edge of FSY ) and the start of the frame data on the data pins.
    Port B Option

    Defines the direction of the physical data pins of Streaming Port B.
    For available parameters refer to PortOption .

    Port B Operation Mode

    Defines the operation mode of Streaming Port B.
    For available parameters refer to OperationMode .

    RMCK Port
    Port Create

    Creates the RMCK Port of the device

    Data Type | Mnemonic | Description
Enum | NotCreatedAtStartup | At chip startup the port is not created. If the port is required, it can be created and configured per FBlock INIC API command.
 | CreatedAtStartup | At chip startup the port is created with further property settings, see below.
    Divisor

    Determines the output frequency for the RMCK pin.
    For available parameters refer to Divisor .

    Packet Connection
    Driver Control Interface Access

    Enables or disables the driver control interface access of the packet connection. Driver control interface access is only possible over a MediaLB Port or an SPI Port.

    Data Type | Mnemonic | Description
Enum | Disabled | Disables driver control interface access
 | Enabled | Enables driver control interface access
    Reduced Transmission Buffer

    Enables or disables the functionality for reduction of standard routing memory space used for packet transmission, see Table 6-3 .

    Data Type | Mnemonic | Description
Enum | Disabled | Standard routing memory space for packet transmission is not reduced.
 | Enabled | Reduces the standard routing memory space needed for packet transmission to free-up more space for the isochronous transmission class.
    Port Select

    Defines the physical port used for the packet connection

    Data Type | Mnemonic | Description
Enum | None | No packet connection activated
 | MediaLB | Packet connection uses the MediaLB Port and provides the ability for further property settings, see below.
 | USB | Packet connection uses the USB Port.
 | SPI | Packet connection uses the SPI Port.

    MediaLB-related settings are as follows:

    Multiplexing

    Enables or disables the packet multiplexing feature

    Data Type | Mnemonic | Description
Enum | Disabled | Disables packet multiplexing
 | Enabled | Enables packet multiplexing

    Note: When packet multiplexing is enabled, the following conditions must be taken into account:

    The values for MediaLB Input Bandwidth and MediaLB Output Bandwidth must be the same.

    The MediaLB Input Bandwidth and the MediaLB Output Bandwidth must be each at least 12 bytes in size.

    The difference between the MediaLB Input Address and the MediaLB Output Address must be 2 (e.g., 0x0006 and 0x0008).
    MediaLB Input Address

    Sets the MediaLB Input address of the packet

    Note: Address values must always differ from each other, regardless of the direction ( Input / Output ).
    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | MediaLB 3-Pin: 0x0006...0x003E | 2 | None
 |  | MediaLB 6-Pin: 0x0006...0x007E
    MediaLB Input Bandwidth

    Determines the number of bytes reserved for a packet connection of direction Input .

    Note: The bytes specified by parameter Bandwidth are shared between the number of bytes used for:

    MediaLB Input Bandwidth and MediaLB Output Bandwidth used in a packet connection,

    Configuration Interface and Application Interface (each PMP channel requires 4 bytes if MediaLB is selected).

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 4...856 | 4 | Byte
    MediaLB Output Address

    Sets the MediaLB Output address of the packet.
    For available parameters and limitations refer to MediaLB Input Address.

    MediaLB Output Bandwidth

    Determines the number of bytes reserved for a packet connection of direction Output . For available parameters and limitations refer to MediaLB Input Bandwidth.

    User-Defined Version
    Major Version

    Defines the major version number of the configuration string.

    For available parameters refer to ExtMajorVersion .

    Minor Version

    Defines the minor version number of the configuration string.

    For available parameters refer to ExtMinorVersion .

    Release Version

    Defines the release version number of the configuration string.

    For available parameters refer to ExtReleaseVersion .

    Default Values

    The properties and their associated default values are as follows:

    Table 22-1: Configuration String – Properties and Default Values (Continued)
Device Management
Property | Default Value
Default Instance ID | 0x01
Diag ID | 0x0000
MUTE/RSOUT Configuration | Disabled
Configuration Interface | I 2 C
Application Interface | I 2 C
System Mode | MOSTNetServices
Power Management
Property | Default Value
Monitoring | Enabled
Action On U_Low | None
Action On STP | None
Auto Forced Not Available Time | 65535 ms
Packet Bandwidth | 52
Power Off Time | 65535 s
Network Management
Property | Default Value
Control Message Low Level Retry Block Count | 10
MOST Port
Property | Default Value
Physical Layer | DefinedByPackage
I2C Port
Property | Default Value
Port Create | CreatedAtStartup
Port Address | 0x20
MediaLB Port
Property | Default Value
Port Create | NotCreatedAtStartup
Port Speed | 1024Fs
USB Port
Property | Default Value
Port Create | NotCreatedAtStartup
Physical Layer | Standard
Control Interface | Enabled
Packet Interface | Disabled
Streaming Interface | Enabled
OUT Endpoint Count for Streaming Interface | 2
IN Endpoint Count for Streaming Interface | 2
SPI Port
Property | Default Value
Port Create | NotCreatedAtStartup
Clock Mode | SCLKLowSFCR
Streaming Port Base Configuration
Property | Default Value
Base Configuration Load | NotLoadedAtStartup
Port A Option | InOut
Port A Operation Mode | Generic
Port A Clock Mode | Output
Port A Clock Data Delay | Delayed
Port B Option | InOut
Port B Operation Mode | Generic
RMCK Port
Property | Default Value
Port Create | NotCreatedAtStartup
Divisor | 48
Packet Connection
Property | Default Value
Driver Control Interface Access | Disabled
Reduced Transmission Buffer | Disabled
Port Select | None
Multiplexing | Disabled
MediaLB Input Address | 0x0008
MediaLB Input Bandwidth | 4
MediaLB Output Address | 0x0006
MediaLB Output Bandwidth | 4
User-Defined Version
Property | Default Value
Major Version | 0x00
Minor Version | 0x00
Release Version | 0x00

    Identification String

    This section lists the properties of the identification string. To each property a general description is given that explains the intended use of the property. The default value associated to every property is given in Table 22-2 .

    Properties
    Node Address

    Defines the logical address of the device.

    Data Type | Exp. | Valid Values | Step | Unit
Unsigned Word | 0 | 0x0100...0x013F | 1 | None
 |  | 0x0010...0x00FF, 0x0140...0x02FF, 0x0500...0x0EFF
 |  | 0xFFFF | -
    Group Address

    Defines the second group address of the device.
    For available parameters refer to GroupAddress .

    Packet EUI-48 Bits 47:32

    Defines bits 47:32 of the EUI-48.
    For available parameters refer to PacketEUI48_47to32 .

    Packet EUI-48 Bits 31:16

    Defines bits 31:16 of the EUI-48.
    For available parameters refer to PacketEUI48_31to16 .

    Packet EUI-48 Bits 15:0

    Defines bits 15:0 of the EUI-48.
    For available parameters refer to PacketEUI48_15to0 .

    Default Values

    The properties and their associated default values are as follows:

    Table 22-2: Identification String – Properties and Default Values
Property | Default Value
Node Address | 0xFFFF
Group Address | 0x03C8
Packet EUI-48 Bits 47:32 | 0x0000
Packet EUI-48 Bits 31:16 | 0x0000
Packet EUI-48 Bits 15:0 | 0x0000

    Device Update Process

    Device Update Process

    Overview

    The INIC provides firmware memory sections (see Figure A-5 ) and a configuration memory section (see Figure A-8 ) that can be programmed by the customer. The method used to program the memory depends on the environment in which the application is used:

    • • For production-level applications, the memory is to be programmed by the EHC via the I 2 C Port. For the EHC to INIC connection diagram refer to Figure A-1 .
    • • For development-level applications, the memory is to be programmed by using the INIC Explorer Interface Box [8] connected via the Configuration/Debug Header (see the OS81118 Hardware Data Sheet [4] ). Consider, programming the INIC by using the INIC Explorer Interface Box is not discussed in this user’s guide.
      • Note: When programming the INIC’s memory, either the I 2 C Port or the Configuration/Debug Header is allowed to be used. Running both interfaces simultaneously will prevent proper programming.

    Download the Image Files

    The image files required to program the INIC can be exported by using the Microchip Automotive Target Manager [15] .

    Note: In order to allow proper communication between the EHC and the INIC and to avoid version conflicts between older MOST NetServices versions and the current INIC firmware version, it is strongly recommended to update first the EHC’s MOST NetServices before programming the INIC.

    Setup the EHC to INIC Connection

    To be able to program the INIC’s memory, first the EHC must be connected to the INIC as shown in Figure A-1 . The SCL , SDA , and INT pins are connected the same way as for standard INIC communication via the I 2 C Port. The ERR/ BOOT pin and RST pin connections are needed to put the INIC into its boot monitor mode to enable programming through the I 2 C Port.

    EHC to INIC Connection Diagram

    I²C Communication Protocol

    The I 2 C Port operates as an I 2 C slave device; see the OS81118 Hardware Data Sheet [4] for details on the I 2 C specifications of the part. The general protocol is based on command packets that contain a command byte (CMD) and data bytes (optional parameters). A typical packet is shown in Figure A-2 .

    I²C Command/Response Sequence

    The boot monitor buffers the data until the entire command has been received, then interprets and executes the command. The command buffer data size is 32 bytes. The EHC must not send more data than 32 data bytes per command. Those commands that consist of Command (CMD), address (Addr-H, Addr-L), and length (Len) bytes do not count against the 32-byte count.

    The protocol is a master/slave – command/response type format with the EHC being the master, and the INIC boot monitor being the slave. The I 2 C START condition signals the beginning of a message and the boot monitor buffers the command until the I 2 C STOP condition is received. The boot monitor then executes the command. When execution is complete, the boot monitor asserts the INT pin (low), signaling the EHC that the command has been executed. When the EHC detects that the INT pin is low, it reads the command response (Completion Code (CC)). At the end of the read cycle (I 2 C STOP condition) the boot monitor clears the INT line (back high). The boot monitor is now ready for another command.

    I²C Response Packet

    When the boot monitor executes a command, it assembles a response packet for the EHC to read. For most commands there is only the single Completion Code to read. However, for commands that do return data, the data follows the Completion Code.

    The general format of the response packet is shown below.

    Completion Code | Don’t Care | Don’t Care | Don’t Care | Data 0 | Data 1 | ... | Data n
8 bits | - | - | - | 0xXX | 0xXX | ... | 0xXX
Byte 0 | Byte 1 | Byte 2 | Byte 3 | ... |  |  | Byte n

    It is important to read the Completion Code, because this is what clears the INT signal from INIC.

    The Completion Code 0xFF indicates a valid response. If the command encounters an error, the Completion Code is changed from 0xFF to a command dependent value, which is documented for each command, see Section A.6 . If the command is not recognized, then 0x40 is returned. The response (0x40) to an unknown/not recognized package happens only after the Programming Start (0x0D) was sent.

    Programming Sequence

    Starting the programming sequence assumes that the image files have been downloaded (see Section A.2 ) and verified by the EHC. If this is done, the EHC must place the INIC into its program mode to start with the programming procedure. After programming is finished, the EHC must reset the INIC.

    Figure A-3 outlines the entire programming and read sequences for the firmware and the configuration memory. Programming details are shown from Figure A-6 to Figure A-11 .

    Note: If an error is detected during the programming sequence, start the programming process from the beginning or leave the program mode.
    Programming Sequence

    Enter and Leave the Program Mode

    At startup, the ERR/ BOOT pin is sampled, and, if it is low, the program mode is entered, see Figure A-4 . In program mode, the I 2 C Port is always enabled.

    Note: The time from reset high until the INIC is in program mode (boot time) takes 12 ms at the maximum. The EHC may not send any commands during this time.

    After the Programming Start command has been sent, the programming of the INIC’s memory sections can begin. When programming is finished, the program mode can be left. After resetting the INIC, the standard mode of operation is resumed. Since the ERR/ BOOT pin will be high during RST , standard mode of operation is gained by toggling the RST line.

    Sequence to Enter and Leave the Program Mode

    Read and Update Firmware Memory

    The following figure depicts an overview of the firmware memory.

    Firmware Memory

    Read Firmware Version

    Firmware Version Read Sequence

    The return parameters for Analyze Firmware Version Info are coded in big-endian format. Table A-1 lists the parameters.

    Return Parameters of Firmware Version Info

    Return Parameter

    Size

    Description

    Reserved

    8 bit

    -

    Identifier

    32 bit

    Chip identifier, always 0x81118

    Major

    8 bit

    Firmware major version number, e.g., V2.1.0-45

    Minor

    8 bit

    Firmware minor version number, e.g., V2.1.0-45

    Release

    8 bit

    Firmware release version number, e.g., V2.1.0-45

    Build

    32 bit

    Firmware build version number, e.g., V2.1.0-45

    Reserved

    8 bit

    -

    Reserved

    8 bit

    -

    CRC

    16 bit

    Valid, since the completion code reported 0xFF, success.
    Program Firmware

    Firmware Programming Sequence

    Read and Update Configuration Memory

    The following figure depicts an overview of the configuration memory, which includes the configuration string and the identification string.

    Configuration Memory Section

    Verify Configuration

    The flow described in Figure A-9 is entered to validate the CRC for both the configuration string and the identification string.

    Configuration Verification Sequence

    Read Configuration String Version

    Configuration String Version Read Sequence

    The return parameters for Decode Version are coded in big-endian format. Table A-2 lists the parameters.

    Return Parameters of Decode Version

    Return Parameter

    Size

    Description

    Major

    8 bit

    User-defined major version number

    Minor

    8 bit

    User-defined minor version number

    Release

    8 bit

    User-defined release version number

    Program Configuration

    Configuration Memory Programming Sequence

    Boot Monitor Commands

    This section lists all commands that are required for preparing, erasing, and programming the INIC’s memory. It also lists the commands used for checking the programming procedure and the version information of the firmware and the configuration memory.

    All commands and responses are denoted byte-wise and read from left to right, starting with byte 0.

    Table A-3 gives an overview of available commands.

    Boot Monitor Commands

    Command

    Name

    Description

    0x0D

    Programming Start

    Init, checks for PLL lock

    0XEE

    Read Firmware Version

    Reads the firmware version of the INIC, see Table A-1 .

    0x0C

    Erase Flash Partitions

    Erases the INIC Firmware section

    0x01

    Write Flash Memory

    Programs the INIC Firmware section

    0x06

    Set Flash Page

    Selects which 64k page to address

    0xCF

    Verify Configuration Memory

    Verifies the INIC configuration memory section

    0xD2

    Read Configuration Memory

    Reads the INIC configuration memory section

    0xCE

    Erase Configuration Memory

    Erases the INIC configuration memory section

    0xC2

    Write Configuration Memory

    Programs the INIC configuration memory section

    0xE5

    Clear CRC

    Initializes the CRC value

    0xE6

    Get CRC

    Returns the current CRC value

    Note: All commands have to be sent to I 2 C address 0x20.

    The table below shows typical execution times of the commands needed for erasing and writing the firmware or the configuration memory. These times can be used as a guideline to estimate how long flash and erase operations can take.

    Programming Times for Memory Erase and Write Commands

    Typical Time to

    100 kHz I 2 C
    @ 48 kHz Crystal

    400 kHz I 2 C
    @ 48 kHz Crystal

    Erase Flash Partitions (all partitions)

    4.95 s

    4.80 s

    Write Flash Memory (all partitions)

    22.7 s

    6.4 s

    Erase Configuration Memory

    530 ms

    530 ms

    Write Configuration Memory

    520 ms

    510 ms

    Note: Any EHC latencies increase the time required for those operations. Thus, the times above should be considered as the minimum typical times.

    Programming Start (0x0D)

    Starts the programing process. It must be sent prior to sending any erase or program command.

    The INIC locks to the crystal oscillator immediately after entering the program mode. The node stays in bypass. This condition is kept until the update process is finished and INIC is reset.

    Note: It is recommended to start the programming process while the MOST network is in NetInterface Off state.

    I 2 C Command:

    Command | Data 0 | Data 1 | Data 2
0x0D | 0x00 | 0x00 | 0x00

    I 2 C Success Response:

    Completion Code

    0xFF

    I 2 C Error Response:

    Completion Code | Description
0x20 | INIC is not locked to the crystal oscillator due to a wiring failure (e.g., the crystal oscillator is not connected properly or of wrong frequency.

    Read Firmware Version (0xEE)

    Reads and verifies the firmware version of the INIC. Verification includes the check of the application start vector (0x1800), which should be non-0x0000 and non-0xFFFF. The application is considered erroneous, due to:

    • • a used INIC or product version that does not match the chip ID
    • • CRC field is 0xFFFF

    I 2 C Command:

    Command | Data 0 | Data 1 | Data 2
0xEE | 0x00 | 0x00 | 0x00

    I 2 C Success Response:

    Completion Code | Don’t Care | Don’t Care | Don’t Care | Len | FW Version
0xFF | - | - | - | 0xXX | 0xXX ...

    I 2 C Error Response:

    Completion Code | Description
0x10 | Verification error - Invalid INIC firmware
    Erase Flash Partitions (0x0C)

    Erases the partitions of the INIC firmware memory section. The program memory is divided into 192 1k partitions, whereas six of these partitions are used for the boot monitor. This command expects the starting partition number and the number of partitions to be erased. To erase the entire image, the start partition has to be set to 0x06 and the number of partitions has to be set to 0xBA.

    I 2 C Command:

    Command | Start Partition | Number of Partitions | Spare
0x0C | 0x06...0xB9 | 0x01...0xBA | 0x00

    I 2 C Success Response:

    Completion Code

    0xFF

    I 2 C Error Response:

    Completion Code | Description
0x01 | Invalid parameter(s) - Invalid start partition and/or invalid number of partitions
0x21 | No initialization done – Programming Start command was not sent or successful.

    Write Flash Memory (0x01)

    Programs Len (Length) number of bytes, starting at Addr-H:Addr-L. The 16-bit address in Addr-H:Addr-L is used in conjunction with the Set Flash Page command to determine the final address. The memory is programmed 2 bytes at a time, so the address sent must be even, and the Len must be even. The maximum value for Len is 32 bytes, and all packets have to send 32 bytes. The INIC images are padded so that the total length is always a multiple of 32. Thus the EHC does not have to deal with partial packets or padding, which could affect the CRC calculations. During programming, verification is done and the CRC value is updated.

    I 2 C Command:

    Command | Addr-H | Addr-L | Len | Data 0 | Data 1 | ... | Data 30 | Data 31
0x01 | 0x00...0xFF | 0x00...0xFF | 0x02...0x20 | ...

    I 2 C Success Response:

    Completion Code

    0xFF

    I 2 C Error Response:

    Completion Code | Description
0x10 | Verification error – Read back after write does not match the data sent.
0x11 | Invalid location – Tried to program the boot monitor memory section than the current INIC firmware area.
0x12 | Invalid address
0x13 | Invalid length
0x21 | No initialization done – Programming Start command was not sent or successful.

    Set Flash Page (0x06)

    Sets the page (64k space) that is targeted by any following program commands. Since the address field of the programming command only supports 64k address space, this command selects which 64k space to address. Once set, the particular page stays in effect until it is changed by another Set Flash Page command or a reset.

    Page is 0: address range is 0x00000 to 0x0FFFF.

    Page is 1: address range is 0x10000 to 0x1FFFF.

    Page is 2: address range is 0x20000 to 0x2FFFF.

    I 2 C Command:

    Command | Page
0x06 | 0, 1 or 2

    I 2 C Success Response:

    Completion Code

    0xFF
    Verify Configuration Memory (0xCF)

    Verifies the INIC configuration memory section. The address can be any value from 0x0000 to 0x01FF. Len can be any value less than or equal to 255. When Len is 0x00, it will be considered as 256 bytes. The requested section is reported as valid if the CRC of all the bytes in the section ends up being 0x0000.

    I 2 C Command:

    Command | Addr-H | Addr-L | Len
0xCF | 0x00...0x01 | 0x00...0xFF | 0x00...0xFF

    I 2 C Success Response:

    Completion Code

    0xFF

    I 2 C Error Response:

    Completion Code | Description
0x10 | Verification error - Invalid CRC

    Read Configuration Memory (0xD2)

    Reads Len number of bytes, starting at Addr-H:Addr-L. The 16-bit address in
    Addr-H:Addr-L can be any value from 0x0000 to 0x01FF. Len can be any value up to 32.

    I 2 C Command:

    Command | Addr-H | Addr-L | Len
0xD2 | 0x00...0x01 | 0x00...0xFF | 0x01...0x20

    I 2 C Success Response:

    Completion Code | Don’t Care | Don’t Care | Don’t Care | Data 0...(Len-1)
0xFF | - | - | - | 0xXX

    I 2 C Error Response:

    Completion Code | Description
0x12 | Invalid address
0x13 | Invalid length
    Erase Configuration Memory (0xCE)

    Erases the INIC configuration memory section.

    I 2 C Command:

    Command | Start Page | Number of Pages
0xCE | 0x00 | 0x02

    I 2 C Success Response:

    Completion Code

    0xFF

    I 2 C Error Response:

    Completion Code | Description
0x01 | Invalid parameter(s) - Invalid start page and/or invalid number of pages
0x21 | No initialization done – Programming Start command was not sent or successful.

    Write Configuration Memory (0xC2)

    Programs Len number of bytes, starting at Addr-H:Addr-L. The 16-bit address in
    Addr-H:Addr-L can be any value from 0x0000 to 0x01FF. The memory is programmed 2 bytes at a time, so the address sent must be even, and the Len must be even. The maximum value for Len is 32 bytes.

    I 2 C Command:

    Command | Addr-H | Addr-L | Len | Data 0 | ... | Data 31
0xC2 | 0x00...0x01 | 0x00...0xFF | 0x02...0x20 | ...

    I 2 C Success Response:

    Completion Code

    0xFF

    I 2 C Error Response:

    Completion Code | Description
0x10 | Verification error – Read back after write does not match the data sent.
0x12 | Invalid address
0x13 | Invalid length
0x21 | No initialization done – Programming Start command was not sent or successful.

    Clear CRC (0xE5)

    Initializes the boot monitor’s internal CRC value to 0. Then, during programming, each byte is added into the CRC calculation.

    I 2 C Command:

    Command | Data 0 | Data 1 | Data 2
0xE5 | 0x00 | 0x00 | 0x00

    I 2 C Success Response:

    Completion Code

    0xFF

    Get CRC (0xE6)

    Returns the value of the internal CRC variable. The CRC is updated as each byte is programmed. At the end of the programming sequence this value represents the CRC of all the data just programmed. The firmware image has an embedded CRC, so that the final CRC of the entire block should be zero.

    I 2 C Command:

    Command | Data 0 | Data 1 | Data 2
0xE6 | 0x00 | 0x00 | 0x02

    I 2 C Success Response:

    Completion Code | Don’t Care | Don’t Care | Don’t Care | Data 0 is CRC-H | Data 1 is CRC-L
0xFF | - | - | - | 0xXX | 0xXX

    Diagnosis

    Diagnosis

    The INIC provides diagnosis functionality via the MOST debug message. The message is used to send debug events – these are events that are generated by the INIC and sent to the MOST network, to allow a standard analysis tool such as the OptoLyzer MOCCA Bundle 150o/c [10] focusing on these events.

    MOST debug messages are always sent to debug address 0x0FF0; no retries are performed.

    FBlock DebugMessages

    The FBlock DebugMessages is not included in the central registry. The InstID of the FBlock is equal to the node position of the device that implements the FBlock.
    The function that provides the debug events is called NIC_DebugMessage() , see Section 21.3.1 . Debug events are categorized to signal different debug levels, which are error and warning. The function cannot be adjusted; it always includes errors and warnings. Requests to this function are not supported.

    Control Message Retry Failed

    The INIC provides a mechanism to indicate that the final control message retry has failed. In this case, the control message is sent to debug address 0x0FF0 instead to the original target address.

    Note: This mechanism applies to every control message sent to the MOST network.

    Resource Planning

    Resource Planning

    Resource Overview

    This section gives an overview of the resource objects (see Table 6-1 ) and their data types. Furthermore, it shows which resource object tables, routing channels, or routing memories are utilized, when a resource object of a specific data type is created.

    Socket | Data Type | Combiner Table | Splitter Table | Socket Table | Connection Table | Synchronous Routing Channel | Isochronous Routing Channel | Standard Routing Memory (Synchronous) | Standard Routing Memory (Isochronous) | Aggregation Routing Memory (Synchronous/Isochronous)
MOST | Sync |  |  | X |  | X |  |  |  |
 | AVPacketized |  |  | X |  |  | X |  |  |
 | QoSPacket |  |  | X |  |  | X |  |  |
 | DiscFramePhase |  |  | X |  |  | X |  |  |
MediaLB | Control |  |  | X |  |  |  |  |  |
 | Packet |  |  | X |  |  |  |  |  |
 | Sync |  |  | X |  |  |  |  |  |
 | AVPacketized |  |  | X |  |  |  |  |  |
 | QoSPacket |  |  | X |  |  |  |  |  |
 | DiscFramePhase |  |  | X |  |  |  |  |  |
 | SPI | Packet |  |  | X |  |  |  |  |
USB | Control |  |  | X |  |  |  |  |  |
 | Packet |  |  | X |  |  |  |  |  |
 | Sync |  |  | X |  |  |  |  |  |
 | AVPacketized |  |  | X |  |  |  |  |  |
 | Streaming | Sync |  |  | X |  |  |  |  |

    Combiner | DataType | Combiner Table | Splitter Table | Socket Table | Connection Table | Synchronous Routing Channel | Isochronous Routing Channel | Standard Routing Memory (Synchronous) | Standard Routing Memory (Isochronous) | Aggregation Routing Memory (Synchronous/Isochronous)
Combiner -> MediaLB | Sync | X |  |  |  | X |  | X |  |
Combiner -> Streaming |  | X |  |  |  | X |  | X |  |
Combiner -> USB |  | X |  |  |  | X |  | X |  | X

    Splitter | DataType | Combiner Table | Splitter Table | Socket Table | Connection Table | Synchronous Routing Channel | Isochronous Routing Channel | Standard Routing Memory (Synchronous) | Standard Routing Memory (Isochronous) | Aggregation Routing Memory (Synchronous/Isochronous)
MOST -> Splitter | Sync |  | X |  |  |  |  | X |  |
MediaLB -> Splitter |  |  | X |  |  | X |  | X |  |
Streaming -> Splitter |  |  | X |  |  | X |  | X |  |
USB -> Splitter |  |  | X |  |  | X |  | X |  | X

    Connection | DataType | Combiner Table | Splitter Table | Socket Table | Connection Table | Synchronous Routing Channel | Isochronous Routing Channel | Standard Routing Memory (Synchronous) | Standard Routing Memory (Isochronous) | Aggregation Routing Memory (Synchronous/Isochronous)
MOST <-> MediaLB | QoSPacket |  |  |  | X |  |  |  | X |
MOST <-> MediaLB | Sync |  |  |  | X |  |  | X |  |
MOST <-> Streaming |  |  |  |  | X |  |  | X |  |
MOST <-> USB |  |  |  |  | X |  |  | X |  | X
MOST -> Combiner |  |  |  |  | X |  |  |  |  |
Splitter (MediaLB) -> MOST |  |  |  |  | X |  |  |  |  |
Splitter (Streaming) -> MOST |  |  |  |  | X |  |  |  |  |
Splitter (USB) -> MOST |  |  |  |  | X |  |  |  |  |
Splitter (MOST) -> MediaLB |  |  |  |  | X | X |  |  |  |
Splitter (MOST) -> Streaming |  |  |  |  | X | X |  |  |  |
Splitter (MOST) -> USB |  |  |  |  | X | X |  |  |  | X
MOST <-> MediaLB | AVPacketized |  |  |  | X |  |  |  | X |
MOST <-> USB |  |  |  |  | X |  |  |  | X | X
MOST <-> MediaLB | DiscFramePhase |  |  |  | X |  |  |  | X | X

    Available Resources

    MOST System

    In a MOST system the total available data bandwidth is a shared resource among all devices. Therefore, when designing a MOST device, this fact must be considered to avoid bandwidth resource conflicts.

    Parameter PacketBW specifies the available bandwidth for packet and streaming data. If PacketBW is set to 0, the total available streaming data bandwidth is 372 bytes per MOST frame, whereas 0 bytes per MOST frame are left for packet data.

    INIC

    Resource object tables, routing memories, and routing channels are shared between multiple resource objects, see Section C.1 . A resource budget is required to be planned, such that the available resources can be used in an optimum manner.

    The INIC stores all resource objects in tables, which have a specific number of slots.
    Each of the tables is a shared resource of the corresponding object type. Parameter Index denotes the limitations, see Section 6.2 .

    For information on routing memory and available resources, refer to Section 6.8.1 .

    Routing channels and available resources can be found in Section 6.8.2 .

    Resource Budget Calculation

    The use case described in this section is intended to be a guideline on how to properly calculate and manage a resource budget. Before we step into the configuration and calculation details of our example device, consider the following device characteristics: the device utilizes multiple ports and requires multiple streaming resources for both synchronous and isochronous data transmission.

    In the following sections, step-by-step functionality will be added to our example device, to finally get an impression on how resource calculation works.

    Configuration details:

    • • The serial data pins of Streaming Port A are configured as one Output and one Input pin. Streaming Port A is configured with an I 2 S-compatible configuration, and a clock speed of 64Fs . A 16-bit audio stereo stream will be transmitted on one of the data pins.
    • • Streaming Port B shares the same clocking signals as Streaming Port A. Its serial data pins are also configured as one Output and one Input pin. Streaming Port B is configured with sequential data alignment that enables routing of all bytes per Streaming Port frame. A splitter and a combiner object will be used to enable de-grouping and grouping of multiple audio streams onto the same Streaming Port pin.
    • • The MediaLB Port is configured as a 3-Pin interface with a clock speed of 512Fs . A multichannel 5.1, 24-bit audio stream will be transmitted on an application channel.
    • • The USB Port is configured with a USB IN Endpoint for AVPacketized streaming. A DVB-T stream with a peak data rate of 15 Mbit/s will be transmitted on one of the Endpoints.
    • • The I 2 C Port will be used for Control data. Packet data transmission is not included in this example, thus the maximum bandwidth for streaming data is available on the MOST network.

    Figure C-1 shows the MOST network, the peripheral ports, and the streaming applications running on the EHC. The coloring in the figure shows which streaming application is used with which peripheral port.

    Streaming Applications and Peripheral Ports

    Note: In this example the MOST device hardware is using a codec, which does not require the RMCK Port.
    Synchronous Streaming Using the Streaming Port

    A stereo channel shall be transferred from Streaming Port A to the MOST network. The channel consists of a 16-bit audio stereo stream with a sample rate synchronized to the MOST network. Furthermore, a combiner object is created based on a Streaming Port B socket of direction Output . It groups two 16-bit audio stereo streams received from the network. A splitter object is created based on a Streaming Port B socket of direction Input . It splits a stream of two 16-bit audio stereo streams received on Streaming Port B. Each stream is transmitted on a separate network channel, outlined in Figure C-2 .

    Synchronous Streaming Using Streaming Port A and Streaming Port B

    Port Configuration

    As described in Section 11.3.1 , Streaming Port A is configured for audio streaming between the INIC and an external audio codec, using an I 2 S-compatible format. In addition, Streaming Port B will be configured for sequential streaming. The following is a summary of the configuration:

    INIC.StreamPortConfiguration()

    Index | OperationMode | PortOption | ClockMode | ClockDataDelay
Streaming PortA | Generic | InOut | Output | Delayed
Streaming PortB | Generic | InOut | Wildcard | Wildcard

    INIC.StreamPortCreate()

    Index | ClockConfig | DataAlignment
Streaming PortA | 64Fs | Left16Bit
Streaming PortB | Wildcard | Seq

    This configuration enables the following resources on the Streaming Ports available when creating sockets.

    Index | Pin Direction | Maximum Resources [bytes]
Streaming PortA | Input | 4
 | Output | 4
Streaming PortB | Input | 8
 | Output | 8

    1 x 16 bit Audio Stereo
    Resource Usage

    Section 11.2 describes the properties of a Streaming Port socket. The size of the socket specifies the number of bytes per Streaming Port frame to be routed. In the example described in Section 11.3.1 , a Streaming Port socket of direction Output is created on the SRXA1 pin. The only applicable size while using a legacy data alignment format is for this example 4 bytes. Furthermore, a slot in the socket resource table is required to be reserved.

    Feature: 1 x 16 bit audio stereo

    Resource object that is created: A Streaming socket

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
40 - 1 = 39 |  |  |  |  |  |  |  |  |

    The example in Section 11.3.1 also describes the creation of a MOST socket. Since we create a socket of direction Input , an allocated network channel is required. Hence, MOST system resources have already been allocated when this action is performed. In addition to MOST system resources, a MOST socket always requires a routing channel and a slot in the socket resource table. See Section 7.2 for more information on MOST sockets.

    Resource object that is created: A MOST socket

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
40 - 1 = 39 |  |  |  |  |  |  |  |  |
39 - 1 = 38 |  |  |  |  |  |  | 32 - 1 = 31 |  | 372 - 4 = 368

    Section 19.1.2 describes the requirements when creating a synchronous connection between a peripheral port socket and a MOST network socket. Standard routing memory is required, where the amount is decided by the size of the sockets. The size of both sockets is required to be equal. A socket connection requires a slot in the connection resource table.

    Resource object that is created: A Sync connection

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
40 - 1 = 39 |  |  |  |  |  |  |  |  |
39 - 1 = 38 |  |  |  |  |  |  | 32 - 1 = 31 |  | 372 - 4 = 368
 | 20 - 1 = 19 |  |  | 384 - 4 = 380 |  |  |  |  |

    Summary
     |  | Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Feature | # of all Resources | Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16 | 372
1 x 16 bit Audio Stereo | # of used Resources | -2 | -1 |  |  | -4 |  |  | -1 |  | -4
 | # of left Resources | 38 | 19 |  |  | 380 |  |  | 31 |  | 368

    2 Groups of 2 x 16 bit Audio Stereo
    Resource Usage

    In this example we first create two Streaming Port sockets, one on each pin, with the maximum size of 8 bytes allowed by the port configuration. The size of a socket denotes the total number of bytes that will be routed to the Streaming Port pin, each frame. In this example, these are 8 bytes (4 + 4 bytes) for both audio streams. Each of the Streaming Port sockets requires a slot in the socket resource table. See Section 11.2 for more information on Streaming Port sockets.

    Feature: 2 Groups of 2 x 16 bit Audio Stereo

    Resource object that is created: Two Streaming Port sockets

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
38 - 2 = 36 |  |  |  |  |  |  |  |  |

    A data stream containing two 16-bit audio stereo streams is presented on the Input pin. Each of the streams needs to be routed to separate network channels. We create a splitter routing object with the Streaming Port socket of direction Input . A splitter requires a slot in the splitter resource table, as well as a routing channel and a portion of the standard routing memory. See Chapter 16 for further information.

    Resource object that is created: A splitter

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
38 - 2 = 36 |  |  |  |  |  |  |  |  |
 |  | 3 - 1 = 2 |  | 380 - 8 = 372 |  |  | 31 - 1 = 30 |  |

    A data stream containing two 16-bit audio stereo streams needs to be presented on the Output pin. Each of the streams is routed from a separate network channel. We create a combiner routing object with the Streaming Port socket of direction Output . A combiner requires a slot in the combiner resource table, as well as a routing channel and a portion of the standard routing memory. See Chapter 15 for further information.

    Resource object that is created: A combiner

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
38 - 2 = 36 |  |  |  |  |  |  |  |  |
 |  | 3 - 1 = 2 |  | 380 - 8 = 372 |  |  | 31 - 1 = 30 |  |
 |  |  | 3 - 1 = 2 | 372 - 8 = 364 |  |  | 30 - 1 = 29 |  |

    In order to route two 16-bit audio stereo streams to the network, two MOST network sockets of direction Output are required. Each socket needs to be 4 bytes in size that are allocated from the MOST system resources. In order to route two 16-bit audio stereo streams from the network, two MOST network sockets of direction Input are required. Each socket needs to be 4 bytes in size. The network channels must already exist on the network. Even though no allocation takes place, we account for the used MOST system resources in our budget. Each of the MOST sockets requires a slot in the socket resource table as well as a routing channel.

    Resource object that is created: Four MOST network sockets

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
38 - 2 = 36 |  |  |  |  |  |  |  |  |
 |  | 3 - 1 = 2 |  | 380 - 8 = 372 |  |  | 31 - 1 = 30 |  |
 |  |  | 3 - 1 = 2 | 372 - 8 = 364 |  |  | 30 - 1 = 29 |  |
36 - 4 = 32 |  |  |  |  |  |  | 29 - 4 = 25 |  | 368 - 16 = 352

    For further information on the resource requirements by the sockets used in a synchronous socket connection, see Section 19.4 .

    Section 19.2.2 describes the resource usage when creating a connection between a MOST socket and a combiner, and Section 19.3.2 describes the usage requirements when creating a connection between a MOST socket and a splitter. In this example, we connect the combiner with the two MOST sockets of direction Input , and the splitter with the two MOST sockets of direction Output . Each of the connection variants requires a slot in the connection resource table, but no further routing resources.

    Resource object that is created: Four Sync connections

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
38 - 2 = 36 |  |  |  |  |  |  |  |  |
 |  | 3 - 1 = 2 |  | 380 - 8 = 372 |  |  | 31 - 1 = 30 |  |
 |  |  | 3 - 1 = 2 | 372 - 8 = 364 |  |  | 30 - 1 = 29 |  |
36 - 4 = 32 |  |  |  |  |  |  | 29 - 4 = 25 |  | 368 - 16 = 352
 | 19 - 4 = 15 |  |  |  |  |  |  |  |

    Summary
     |  | Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Feature | # of all Resources | Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16 | 372
1 x 16 bit Audio Stereo | # of used Resources | -2 | -1 |  |  | -4 |  |  | -1 |  | -4
 | # of left Resources | 38 | 19 |  |  | 380 |  |  | 31 |  | 368
2 Groups of 2 x 16 bit Audio Stereo | # of used Resources | -6 | -4 | -1 | -1 | -16 |  |  | -6 |  | -16
 | # of left Resources | 32 | 15 | 2 | 2 | 364 |  |  | 25 |  | 352

    Synchronous Streaming Using the MediaLB Port

    In this section we expand our example by adding a multi-channel 5.1 audio stream that shall be transferred from the MediaLB Port to the MOST network. The channel consists of six 24-bit audio stereo channels and has a sample rate synchronized to the MOST network. The stream is transmitted on a single network channel.

    Synchronous Streaming Using the MediaLB Port

    Port Configuration

    The MediaLB Port is configured as a 3-Pin interface with a clock speed of 512Fs . This configuration enables the following resources on the MediaLB Port available when creating sockets.

    Mode | ClockConfig | Maximum Resources (in Quadlets) | Maximum Resources (in Bytes)
3-Pin | 512Fs | 15 | 60

    Note: MediaLB is quadlet based and therefore it is important to consider the possibility of padding bytes when creating sockets.

    Multichannel 5.1, 24 bit Audio
    Resource Usage

    Section 8.2 describes the properties of a MediaLB Port socket. In this example the multichannel 5.1 data stream is 18 bytes (6 x 24-bit channels). Parameter Bandwidth shall be set to 18 bytes and there must be at least 20 bytes free in total or the socket cannot be created. Hence, 2 bytes are padded on MediaLB since MediaLB is quadlet-aligned. Furthermore, a slot in the socket resource table is required for the MediaLB socket.

    Feature: Multichannel 5.1, 24 bit Audio

    Resource object that is created: A MediaLB socket

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
32 - 1 = 31 |  |  |  |  |  |  |  |  |

    In order to route a multichannel 5.1 data stream to the network, a MOST network socket of direction Output is required. The socket needs to be 18 bytes in size that are allocated from the MOST system resources. A MOST socket requires a slot in the socket resource table as well as a routing channel. For more information on the creation of MOST sockets see Section 7.2 .

    Resource object that is created: A MOST socket

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
32 - 1 = 31 |  |  |  |  |  |  |  |  |
31 - 1 = 30 |  |  |  |  |  |  | 25 - 1 = 24 |  | 352 - 18 = 334

    For further information on the resource requirements by the sockets used in a synchronous socket connection, see Section 19.4 .

    Section 19.1.2 describes the requirements when creating a synchronous connection between a peripheral port socket and a MOST network socket. Standard routing memory is required, where the amount is decided by adjusting the size of the MediaLB socket upwards to the next even number of quadlets. This is required due to the physical size of the MediaLB channel. A socket connection requires a slot in the connection resource table.

    Resource object that is created: A Sync connection

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
32 - 1 = 31 |  |  |  |  |  |  |  |  |
31 - 1 = 30 |  |  |  |  |  |  | 25 - 1 = 24 |  | 352 - 18 = 334
 | 15 - 1 = 14 |  |  | 364 - 20 = 344 |  |  |  |  |

    Summary
     |  | Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Feature | # of all Resources | Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16 | 372
1 x 16 bit Audio Stereo | # of used Resources | -2 | -1 |  |  | -4 |  |  | -1 |  | -4
 | # of left Resources | 38 | 19 |  |  | 380 |  |  | 31 |  | 368
2 Groups of 2 x 16 bit Audio Stereo | # of used Resources | -6 | -4 | -1 | -1 | -16 |  |  | -6 |  | -16
 | # of left Resources | 32 | 15 | 2 | 2 | 364 |  |  | 25 |  | 352
Multichannel 5.1, 24 bit Audio | # of used Resources | -2 | -1 |  |  | -20 |  |  | -1 |  | -18
 | # of left Resources | 30 | 14 |  |  | 344 |  |  | 24 |  | 334

    A/V Packetized Streaming Using the USB Port

    In this section we expand our example by adding a DVB-T signal stream that shall be transferred from the USB Port to the MOST network. The data stream consists of an MPEG2 Transport stream with packets of size 188 bytes. The maximal burst rate is 15 Mbit/s. The stream is transmitted on a single network channel.

    A/V Packetized Using the USB Port

    Port Configuration

    The USB Port is configured to use the standard USB 2.0 physical layer with a single Endpoint of direction Output .

    PhysicalLayer | DeviceInterfaces | StreamingIfEpOutCount | StreamingIfEpInCount
Standard | 0x08 | 1 | 0

    See Section 10.2 for further information on the available configuration options for the USB Port.

    DVB-T (15 Mbit/s)
    Resource Usage

    Section 10.3 and Section 19.5 describe the properties of a USB Port socket while using such a socket for transmitting AVPacketized data. In this example no padding is applied, thus FramesPerTransaction is set to 0xFFFF. A slot in the socket resource table is required for the USB socket.

    Feature: DVB-T (15 Mbit/s)

    Resource object that is created: A USB socket

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
30 - 1 = 29 |  |  |  |  |  |  |  |  |

    In order to route a DVB-T data stream to the network, a MOST network socket of direction Output is required. Section 19.5 describes the requirements regarding MOST system resources. The required size of the MOST socket is calculated using as below.

    A MOST socket requires a slot in the socket resource table as well as a routing channel.

    Resource object that is created: A MOST socket

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
30 - 1 = 29 |  |  |  |  |  |  |  |  |
29 - 1 = 28 |  |  |  |  |  |  |  | 16 - 1 = 15 | 334 - 40 = 294

    Section 19.4 describes the requirements when creating an AVPacketized connection between a peripheral port socket and a MOST network socket. Standard routing memory is required, where the amount is decided by the used MPEG2 Transport stream packet size. In this example we use a packet size of 188 bytes, which accordingly to Table 19-1 means that 564 bytes of standard routing memory are required. Since we use a USB socket, additional space is required from the aggregation routing memory. The amount is decided by indexing Table 19-2 with both the size of the MOST socket in combination with the value of parameter FramesPerTransaction used when creating the USB socket. In this example the size of the MOST socket is 40 bytes, and the FramesPerTransaction parameter was used with a value 0xFFFF, to disable padding. This gives a required amount of 1024 bytes from the aggregation memory. A socket connection requires a slot in the connection resource table.

    Resource object that is created: An AVPacketized connection

    Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16
 |  |  |  |  |  |  |  |  | 372
30 - 1 = 29 |  |  |  |  |  |  |  |  |
29 - 1 = 28 |  |  |  |  |  |  |  | 16 - 1 = 15 | 334 - 40 = 294
 | 14 - 1 = 13 |  |  |  | 4352 - 564 = 3788 | 8192 - 1024 = 7168 |  |  |

    Summary
     |  | Resource Tables |  |  |  | Routing Memory |  |  | Routing Channels |  | MOST System Resources
Feature | # of all Resources | Socket 40 | Connection 20 | Splitter 3 | Combiner 3 | Standard (Sync) 384 | Standard (AVPacketized) 4352 | Aggregation 8192 | Sync 32 | AVPacketized 16 | 372
1 x 16 bit Audio Stereo | # of used Resources | -2 | -1 |  |  | -4 |  |  | -1 |  | -4
 | # of left Resources | 38 | 19 |  |  | 380 |  |  | 31 |  | 368
2 Groups of 2 x 16 bit Audio Stereo | # of used Resources | -6 | -4 | -1 | -1 | -16 |  |  | -6 |  | -16
 | # of left Resources | 32 | 15 | 2 | 2 | 364 |  |  | 25 |  | 352
Multichannel 5.1, 24 bit Audio | # of used Resources | -2 | -1 |  |  | -20 |  |  | -1 |  | -18
 | # of left Resources | 30 | 14 |  |  | 344 |  |  | 24 |  | 334
DVB-T (15 Mbit/s) | # of used Resources | -2 | -1 |  |  |  | -564 | -1024 |  | -1 | -40
 | # of left Resources | 28 | 13 |  |  |  | 3788 | 7168 |  | 15 | 294

    List of Abbreviations

    List of Abbreviations

    The table below gives an overview of abbreviations used in this documentation. The entries are listed in alphabetical order.

    Table D-1: List of Abbreviations (Continued)
Abbreviation | Definition
BIST | Built-in Self-Test
cPHY | Coax electrical physical layer
DCI | Driver Control Interface
DUT | Device Under Test
EHC | External Host Controller
EHCI | External Host Controller Interface
ET | Enhanced Testability
EUI | Extended Unique Identifier
FBlock | Function Block
GPIO | General Purpose Input/Output
HSIC | High-Speed Inter-Chip
ICM | INIC Control Message
I 2 C | Inter-Integrated Circuit
INIC | Intelligent Network Interface Controller
IP | Internet Protocol
LLR | Low-Level Retry
LLRBC | Low-Level Retry Block Count
LSB | Least Significant Bit
MAC | Media Access Control
MCM | MOST Control Message
MDP | MOST Data Packet (16-bit addressing mode)
MediaLB | Media Local Bus
MEP | MOST Ethernet Packet (48-bit addressing mode)
MSB | Most Significant Bit
NCE | Network Change Event
NWM | NetworkMaster
oPHY | Optical physical layer
OUI | Organizationally Unique Identifier
PD | Primary Device
PhLSTT | Physical Layer Stress Test Tool
PM | Port Message
PML | Port Message Length
PMP | Port Message Protocol
POR | Power-on-Reset
QoS | Quality of Service
RBD | Ring Break Diagnosis
RCM | Remote Control Message
RMCK | Recovered Master Clock
SD | Secondary Device
SPI | Serial Peripheral Interface
UNICENS | UNIfied CENtralized Softwarestack
USB | Universal Serial Bus
ZLP | Zero-length packet

    API Functions in Numerical Order

    API Functions in Numerical Order

    FBlock DebugMessages

    FktID = 0x001, NIC_DebugMessage 268

    FBlock ExtendedNetworkControl

    FktID = 0x200, Hello 272

    FktID = 0x201, Welcome 276

    FktID = 0x202, Signature 280

    FktID = 0x203, Init 283

    FktID = 0x210, EnablePort 284

    FktID = 0x211, CableLinkDiagnosis 285

    FktID = 0x220, PhysicalLayerTest 287

    FktID = 0x221, PhysicalLayerTestResult 289

    FktID = 0x300, MemorySessionOpen 290

    FktID = 0x301, MemorySessionClose 292

    FktID = 0x302, MemoryRead 293

    FktID = 0x303, MemoryWrite 295

    FBlock INIC

    FktID = 0x001, Notification 163

    FktID = 0x220, DeviceStatus 166

    FktID = 0x221, DeviceVersion 168

    FktID = 0x222, DevicePowerOff 170

    FktID = 0x223, DeviceAttach 171

    FktID = 0x224, DeviceSync 172

    FktID = 0x520, MOSTNetworkStatus 174

    FktID = 0x521, MOSTNetworkConfiguration 178

    FktID = 0x523, MOSTNetworkFrameCounter 183

    FktID = 0x524, MOSTNetworkStartup 184

    FktID = 0x525, MOSTNetworkShutdown 186

    FktID = 0x526, MOSTNetworkRBD 187

    FktID = 0x527, MOSTNetworkRBDResult 188

    FktID = 0x52B, MOSTNetworkForceNotAvailable 189

    FktID = 0x52C, MOSTNetworkSystemDiagnosis 190

    FktID = 0x52D, MOSTNetworkSystemDiagnosisEnd 191

    FktID = 0x602, MOSTPortStatus 193

    FktID = 0x611, MOSTSocketCreate 195

    FktID = 0x621, MediaLBPortCreate 199

    FktID = 0x631, MediaLBSocketCreate 201

    FktID = 0x632, MediaLBPacketMuxSocketCreate 203

    FktID = 0x641, SPIPortCreate 205

    FktID = 0x651, SPISocketCreate 207

    FktID = 0x661, USBPortCreate 209

    FktID = 0x671, USBSocketCreate 211

    FktID = 0x680, StreamPortConfiguration 215

    FktID = 0x681, StreamPortCreate 218

    FktID = 0x683, StreamPortLoopback 220

    FktID = 0x691, StreamSocketCreate 222

    FktID = 0x6A1, RMCKPortCreate 225

    FktID = 0x6C1, I2CPortCreate 228

    FktID = 0x6C3, I2CPortRead 230

    FktID = 0x6C4, I2CPortWrite 232

    FktID = 0x701, GPIOPortCreate 235

    FktID = 0x703, GPIOPortPinMode 236

    FktID = 0x704, GPIOPortPinState 239

    FktID = 0x705, GPIOPortTriggerEvent 241

    FktID = 0x800, ResourceDestroy 244

    FktID = 0x801, ResourceInvalidList 246

    FktID = 0x802, ResourceMonitor 247

    FktID = 0x843, PacketAttachSockets 249

    FktID = 0x844, PacketDetachSockets 251

    FktID = 0x851, QoSPacketCreate 252

    FktID = 0x861, AVPacketizedCreate 255

    FktID = 0x871, SyncCreate 257

    FktID = 0x873, SyncMute 260

    FktID = 0x874, SyncDemute 261

    FktID = 0x881, DiscFramePhaseCreate 262

    FktID = 0x901, CombinerCreate 264

    FktID = 0x911, SplitterCreate 266

    FBlock NetBlock

    FktID = 0x000, FBlockIDs 154

    FktID = 0x002, NodePositionAddress 155

    FktID = 0x003, NodeAddress 156

    FktID = 0x004, GroupAddress 157

    FktID = 0x006, ShutDown 158

    FktID = 0x007, RetryParameters 159

    FktID = 0x013, EUI48 160

    FktID = 0x014, MOSTVersionInfo 161

    FktID = 0x405, RBDResult 162

    API Functions in Alphabetical Order

    API Functions in Alphabetical Order

    FBlock DebugMessages

    NIC_DebugMessage, FktID = 0x001 268

    FBlock ExtendedNetworkControl

    CableLinkDiagnosis, FktID = 0x211 285

    EnablePort, FktID = 0x210 284

    Hello, FktID = 0x200 272

    Init, FktID = 0x203 283

    MemoryRead, FktID = 0x302 293

    MemorySessionClose, FktID = 0x301 292

    MemorySessionOpen, FktID = 0x302 290

    MemoryWrite, FktID = 0x303 295

    PhysicalLayerTest, FktID = 0x220 287

    PhysicalLayerTestResult, FktID = 0x221 289

    Signature, FktID = 0x202 280

    Welcome, FktID = 0x201 276

    FBlock INIC

    AVPacketizedCreate, FktID = 0x861 255

    CombinerCreate, FktID = 0x901 264

    DeviceAttach, FktID = 0x223 171

    DevicePowerOff, FktID = 0x222 170

    DeviceStatus, FktID = 0x220 166

    DeviceSync, FktID = 0x224 172

    DeviceVersion, FktID = 0x221 168

    DiscFramePhaseCreate, FktID = 0x881 262

    GPIOPortCreate, FktID = 0x701 235

    GPIOPortPinMode, FktID = 0x703 236

    GPIOPortPinState, FktID = 0x704 239

    GPIOPortTriggerEvent, FktID = 0x705 241

    I2CPortCreate, FktID = 0x6C1 228

    I2CPortRead, FktID = 0x6C3 230

    I2CPortWrite, FktID = 0x6C4 232

    MediaLBPacketMuxSocketCreate, FktID = 0x632 203

    MediaLBPortCreate, FktID = 0x621 199

    MediaLBSocketCreate, FktID = 0x631 201

    MOSTNetworkConfiguration, FktID = 0x521 178

    MOSTNetworkForceNotAvailable, FktID = 0x52B 189

    MOSTNetworkFrameCounter, FktID = 0x523 183

    MOSTNetworkRBD, FktID = 0x526 187

    MOSTNetworkRBDResult, FktID = 0x527 188

    MOSTNetworkShutdown, FktID = 0x525 186

    MOSTNetworkStartup, FktID = 0x524 184

    MOSTNetworkStatus, FktID = 0x520 174

    MOSTNetworkSystemDiagnosis, FktID = 0x52C 190

    MOSTNetworkSystemDiagnosisEnd, FktID = 0x52D 191

    MOSTPortStatus, FktID = 0x602 193

    MOSTSocketCreate, FktID = 0x611 195

    Notification, FktID = 0x001 163

    PacketAttachSockets, FktID = 0x843 249

    PacketDetachSockets, FktID = 0x844 251

    QoSPacketCreate, FktID = 0x851 252

    ResourceDestroy, FktID = 0x800 244

    ResourceInvalidList, FktID = 0x801 246

    ResourceMonitor, FktID = 0x802 247

    RMCKPortCreate, FktID = 0x6A1 225

    SPIPortCreate, FktID = 0x641 205

    SPISocketCreate, FktID = 0x651 207

    SplitterCreate, FktID = 0x911 266

    StreamPortConfiguration, FktID = 0x680 215

    StreamPortCreate, FktID = 0x681 218

    StreamPortLoopback, FktID = 0x683 220

    StreamSocketCreate, FktID = 0x691 222

    SyncCreate, FktID = 0x871 257

    SyncDemute, FktID = 0x874 261

    SyncMute, FktID = 0x873 260

    USBPortCreate, FktID = 0x661 209

    USBSocketCreate, FktID = 0x671 211

    FBlock NetBlock

    EUI48, FktID = 0x013 160

    FBlockIDs, FktID = 0x000 154

    GroupAddress, FktID = 0x004 157

    MOSTVersionInfo, FktID = 0x014 161

    NodeAddress, FktID = 0x003 156

    NodePositionAddress, FktID = 0x002 155

    RBDResult, FktID = 0x405 162

    RetryParameters, FktID = 0x007 159

    ShutDown, FktID = 0x006 158

    List of Figures

    List of Figures

    Figure 2-1: Control Message Format 28

    Figure 2-2: PMP Payload 28

    Figure 2-3: Configuration Interface – EHC Controlled 31

    Figure 2-4: Configuration Interface – Remote Controlled 33

    Figure 2-5: Configuration Interface Modes 34

    Figure 2-6: Steps to Reach Attached Mode 36

    Figure 2-7: Remote Control Command Sequence 37

    Figure 2-8: Application Interface 39

    Figure 2-9: Application Interface Modes 41

    Figure 3-1: Power States 46

    Figure 3-2: Power State is U Normal 47

    Figure 3-3: Power State is U Low 48

    Figure 3-4: Power State is STP 49

    Figure 3-5: Power State is U Critical 50

    Figure 4-1: NetInterface State Diagram 51

    Figure 4-2: Physical Layer Test Flow 57

    Figure 6-1: State Diagram of a Monitored Connection 66

    Figure 6-2: EHC Implementation Proposal for Resource Handling without Muting 69

    Figure 6-3: EHC Implementation Proposal for Resource Handling with Muting 70

    Figure 6-4: Unlock with Temporarily Invalid Connection 71

    Figure 6-5: Permanently Invalidated Connection 72

    Figure 8-1: Packet Multiplexing 79

    Figure 10-1: Synchronous Bulk Transaction with Padding 86

    Figure 10-2: A/V Packetized Bulk Transaction with Padding 87

    Figure 10-3: A/V Packetized Bulk Transaction without Padding 87

    Figure 13-1: I²C Port Pin Connection 102

    Figure 13-2: I²C Write Transaction 103

    Figure 13-3: I²C Read Transaction 103

    Figure 13-4: Single Read Transaction 104

    Figure 13-5: Two-Staged Read Transaction 104

    Figure 13-6: 7-bit Address Write 106

    Figure 13-7: 7-bit Address Read 106

    Figure 13-8: 10-bit Address Write 107

    Figure 13-9: 10-bit Address Read 107

    Figure 13-10: Repeated Start 108

    Figure 13-11: I²C Read/Write 109

    Figure 13-12: I²C Write Burst Mode 109

    Figure 13-13: I²C Repeated Start 110

    Figure 14-1: Edge Sensitive Input 113

    Figure 14-2: Level Sensitive Input 113

    Figure 14-3: Sticky Input 114

    Figure 15-1: Bulk Transaction with a Combiner 116

    Figure 17-1: Control Connection 119

    Figure 17-2: Control Low-Level Retries 120

    Figure 18-1: MOST Data Packet Message Format 121

    Figure 18-2: MOST Ethernet Packet Message Format 121

    Figure 18-3: Packet Connection 123

    Figure 18-4: Read Register Command 126

    Figure 18-5: DCI Trigger Message Format 126

    Figure 18-6: QoS Connection 127

    Figure 19-1: Synchronous Connections 134

    Figure 19-2: Combiner Connections 137

    Figure 19-3: Splitter Connections 138

    Figure 19-4: A/V Packetized Connections 141

    Figure 19-5: DiscreteFrame Isochronous Streaming Phase Connections 146

    Figure 20-1: Driver Control Interface 149

    Figure 20-2: Polling Mechanism 152

    Figure A-1: EHC to INIC Connection Diagram 314

    Figure A-2: I²C Command/Response Sequence 314

    Figure A-3: Programming Sequence 316

    Figure A-4: Sequence to Enter and Leave the Program Mode 317

    Figure A-5: Firmware Memory 318

    Figure A-6: Firmware Version Read Sequence 319

    Figure A-7: Firmware Programming Sequence 320

    Figure A-8: Configuration Memory Section 321

    Figure A-9: Configuration Verification Sequence 321

    Figure A-10: Configuration String Version Read Sequence 322

    Figure A-11: Configuration Memory Programming Sequence 323

    Figure C-1: Streaming Applications and Peripheral Ports 336

    Figure C-2: Synchronous Streaming Using Streaming Port A and Streaming Port B 337

    Figure C-3: Synchronous Streaming Using the MediaLB Port 344

    Figure C-4: A/V Packetized Using the USB Port 347

    List of Tables

    List of Tables

    Table 2-1: PMP Channel Assignment 28

    Table 2-2: PMP Payload Format Field Description 29

    Table 2-3: Message Transmission Status 30

    Table 2-4: Limited Write Operations 38

    Table 3-1: Power States Signaled by PS0 and PS1 Pins 43

    Table 6-1: Object Type, Resource Identifier and Index 65

    Table 6-2: Mute Modes 67

    Table 6-3: Data Type, Routing Memory Resource Budget 74

    Table 6-4: Data Type, Routing Channel Resource Budget 74

    Table 8-1: Packet Multiplexing - Physical Channel Allocation 79

    Table 10-1: Endpoint Directions and Addresses 85

    Table 10-2: Device Descriptor 88

    Table 10-3: String Descriptor #0 89

    Table 10-4: String Descriptor #1 89

    Table 10-5: String Descriptor #2 89

    Table 10-6: String Descriptor #3 89

    Table 10-7: Configuration Descriptor 90

    Table 10-8: Other-Speed Configuration Descriptor 92

    Table 10-9: Device Qualifier Descriptor 92

    Table 14-1: GPIO Pin Configuration and Limitations 111

    Table 18-1: Allocated Bandwidth and Standard Routing Memory 128

    Table 19-1: IsocPacketSize and Standard Routing Memory 142

    Table 19-2: IsocPacketSize and Aggregation Routing Memory 142

    Table 20-1: Common Register 150

    Table 20-2: USB Register 150

    Table 21-1: NetBlock Functions 153

    Table 21-2: Device Management Functions 165

    Table 21-3: MOST Network Functions 173

    Table 21-4: Bandwidth Configurations 184

    Table 21-5: MOST Port Functions 192

    Table 21-6: MediaLB Port Functions 198

    Table 21-7: SPI Port Functions 204

    Table 21-8: USB Port Functions 208

    Table 21-9: Streaming Port Functions 214

    Table 21-10: I²C Port Functions 227

    Table 21-11: GPIO Port Functions 234

    Table 21-12: Resource Management Functions 243

    Table 21-13: Packet Connection Functions 248

    Table 21-14: Streaming Connection Functions 254

    Table 21-15: ExtendedNetworkControl Functions 271

    Table 21-16: Standard ErrorCodes and ErrorInfo 297

    Table 21-17: List of ErrorClasses 298

    Table 22-1: Configuration String – Properties and Default Values 309

    Table 22-2: Identification String – Properties and Default Values 311

    Table D-1: List of Abbreviations 351


UNICENS: List of Images

List of Images


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/cfg Directory Reference

  • src
  • cfg
cfg Directory Reference

Files

file | ucs_cfg.h
file | ucs_types_cfg.h
UNICENS data types definitions.
file | ucs_xrm_cfg.h
Configuration header file of the Extended Resource Manager (XRM).


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/core/irm Directory Reference

  • src
  • core
  • irm
irm Directory Reference

Files

file | ucs_epm.c
Implementation of the EndPoint Management.
file | ucs_epm.h
Internal header file of the EndPoint Manager.
file | ucs_epm_pv.h
Public header file of the Extended Resource Manager.
file | ucs_gpio.c
Implementation of the GPIO module.
file | ucs_gpio.h
Internal header file of the GPIO module.
file | ucs_gpio_pb.h
Public header file of the Gpio module.
file | ucs_i2c.c
Implementation of the I2C Module.
file | ucs_i2c.h
Internal header file of the I2C module.
file | ucs_i2c_pb.h
Public header file of the I2c module.
file | ucs_nsm.c
Implementation of the Node Scripting Management.
file | ucs_nsm.h
Internal header file of the Node Scripting Management.
file | ucs_nsm_pb.h
Public header file of the Node Script Management.
file | ucs_rm_pb.h
Public header file of the Routing Management.
file | ucs_rm_pv.h
Private header file of the Routing Management.
file | ucs_rsm.c
Implementation of the Sync Management.
file | ucs_rsm.h
Internal header file of the Remote Sync Manager.
file | ucs_rsm_pv.h
Public header file of the Extended Resource Manager.
file | ucs_rtm.c
Implementation of the Route Management.
file | ucs_rtm.h
Internal header file of the Route Manager.
file | ucs_rtm_pv.h
Public header file of the Extended Resource Manager.
file | ucs_xrm.c
Implementation of the Extended Resource Manager. This file contains the implementation of the basic functions of the class CExtendedResourceManager.
file | ucs_xrm.h
Include file of the Extended Resource Manager.
file | ucs_xrm_pb.h
Public header file of the Extended Resource Manager.
file | ucs_xrm_pv.h
Private header file of the Extended Resource Manager.
file | ucs_xrm_res.c
Implementation of the Extended Resource Manager. This file contains the implementation of the INIC Resource Management functions and result/error handlers.
file | ucs_xrmpool.c
Implementation of the Connection Storage Pool.
file | ucs_xrmpool.h
Internal header file of the Connection Storage Pool.


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/core/lib Directory Reference

  • src
  • core
  • lib
lib Directory Reference

Files

file | ucs_dl.c
Implementation of the doubly linked list.
file | ucs_dl.h
Internal header file of the doubly linked list.
file | ucs_fsm.c
Implementation of the Finite State Machine.
file | ucs_fsm.h
Internal header file of the Finite State Machine.
file | ucs_misc.c
Implementation of the library module which contains miscellaneous helper functions.
file | ucs_misc.h
Internal header file of the library module which contains miscellaneous helper functions.
file | ucs_obs.c
Implementation of the observer library module. The module consists of the two classes CSubject and CObserver.
file | ucs_obs.h
Internal header file of the observer library module. The module consists of the two classes CSubject and CObserver.
file | ucs_ret_pb.h
This header file contains standard return values used by UNICENS functions and methods.


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/core/ams Directory Reference

  • src
  • core
  • ams
ams Directory Reference

Files

file | ucs_amd.c
Implementation of Application Message Distributor.
file | ucs_amd.h
Internal header file of Application Message Distributor.
file | ucs_ams.c
Implementation of Application Message Service.
file | ucs_ams.h
Internal header file of Application Message Service.
file | ucs_ams_pb.h
Public header file of Application Message Service.
file | ucs_amsallocator.h
Internal header file of AMS Allocator Interface.
file | ucs_amsmessage.c
Implementation of Application Message Classes.
file | ucs_amsmessage.h
Internal header file of Application Message Classes.
file | ucs_amspool.c
Implementation of Application Message Pool.
file | ucs_amspool.h
Internal header file of Application Message Pools.
file | ucs_amtp.c
Implementation of Application Message Tx Pool.
file | ucs_amtp.h
Internal header file of Application Message Tx Pool.
file | ucs_segmentation.c
Implementation of AMS Segmentation Class.
file | ucs_segmentation.h
Internal header file of AMS Segmentation Class.


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/core/smm Directory Reference

  • src
  • core
  • smm
smm Directory Reference

Files

file | ucs_smm.c
Implementation of the class CStaticMemoryManager.
file | ucs_smm.h
Header file of the class CStaticMemoryManager.
file | ucs_smm_pb.h
Header file of the static memory manager plug-in.


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/core/inic Directory Reference

  • src
  • core
  • inic
inic Directory Reference

Files

file | ucs_attach.c
Implementation of CAttachService class.
file | ucs_attach.h
Declaration of CAttachService class.
file | ucs_bc_diag.c
Implementation of the BackChannel Diagnosis.
file | ucs_bc_diag.h
Internal header file of class CBackChannelDiag.
file | ucs_dec.c
Implementation of the Command Interpreter Module.
file | ucs_dec.h
Internal header file of the Command Decoder Module.
file | ucs_exc.c
Implementation of FBlock ExtendedNetworkControl.
file | ucs_exc.h
Internal header file of class CExc.
file | ucs_inic.c
Implementation of FBlock INIC.
file | ucs_inic.h
Internal header file of class CInic.
file | ucs_inic_pb.h
Public header file of class CInic.
file | ucs_inic_res.c
Implementation of FBlock INIC (resource management parts of INIC management)
file | ucs_nodedis.c
Implementation of the Node Discovery.
file | ucs_nodedis.h
Internal header file of class CNodeDiscovery.
file | ucs_prog.c
Implementation of the Programming Service.
file | ucs_prog.h
file | ucs_sys_diag.c
Implementation of the System Diagnosis class.
file | ucs_sys_diag.h
Internal header file of class CSysDiag.


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/core/net Directory Reference

  • src
  • core
  • net
net Directory Reference

Files

file | ucs_net.c
Implementation of the Network Management.
file | ucs_net.h
Internal header file of the Network Management.


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src Directory Reference

  • src
src Directory Reference

Directories

directory | api
directory | cfg
directory | core


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/core/base Directory Reference

  • src
  • core
  • base
base Directory Reference

Files

file | ucs_alm.c
Implementation of the API locking manager.
file | ucs_alm.h
Internal header file of the API locking module.
file | ucs_base.c
Implementation of the Base class.
file | ucs_base.h
Internal header file of the Base class.
file | ucs_eh.c
Implementation of the event handler.
file | ucs_eh.h
Internal header file of the event handler.
file | ucs_eh_pb.h
Public header file of the event handler.
file | ucs_scheduler.c
Implementation of the scheduler module. The module consists of the two classes CScheduler and CService.
file | ucs_scheduler.h
Internal header file of the scheduler module. The module consists of the two classes CScheduler and CService.
file | ucs_timer.c
Implementation of the timer management module.
file | ucs_timer.h
Internal header file of the timer management module.
file | ucs_trace.h
Internal header file of the trace interface.
file | ucs_trace_pb.h
Public header file of the trace interface.


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/core Directory Reference

  • src
  • core
core Directory Reference

Directories

directory | ams
directory | base
directory | cmd
directory | inic
directory | irm
directory | lib
directory | mgr
directory | net
directory | pms
directory | smm


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/core/mgr Directory Reference

  • src
  • core
  • mgr
mgr Directory Reference

Files

file | ucs_jobs.c
Implementation of Job classes.
file | ucs_jobs.h
Internal header file of Job classes.
file | ucs_mgr.c
Implementation of CManager class.
file | ucs_mgr.h
Internal header file of the CManager class.
file | ucs_nodeobserver.c
Implementation of CNodeObserver class.
file | ucs_nodeobserver.h
Internal header file of the CNodeObserver class.
file | ucs_nodeobserver_pb.h
Public header file of the CNodeObserver class.


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/api Directory Reference

  • src
  • api
api Directory Reference

Files

file | ucs_api.h
UNICENSV2 API include file.
file | ucs_class.c
Implementation of the UNICENS API.
file | ucs_class.h
Internal header file of UNICENS API class.
file | ucs_class_pb.h
Public header file of UNICENS API class.
file | ucs_factory.c
Implementation of the MNS Factory.
file | ucs_factory.h
Internal header file of the MNS Factory.
file | ucs_rules.h
UNICENSV2 API include file.


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/core/pms Directory Reference

  • src
  • core
  • pms
pms Directory Reference

Files

file | ucs_encoder.c
Implementation of message encoder.
file | ucs_encoder.h
Declaration of message encoder.
file | ucs_lld_pb.h
Declaration of the low-level driver interface.
file | ucs_lldpool.c
Implementation of LLD Message Pool.
file | ucs_lldpool.h
Internal header file of LLD Message Pool.
file | ucs_memory.h
Declaration of internal memory buffer.
file | ucs_memory_pb.h
Declaration of memory buffer and memory allocator.
file | ucs_message.c
Implementation of class message.
file | ucs_message.h
Declaration of class message.
file | ucs_message_pb.h
Declaration of public message types.
file | ucs_pmchannel.c
Implementation of Port Message Channel.
file | ucs_pmchannel.h
Internal header file of Port Message Channel.
file | ucs_pmcmd.c
Implementation of class CPmCommand.
file | ucs_pmcmd.h
Declaration of class CPmCommand.
file | ucs_pmevent.c
Implementation of Port Message Event Handler.
file | ucs_pmevent.h
Internal header file of Port Message Event Handler.
file | ucs_pmfifo.c
Implementation of Port Message FIFO.
file | ucs_pmfifo.h
Internal header file of Port Message FIFO.
file | ucs_pmfifos.c
Implementation of class CPmFifos.
file | ucs_pmfifos.h
Internal header file of class CPmFifos.
file | ucs_pmp.c
Implementation of Port Message Protocol.
file | ucs_pmp.h
Internal header file of Port Message Protocol.
file | ucs_pool.c
Implementation of message pool class.
file | ucs_pool.h
Declaration of message pool class.
file | ucs_telqueue.c
Implementation of class CTelQueue.
file | ucs_telqueue.h
Declaration of class CTelQueue.
file | ucs_transceiver.c
Implementation of class CTransceiver.
file | ucs_transceiver.h
Declaration of class CTransceiver.


UNICENS: C:/cibuild/tools/jenkins/workspace/unicens_v2_candidates/the_tag/src/core/cmd Directory Reference

  • src
  • core
  • cmd
cmd Directory Reference

Files

file | ucs_cmd.c
Implementation of the Command Interpreter.
file | ucs_cmd.h
Internal header file of the Command Interpreter Add-On.
file | ucs_cmd_pb.h
Header file of the Command Interpreter.


UNICENS: UCS_ADDR_INTERNAL

  • Tracing/Debugging Types
UCS_ADDR_BROADCAST_BLOCKING
UCS_ADDR_BROADCAST_UNBLOCKING
Ucs_MsgTxStatus_t
Ucs_OpType_t


UNICENS: UCS_ADDR_LOCAL_INIC

  • Tracing/Debugging Types
UCS_ADDR_BROADCAST_BLOCKING
UCS_ADDR_BROADCAST_UNBLOCKING
Ucs_MsgTxStatus_t
Ucs_OpType_t


UNICENS: UCS_ADDR_DEBUG

  • Tracing/Debugging Types
UCS_ADDR_BROADCAST_BLOCKING
UCS_ADDR_BROADCAST_UNBLOCKING
Ucs_MsgTxStatus_t
Ucs_OpType_t


UNICENS: Main Page

UNICENS API Documentation

This Help gives you a comprehensive overview of UNICENS V2.x.
An extraction of the most relevant topics is listed below - just click the links to get started.

API Reference

  • Initialization and Service
  • INIC
  • Network
  • Application Message Service
  • Command Interpreter
  • Manager
  • Node Discovery
  • Routing Management
  • Node Scripting
  • Peripheral Bus Interface
  • Low-Level Driver

Getting Started

Getting Started
  • Preparations
  • Initialization
  • Service
  • Synchronous vs. Asynchronous Results
  • Application Message Service
  • Command Interpreter
  • Networking Management
  • Manager
  • Node Discovery
  • Programming
  • BackChannel Diagnosis
  • Routing Management
  • Node Scripting
  • Low-Level Driver

Appendix

Appendix
  • Release History
  • OS81118 User's Guide


UNICENS: CProgramming Struct Reference

Data Fields
CProgramming Struct Reference

Structure of class CProgramming. More...

Data Fields

CInic * | inic
Reference to CInic object.
CExc * | exc
Reference to CExc object.
CBase * | base
Reference to CBase object.
CSingleObserver | prg_welcome
Observes the Welcome result.
CSingleObserver | prg_memopen
Observes the MemSessionOpen result.
CSingleObserver | prg_memwrite
Observes the MemoryWrite result.
CSingleObserver | prg_memclose
Observes the MemSessionClose result.
CMaskedObserver | prg_terminate
Observes events leading to termination.
CObserver | prg_nwstatus
Observes the MOST Network status.
CFsm | fsm
Node Discovery state machine.
CService | service
Service instance for the scheduler.
CTimer | timer
timer for monitoring messages
bool | neton
indicates Network availability
uint16_t | node_id
Position address of the node to be programmed.
uint16_t | target_address
Actual target address.
Ucs_Signature_t signature
Signature of the node to be programmed.
Ucs_Prg_SessionType_t session_type
Defines the memory access type.
Ucs_Prg_Command_t * command_list
Refers to array of programming tasks.
uint8_t | command_index
index for command_list
uint16_t | admin_node_address
Admin Node Address.
Ucs_Prg_ReportCb_t report_fptr
Report callback function.
uint16_t | session_handle
Unique number used to authorize memory access.
Ucs_Prg_Func_t current_function
last used function.
Prg_Error_t | error
stores the current error information

Detailed Description

Structure of class CProgramming.


UNICENS: CProgramming::prg_memwrite

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
CSingleObserver prg_memwrite

Observes the MemoryWrite result.


UNICENS: CProgramming::error

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
Prg_Error_t error

stores the current error information


UNICENS: CProgramming::prg_terminate

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
CMaskedObserver prg_terminate

Observes events leading to termination.


UNICENS: CProgramming::report_fptr

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
Ucs_Prg_ReportCb_t report_fptr

Report callback function.


UNICENS: CProgramming::current_function

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
Ucs_Prg_Func_t current_function

last used function.


UNICENS: CProgramming::signature

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
Ucs_Signature_t signature

Signature of the node to be programmed.


UNICENS: CProgramming::node_id

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
uint16_t node_id

Position address of the node to be programmed.


UNICENS: CProgramming::admin_node_address

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
uint16_t admin_node_address

Admin Node Address.


UNICENS: CProgramming::base

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
CBase* base

Reference to CBase object.


UNICENS: CProgramming::inic

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
CInic* inic

Reference to CInic object.


UNICENS: CProgramming::command_index

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
uint8_t command_index

index for command_list


UNICENS: CProgramming::neton

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
bool neton

indicates Network availability


UNICENS: CProgramming::exc

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
CExc* exc

Reference to CExc object.


UNICENS: CProgramming::session_handle

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
uint16_t session_handle

Unique number used to authorize memory access.


UNICENS: CProgramming::timer

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
CTimer timer

timer for monitoring messages


UNICENS: CProgramming::session_type

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
Ucs_Prg_SessionType_t session_type

Defines the memory access type.


UNICENS: CProgramming::prg_memopen

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
CSingleObserver prg_memopen

Observes the MemSessionOpen result.


UNICENS: CProgramming::target_address

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
uint16_t target_address

Actual target address.


UNICENS: CProgramming::prg_nwstatus

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
CObserver prg_nwstatus

Observes the MOST Network status.


UNICENS: CProgramming::prg_welcome

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
CSingleObserver prg_welcome

Observes the Welcome result.


UNICENS: CProgramming::command_list

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
Ucs_Prg_Command_t* command_list

Refers to array of programming tasks.


UNICENS: CProgramming::fsm

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
CFsm fsm

Node Discovery state machine.


UNICENS: CProgramming::service

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
CService service

Service instance for the scheduler.


UNICENS: CProgramming::prg_memclose

  • CProgramming
admin_node_address
base
command_index
command_list
current_function
error
exc
fsm
inic
neton
node_id
prg_memclose
prg_memopen
prg_memwrite
prg_nwstatus
prg_terminate
prg_welcome
report_fptr
service
session_handle
session_type
signature
target_address
timer
CSingleObserver prg_memclose

Observes the MemSessionClose result.


UNICENS: Ucs_Sd_Report_t Struct Reference

Data Fields
Ucs_Sd_Report_t Struct Reference

This structure holds the results of the system diagnosis. More...

Data Fields

Ucs_Sd_ResCode_t code
Result code.
Ucs_Sd_Segment_t segment
Information about tested segment.
uint8_t cable_link_info
Result of a cable link diagnosis.
Ucs_Sd_ErrCode_t err_info
Error codes, values are defined in Ucs_Sd_ErrCode_t.

Detailed Description

This structure holds the results of the system diagnosis.


UNICENS: Ucs_Sd_Report_t::err_info

  • Ucs_Sd_Report_t
cable_link_info
code
err_info
segment
Ucs_Sd_ErrCode_t err_info

Error codes, values are defined in Ucs_Sd_ErrCode_t.


UNICENS: Ucs_Sd_Report_t::cable_link_info

  • Ucs_Sd_Report_t
cable_link_info
code
err_info
segment
uint8_t cable_link_info

Result of a cable link diagnosis.

This attribute corresponds with the parameter Result of the INIC function ExtendedNetworkControl.CableLinkDiagnosis.


UNICENS: Ucs_Sd_Report_t::code

  • Ucs_Sd_Report_t
cable_link_info
code
err_info
segment
Ucs_Sd_ResCode_t code

Result code.


UNICENS: Ucs_Sd_Report_t::segment

  • Ucs_Sd_Report_t
cable_link_info
code
err_info
segment
Ucs_Sd_Segment_t segment

Information about tested segment.


UNICENS: Ucs_Sd_Segment_t Struct Reference

Data Fields
Ucs_Sd_Segment_t Struct Reference

This structure holds the segment information of the system diagnosis. More...

Data Fields

uint8_t | branch
Number of the currently tested branch. Numbering starts with 0 and corresponds to the port number if the Timing Master is a multi port INIC.
uint8_t | num
Segment number inside the tested branch. Numbering starts with 1.
Ucs_Signature_t source
Signature of the first node of the segment.
Ucs_Signature_t target
Signature of the second node of the segment.

Detailed Description

This structure holds the segment information of the system diagnosis.


UNICENS: Ucs_Sd_Segment_t::source

  • Ucs_Sd_Segment_t
branch
num
source
target
Ucs_Signature_t source

Signature of the first node of the segment.

This attribute corresponds with the parameter Signature of the INIC function INIC.Hello.


UNICENS: Ucs_Sd_Segment_t::branch

  • Ucs_Sd_Segment_t
branch
num
source
target
uint8_t branch

Number of the currently tested branch. Numbering starts with 0 and corresponds to the port number if the Timing Master is a multi port INIC.


UNICENS: Ucs_Sd_Segment_t::target

  • Ucs_Sd_Segment_t
branch
num
source
target
Ucs_Signature_t target

Signature of the second node of the segment.

This attribute corresponds with the parameter Signature of the INIC function ExtendedNetworkControl.Hello.


UNICENS: Ucs_Sd_Segment_t::num

  • Ucs_Sd_Segment_t
branch
num
source
target
uint8_t num

Segment number inside the tested branch. Numbering starts with 1.


UNICENS: Ucs_Signature_t Struct Reference

Data Fields
Ucs_Signature_t Struct Reference

This structure holds the signature of the Hello, Welcome and Signature messages. It supports the signature v1 only. More...

Data Fields

uint16_t | node_address
NodeAddress.
uint16_t | group_address
GroupAddress.
uint16_t | mac_47_32
MACAddress_47_32.
uint16_t | mac_31_16
MACAddress_31_16.
uint16_t | mac_15_0
MACAddress_15_0.
uint16_t | node_pos_addr
NodePositionAddress.
uint16_t | diagnosis_id
DiagnosisID.
uint8_t | num_ports
NumberOfPorts.
uint8_t | chip_id
ChipID.
uint8_t | fw_major
FWVersion_Major.
uint8_t | fw_minor
FWVersion_Minor.
uint8_t | fw_release
FWVersion_Release.
uint32_t | fw_build
FWVersion_Build.
uint8_t | cs_major
CSVersion_Major.
uint8_t | cs_minor
CSVersion_Minor.
uint8_t | cs_release
CSVersion_Release.

Detailed Description

This structure holds the signature of the Hello, Welcome and Signature messages. It supports the signature v1 only.


UNICENS: Ucs_Signature_t::cs_major

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint8_t cs_major

CSVersion_Major.


UNICENS: Ucs_Signature_t::fw_minor

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint8_t fw_minor

FWVersion_Minor.


UNICENS: Ucs_Signature_t::group_address

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint16_t group_address

GroupAddress.


UNICENS: Ucs_Signature_t::node_pos_addr

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint16_t node_pos_addr

NodePositionAddress.


UNICENS: Ucs_Signature_t::mac_47_32

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint16_t mac_47_32

MACAddress_47_32.


UNICENS: Ucs_Signature_t::cs_release

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint8_t cs_release

CSVersion_Release.


UNICENS: Ucs_Signature_t::chip_id

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint8_t chip_id

ChipID.


UNICENS: Ucs_Signature_t::node_address

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint16_t node_address

NodeAddress.


UNICENS: Ucs_Signature_t::fw_release

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint8_t fw_release

FWVersion_Release.


UNICENS: Ucs_Signature_t::fw_build

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint32_t fw_build

FWVersion_Build.


UNICENS: Ucs_Signature_t::mac_31_16

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint16_t mac_31_16

MACAddress_31_16.


UNICENS: Ucs_Signature_t::num_ports

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint8_t num_ports

NumberOfPorts.


UNICENS: Ucs_Signature_t::diagnosis_id

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint16_t diagnosis_id

DiagnosisID.


UNICENS: Ucs_Signature_t::fw_major

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint8_t fw_major

FWVersion_Major.


UNICENS: Ucs_Signature_t::mac_15_0

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint16_t mac_15_0

MACAddress_15_0.


UNICENS: Ucs_Signature_t::cs_minor

  • Ucs_Signature_t
chip_id
cs_major
cs_minor
cs_release
diagnosis_id
fw_build
fw_major
fw_minor
fw_release
group_address
mac_15_0
mac_31_16
mac_47_32
node_address
node_pos_addr
num_ports
uint8_t cs_minor

CSVersion_Minor.