Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

Message Documentation

Tobias Mende edited this page Nov 20, 2013 · 11 revisions

This doc contains information of possible request and configure messages to send to the testbed and the possible responses.

WiseGroup Commands

Commands in this section can be called on any WiseGroup object and will affect the according nodes in the testbed. An optional callback block can be passed to every of these methods.

Configuration Methods

This section contains methods that can be used for modifying the state of nodes in a group. In OMF language these methods are used for creating FRCP configure messages. Speaking in programming language words, you can think of these methods as setter methods.

set_image

This method can be used for flashing a binary image onto the nodes.

  • Parameter:

    a Base64 encoded binary image

  • Callbacks:

    A callback handler for this command might receive responses as well as progress messages.

    Progress Messages:

    ---
    type: :progress
    requestId: <unique-request-id (Integer)>
    nodeUrns:
    - "<node urn of node sending the progress message>"
    progress: <progress in percent>

    Response Messages:

    ---
    type: :response
    requestId: <unique-request-id (Integer)>
    responses:
    - nodeUrn: "<node urn of node sending this response>"
      response: <Base64 encoded response> 
      statusCode: <the status code between 0 and 100 (progress in percent) or negative if error>
      errorMessage: <optional, if an error occured>
    - <further responses>

set_message

This method can be used to send a message to the nodes.

  • Parameter:

    An arbitrary sequence of bytes as Base64 encoded string

  • Callbacks:

    A callback handler receives an ACK or an error message as direct response to the call. Furthermore multiple upstream messages may be send as reaction to the downstream message.

    Response Messages:

    ---
    type: :response
    requestId: <unique-request-id (Integer)>
    responses:
    - nodeUrn: "<node urn of node sending this response>"
      statusCode: <the status code>
      errorMessage: <optional, if an error occured (e.g. node is not connected)>
    - <further responses>

    Upstream Messages:

    ---
    type: :message
    requestId: <unique-request-id (Integer)>
    nodeUrns:
    - "<node urn>"
    timestamp: <a timestamp>
    payload: <a Base64 encoded sequence of bytes>

reset

This method can be used to reset the nodes to their default state

  • Callbacks:

    Response Messages:

    ---
    type: :response
    requestId: <unique-request-id (Integer)>
    responses:
    - nodeUrn: "<node urn of node sending this response>"
      statusCode: <the status code>
      errorMessage: <optional, if an error occured (e.g. node is not connected)>
    - <further responses>

Request Methods

This section contains methods that can be used for getting the state of nodes in a group. In OMF language these methods are used for creating FRCP request messages. Speaking in programming language words, you can think of these methods as getter methods.

alive

This method can be used to check whether nodes are alive or not.

  • Callbacks:

    Response Messages:

    ---
    type: :response
    requestId: <unique-request-id (Integer)>
    responses:
    - nodeUrn: "<node urn of node sending this response>"
      statusCode: <the status code [0: not alive, 1: alive]>
      errorMessage: <optional, if an error occured (e.g. node is not connected)>
    - <further responses>

connected

This method can be used to check whether nodes are connected or not.

  • Callbacks:

    Response Messages:

    ---
    type: :response
    requestId: <unique-request-id (Integer)>
    responses:
    - nodeUrn: "<node urn of node sending this response>"
      statusCode: <the status code [0: not connected, 1: connected]>
      errorMessage: <optional, if an error occured (e.g. node is not connected)>
    - <further responses>

Other Messages

Upstream Messages

In this section we'll describe the format of messages beeing send by the testbed and the nodes in your groups. You'll receive these messages on the group topic of every group containing at least one affected node. Due to the fact that these messages don't have a request id, only the default callback of the affected groups is called.

nodes_attached

This message is send if at least one node is attached.

---
type: :nodes_attached
nodeUrns:
- "<node urn>"
timestamp: <timestamp of this event>
reason: "Some nodes in this group were attached."

nodes_detached

This message is send if at least one node is detached.

---
type: :nodes_detached
nodeUrns:
- "<node urn>"
timestamp: <timestamp of this event>
reason: "Some nodes in this group were detached."

notification

This message is send for notifications comming from the nodes.

---
type: :notification
nodeUrns:
- "<node urn>"
timestamp: <timestamp of this event>
message: "<The notification>"
Clone this wiki locally