NPI Peripheral Sensor Controller Configuration SubSystem[edit]
This page describes how to use the Sensor Controller Configuration (SCC) API to interface with the Sensor Controller over the Unified Network Processor Interface (NPI).
Sensor Controller Configuration over NPI[edit]
Following is the current available APIs, list may be expanded. All APIs are asynchronous requests made by the host that have a asynchronous confirmation or response.
Two requests made by the host enables periodic data packages responses from the Sensor Controller. These responses are NPISSS_SCC_structLoggingDataPackage() and NPISSS_SCC_reportStructMemberDataPackage().
Initiated by Host[edit]
Initiated by Sensor Controller[edit]
The header color signifies the direction of communication, as follows:
From Sensor Controller
|
Serialization
|
From Host[edit]
|
requestStruct(uint8 taskId, uint8 structId, uint16 size) - AREQ
|
Byte 0 - 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6 - 7
|
Length
|
Type / Sub-System
|
Peripheral SSS + Command ID
|
Parameters
|
0x04
|
0x50
|
0x21
|
taskId
|
structId
|
size
|
|
setStruct(uint8 taskId, uint8 structId, uint16 size, uint8 *struct) - AREQ
|
Byte 0 - 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6-7
|
Byte 8 - (8 + size)
|
Length
|
Type / Sub-System
|
Peripheral SSS + Command ID
|
Parameters
|
0x04 + size
|
0x50
|
0x23
|
taskId
|
structId
|
size
|
*struct
|
|
structLoggingStatus(uint8 status, uint8 taskId, uint8 structId) - AREQ
|
Byte 0 - 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
|
|
Length
|
Type / Sub-System
|
Peripheral SSS + Command ID
|
Parameters
|
|
|
0x03
|
0x50
|
0x25
|
status *
|
taskId
|
structId
|
*
|
STOP_STRUCT_LOGGING:0x00 PAUSE_STRUCT_LOGGING:0x01 START_STRUCT_LOGGING:0x02
|
|
reportStructMember(uint8 status, uint8 taskId, uint8 structId, uint16 offset, uint16 size) - AREQ
|
* Offset is the number of bytes padding the member, starting from the first element in the parent struct.
|
Byte 0 - 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7 - 8
|
Byte 9 - 10
|
Length
|
Type / Sub-System
|
Peripheral SSS + Command ID
|
Parameters
|
** REPORT_MEMBER_STRUCT_START: 0x00 REPORT_MEMBER_STRUCT_STOP: 0x01
|
0x07
|
0x50
|
0x28
|
status **
|
taskId
|
structId
|
offset *
|
size
|
|
Response from Network Processor[edit]
pingResp(uint8 *checksum) - AREQ
|
Byte 0 - 1
|
Byte 2
|
Byte 3
|
Byte 4
|
*
|
N is the number of tasks in the Sensor Controller. N numbers of checksums are sent back to the host (1 for each task, 2 bytes each).
Checksum is calculated as the sum of: ((10 * (taskId + 1) * structId) * structSize) for all four structs related to a task
|
Length
|
Type / Sub-System
|
Peripheral SSS + Command ID
|
Parameters
|
N * 2 (*)
|
0x50
|
0x2B
|
*checksum
|
|
requestStructResp(uint8 status, uint8 taskId, uint8 structId, uint16 size, uint8 *struct) - AREQ
|
|
Byte 0 - 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
Byte 7 - 8
|
Byte 9 - (9 + size)
|
Length
|
Type / Sub-System
|
Peripheral SSS + Command ID
|
Parameters
|
* REQUEST_STRUCT_OK: 0x02 REQUEST_STRUCT_ERROR: 0x03
|
0x05 + size
|
0x50
|
0x22
|
status *
|
taskId
|
structId
|
size
|
struct data
|
|
setStructCnf(uint8 status, uint8 taskId, uint8 structId) - AREQ
|
|
Byte 0 - 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
|
|
Length
|
Type / Sub-System
|
Peripheral SSS + Command ID
|
Parameters
|
*
|
SET_STRUCT_OK:0x02 SET_STRUCT_ERROR:0x03
|
0x03
|
0x50
|
0x24
|
status *
|
taskId
|
structId
|
|
|
structLoggingStatusCnf(uint8 status) - AREQ
|
Byte 0 - 1
|
Byte 2
|
Byte 3
|
Byte 4
|
|
|
Length
|
Type / Sub-System
|
Peripheral SSS + Command ID
|
Parameters
|
*
|
STRUCT_LOGGING_OK: 0x00 STRUCT_LOGGING_ERROR: 0x01
|
0x01
|
0x50
|
0x26
|
status *
|
|
|
structLoggingDataPackage(uint8 taskId, uint8 structId, uint8 *(N structs)) - AREQ
|
|
Byte 0 - 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6 - (6 + ((size of struct) * N))
|
|
|
Length
|
Type / Sub-System
|
Peripheral SSS + Command ID
|
Parameters
|
*
|
N is the number of structs in the package. It is up to the host to determine how many structs that is received.
|
0x02 + ((size of struct) * N)
|
0x50
|
0x27
|
taskId
|
structId
|
*(N structs)
|
|
|
reportStructMemberCnf(uint8 status, uint8 taskId, uint8 structId) - AREQ
|
|
Byte 0 - 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6
|
|
|
Length
|
Type / Sub-System
|
Peripheral SSS + Command ID
|
Parameters
|
*
|
REPORT_MEMBER_STRUCT_OK:0x02 REPORT_MEMBER_STRUCT_ERROR:0x03
|
0x03
|
0x50
|
0x29
|
status *
|
taskId
|
structId
|
|
|
reportStructMemberDataPackage(uint8 taskId, uint8 structId, uint16 offset, uint8 *(N structs)) - AREQ
|
|
|
Byte 0 - 1
|
Byte 2
|
Byte 3
|
Byte 4
|
Byte 5
|
Byte 6 - 7
|
Byte 8 - (8 + ((size of reported member) * N))
|
*
|
N is the number of reports in the package. It is up to the host to determine how many reports that is received. Offset is the number of bytes padding the member, starting from the first element in the parent struct.
|
Length
|
Type / Sub-System
|
Peripheral SSS + Command ID
|
Parameters
|
|
0x04 + ((size of reported member) * N)
|
0x50
|
0x2A
|
taskId
|
structId
|
offset
|
*(N struct member data)
|
|
|