Skip to content

Commit

Permalink
Merge pull request #260 from org-arl/gateway-doc-msgs
Browse files Browse the repository at this point in the history
doc(gateway): adding predefined messages to Gateway doc
  • Loading branch information
notthetup committed Nov 11, 2022
2 parents d00500e + a27ef90 commit bfeb050
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion gateways/Gateways.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ All fjåge Gateway implementations should implement the following classes and me

### JSON messages

A fjåge Gateway connects to a fjåge master container and sends/receives messages to/from the master container. Each Gateway contains a Gateway Agent, which handles all the messages that are sent to the Gateway. A Gateway Agent must handle messages with these actions :
A fjåge Gateway connects to a fjåge master container and sends/receives messages to/from the master container. Each Gateway contains a Gateway Agent, which handles all the messages that are sent to the Gateway. A Gateway Agent must handle messages with these actions :

- `action: agents` : reply with the information about the Gateway Agent in the format `{agentIDs: [<>], agentTypes: [<>]}`.
- `action: agentForService` : reply if the Gateway Agent supports the service in the format `{agentID: <>}`.
Expand Down Expand Up @@ -163,3 +163,14 @@ A fjåge Gateway connects to a fjåge master container and sends/receives messag
- Creates a response message.
- Commonly not used directly, but extended using the _MessageClass_ function to create custom messages.
- Must add a `boolean` true field with a suffix `__isComplex` if the message contains any arrays of complex numbers. For example, if a field `signal` is a complex array, a field `signal__isComplex = true` is added to the JSON message. This is only applicable for languages that support complex numbers natively.

## Pre-defined Messages

A fjåge Gateway may export pre-defined Message Types for the Messages defined by fjåge. These are :

- `org.arl.fjage.shell.ShellExecReq`
- `org.arl.fjage.shell.GetFileReq`
- `org.arl.fjage.shell.PutFileReq`
- `org.arl.fjage.param.ParameterReq`
- `org.arl.fjage.shell.GetFileRsp`
- `org.arl.fjage.param.ParameterRsp`

0 comments on commit bfeb050

Please sign in to comment.