IMCInter Module Communication
v5.5.11

Plan DB

PlanDB ID 556
Payload
≥ 10 bytes, variable
Packet
≥ 32 bytes
Source
unspecified
Category
Plan Supervision

Request/reply to plan database.

#Fields

Offset FieldTypeUnitRangeDescription
0 #typeType uint8_t Enumerated –

Indicates if the message is a request, or a reply to a previous request.

0DBT_REQUESTRequest
1DBT_SUCCESSReply -- Success
2DBT_FAILUREReply -- Failure
3DBT_IN_PROGRESSReply -- In Progress
1 #opOperation uint8_t Enumerated –

Indicates the operation affecting the DB.

The operation may relate to a single plan or the entire plan DB. For each request, a plan DB may reply with any number of 'in progress' replies followed by a success or a failure reply.

The 'op', 'request_id' and 'plan_id' fields of a request will be echoed in one or more responses to that request. The operation at stake also determines a certain type of the 'arg' field, and whether or not the 'plan_id' field needs to be set.

0DBOP_SETSet Plan

Set a plan in the DB. The 'plan_id' field identifies the plan, and a pre-existing plan with the same identifier, if any will be overwritten. For requests, the 'arg' field must contain a 'PlanSpecification' message.

1DBOP_DELDelete Plan

Delete a plan from the DB. The 'plan_id' field identifies the plan to delete.

2DBOP_GETGet Plan

Get a plan stored in the DB.The 'plan_id' field identifies the plan. Successful replies will yield a 'PlanSpecification' message in the 'arg' field.

3DBOP_GET_INFOGet Plan Info

Get DB state for a stored plan. The 'plan_id' field identifies the plan. Successful replies will yield a 'PlanDBInformation' message in the 'arg' field.

4DBOP_CLEARClear Database

Clear the entire DB.

5DBOP_GET_STATEGet Database State (Simple)

Get state of the entire DB. Successful replies will yield a 'PlanDBState' message in the 'arg' field but without individual plan information (in the 'plans_info' field of 'PlanDBState').

6DBOP_GET_DSTATEGet Database State (Detailed)

Get detailed state of the entire DB. Successful replies will yield a 'PlanDBState' message in the 'arg' field with individual plan information (in the 'plans_info' field of 'PlanDBState').

7DBOP_BOOTBoot Notification

PlanDB replies of this type are sent automatically during bootstrap.

2 #request_idRequest ID uint16_t – –

Request ID. This may be used by interfacing modules, e.g. using sequence counters, to annotate requests and appropriately identify replies

4 #plan_idPlan ID plaintext – –

Plan identifier for the operation, if one is required.

var #argArgument message<any> – –

Request or reply argument.

var #infoComplementary Information plaintext – –

Human-readable complementary information. For example this may be used to detail reasons for failure, or to report in-progress information.

#References

Carried inline by: