Messages (v0.1)

Nick Muggio

1 Messages

Throughout this section, the "Start" column is relative to the data within the same table. In general, messages will contain a header followed by a single message body. This header must contain the standard header, and may contain header extensions as needed.

1.1 Opcodes

Opcode Hex Message Source
0 0x00 Ping Both
8 0x08 Health Check Both
16 0x10 Register Runner Runner
24 0x18 Update Tags Runner
32 0x20 Send Job Master
40 0x28 Job Status Runner

1.2 Header Format

Standard Header
Start Size Type Field Description
0 1 UInt Major Version Major version number
1 1 UInt Minor Version Minor version number
2 2 Reserved Reserved for future use. Usually 0x00
4 4 UInt ID Identifies message source
8 1 Opcode Opcode Opcode for the remainder of this message
9 1 Header Fields Header Fields Bitfield of flags indicating presence of optional header fields
10 8 UInt Timestamp Message timestamp in seconds from Unix epoch
18 1 UInt Index Index of this message within the given timestamp

1.2.1 Optional Header Extensions

These header extensions are only present if the corresponding bit is set in the header fields field from the standard header. If multiple header extensions are present, they must appear in the same order as presented below.

1.2.1.1 Reply-To Header

Start Size Type Field Description
0 8 UInt Timestamp Message timestamp in seconds from Unix epoch
8 1 UInt Index Index of this message within the given timestamp

1.2.1.2 Extra Info Header

This header consists of one prefix record, followed by n message records.

Extra Info Header: Prefix
Start Size Type Field Description
0 1 UInt Count Number of messages to follow (n)
Extra Info Header: Message
Start Size Type Field Description
0 1 Info Type Info Type Type of this message
1 2 UInt Length Length of the error message (m)
4 m Char[] Message Contents of the error message. This does not need to be null-terminated

1.3 Message Bodies

1.3.1 Ping

Ping Request
Start Size Type Field Description
0 1 UInt Echo Byte to be echoed
Ping Reply
Start Size Type Field Description
0 1 UInt Echo Echoed byte

1.3.2 Health Check

Health Check Request
Start Size Type Field Description
0 TBR TBR TBR TBR
Health Check Reply
Start Size Type Field Description
0 TBR TBR TBR TBR

1.3.3 Register Runner

Register Runner Request
Start Size Type Field Description
0 TBR TBR TBR TBR
Register Runner Reply
Start Size Type Field Description
0 TBR TBR TBR TBR

1.3.4 Update Tags

Update Tags Request
Start Size Type Field Description
0 TBR TBR TBR TBR
Update Tags Reply
Start Size Type Field Description
0 TBR TBR TBR TBR

1.3.5 Send Job

Send Job Request
Start Size Type Field Description
0 TBR TBR TBR TBR
Send Job Reply
Start Size Type Field Description
0 TBR TBR TBR TBR

1.3.6 Job Status

Job Status Request: Periodic Update Format
Start Size Type Field Description
0 1 Job Status Job Status Current status of the running job
Job Status Reply
Start Size Type Field Description
0 TBR TBR TBR TBR

2 Enumerations

2.1 Info Type

Value Description
0 Information
1 Warning
2 Error

2.2 Job Status

Value Description
0 Unknown
1 Anomalous
2 In progress
8 Complete - Success
9 Complete - Inconclusive
11 Complete - Failure

2.3 Opcode

Value Description
0 Ping
8 Health Check
16 Register Runner
24 Update Tags
32 Send Job
40 Job Status

3 Bitfields

Unless otherwise specified, all bitfields are contained in one 8-bit integer. Bits that are not listed are unused, and are usually 0.

3.1 Header Fields

Bit Description
0 Reply-To
7 Extra Info