CSP Management Protocol (CMP)

File: csp/csp_cmp.h

Description: CSP Management Protocol (CMP).

Defines

CSP_CMP_REPLY
[source]

CMP reply.

CSP_CMP_IDENT
[source]

Request identification, compile time, revision, hostname and model.

CSP_CMP_ROUTE_SET_V1
[source]

Set/configure routing.

CSP_CMP_IF_STATS
[source]

Request interface statistics.

CSP_CMP_PEEK
[source]

Peek/read data from memory.

CSP_CMP_POKE
[source]

Poke/write data from memory.

CSP_CMP_CLOCK
[source]

Get/set clock.

CSP_CMP_ROUTE_SET_V2
[source]

Set/configure routing.

CSP_CMP_IDENT_REV_LEN
[source]

CMP identification - max revision length.

CSP_CMP_IDENT_DATE_LEN
[source]

CMP identification - max date length.

CSP_CMP_IDENT_TIME_LEN
[source]

CMP identification - max time length.

CSP_CMP_ROUTE_IFACE_LEN
[source]

CMP interface statistics - max interface name length.

CSP_CMP_PEEK_MAX_LEN
[source]

CMP peek/read memeory - max read length.

CSP_CMP_POKE_MAX_LEN
[source]

CMP poke/write memeory - max write length.

MACROS

CMP_SIZE(_memb)
[source]

Macro for calculating total size of management message.

CMP_MESSAGE(_code, _memb)
[source]

Macro for defining management handling function.

Interface Functions

int csp_cmp(uint16_t node, uint32_t timeout, uint8_t code, int msg_size, struct csp_cmp_message *msg)
[source]

Generic send management message request.

Parameters:
  • node – address of subsystem.

  • timeout – timeout in mS to wait for reply..

  • code – request code.

  • msg_size – size of msg.

  • msg – data.

Returns:

#CSP_ERR_NONE on success, otherwise an error code

static inline int csp_cmp_peek(uint16_t node, uint32_t timeout, struct csp_cmp_message *msg)
[source]

Peek (read) memory on remote node.

Parameters:
  • node – address of subsystem.

  • timeout – timeout in mS to wait for reply..

  • msg – memory address and number of bytes to peek. (msg peeked/read memory)

Returns:

#CSP_ERR_NONE on success, otherwise an error code.

static inline int csp_cmp_poke(uint16_t node, uint32_t timeout, struct csp_cmp_message *msg)
[source]

Poke (write) memory on remote node.

Parameters:
  • node – address of subsystem.

  • timeout – timeout in mS to wait for reply..

  • msg – memory address, number of bytes and the actual bytes to poke/write.

Returns:

#CSP_ERR_NONE on success, otherwise an error code.