Standard Service Routines
The following service routines are a part of the standard pyGestalt gestaltVirtualNodes class, and are necessary for supporting essential node behavior. These include associating virtual and physical nodes on the Gestalt network, syncronizing commands across nodes, and for loading new firmware.
statusRequest
- Port Number: 1
- Standard Mode: Unicast
- Physical Node Function: svcStatus()
Payload Byte |
Description |
Byte 0 |
Status (“b” = bootloader, “a” = application) |
Byte 1 |
Application Validity (170 if valid) |
- Status: Reports whether the physical node is running the bootloader or the application firmware.
- Application Validity: Reports if the application firmware loaded onto the node is valid, by returning the value of the “application valid” EEPROM flag. At the beginning of the bootloading process, an EEPROM flag is cleared. If the bootloader completes successfully, this flag is then set to 170.
bootCommandRequest
- Port Number: 2
- Standard Mode: Unicast
- Physical Node Function: svcBootloaderCommand()
- Not avaliable on Arduino-based nodes.
Payload Byte |
Description |
Byte 0 |
Command (0 = start bootloader, 1 = start application) |
- Command: Starts the bootloader or starts the application.
Payload Byte |
Description |
Byte 0 |
Response (5 = bootloader started, 9 = app. started) |
Byte 1 |
Page Number (Byte 0) |
Byte 2 |
Page Number (Byte 1) |
- Response: Indicates that either the bootloader or the application has been started
- Page Number: Has no meaning in the context of the bootloader command.
bootWriteRequest
- Port Number: 3
- Standard Mode: Unicast
- Physical Node Function: svcBootloaderData()
- Not avaliable on Arduino-based nodes.
Payload Byte |
Description |
Byte 0 |
Command (2 = write page) |
Byte 1 |
Page Number (Byte 0) |
Byte 2 |
Page Number (Byte 1) |
Byte 3 -> N |
Page Data |
- Command: This byte must be equal to 2 for the write command to be accepted.
- Page Number: The starting memory address of the page to be written
- Page Data: The contents of the memory page to be written
Payload Byte |
Description |
Byte 0 |
Response (1 = writing page now) |
Byte 1 |
Page Number (Byte 0) |
Byte 2 |
Page Number (Byte 1) |
- Response: This byte will equal 1 if the bootloader has successfully begun to write the memory page.
- Page Number: The starting memory address of the page currently being written
bootReadRequest
- Port Number: 4
- Standard Mode: Unicast
- Physical Node Function: svcBootloaderReadPage()
- Not avaliable on Arduino-based nodes.
Payload Byte |
Description |
Byte 0 |
Page Number (Byte 0) |
Byte 1 |
Page Number (Byte 1) |
- Page Number: The starting memory address of the requested page
Payload Byte |
Description |
Byte 0 |
Page Number (Byte 0) |
Byte 1 |
Page Number (Byte 1) |
Byte 2 -> N |
Page Data |
- Page Number: The starting memory address of the returned page data
- Page Data: The contents of the requested memory page
urlRequest
- Port Number: 5
- Standard Mode: Unicast
- Physical Node Function: svcRequestURL()
Payload Byte |
Description |
Byte 0 -> N |
Virtual Node URL |
- Virtual Node URL: An ASCII-encoded URL pointing to the location of the virtual node python file. This makes it possible for virtual node files to be automatically downloaded from a location of the node creator’s choosing.
setAddressRequest
- Port Number: 6
- Standard Mode: Multicast
- Physical Node Function: svcSetIPAddress()
Payload Byte |
Description |
Byte 0 |
New Address (Byte 0) |
Byte 1 |
New Address (Byte 1) |
- New Address: The new address that the identified node should assign to itself
Payload Byte |
Description |
Byte 0 -> N |
Virtual Node URL |
- Virtual Node URL: An ASCII-encoded URL pointing to the location of the virtual node python file. This makes it possible for virtual node files to be automatically downloaded from a location of the node creator’s choosing.
identifyRequest
- Port Number: 7
- Standard Mode: Unicast
- Physical Node Function: svcIdentifyNode()
- No response expected.
Inbound (Physical -> Virtual Node) Packet: None
syncRequest
- Port Number: 8
- Standard Mode: Multicast
- Physical Node Function: __
- No response expected.
Inbound (Physical -> Virtual Node) Packet: None
resetRequest
- Port Number: 255
- Standard Mode: Unicast
- Physical Node Function: svcResetNode()
- No response expected.
Inbound (Physical -> Virtual Node) Packet: None