PORT_CONNECT
(edit this)
  • System usage: #define PORT_CONNECT 608
  • Application usage: #define APP_PORT_CONNECT -1608
  • Processed by: core services bus (_bonds)

Description: The device specified by the provided key wishes to connect to the port of type specified by the supplied string argument. The CSB will handle this as follows:

1. If a device has sent a 607 (PORT) message indicating that it can handle this, reply with the light bus message port <type> <key>; this will redirect the connecting device to contact that key instead. The port key specified here is not necessarily the particle target itself; it should be the root of the attachment responsible for handling the real port, which is the particle target.

2. If there is no supported device, the controller will respond immediately with the real-port message.

3. If the key supplied is NULL_KEY and there is no device that supports the specified port type, the controller will clean up on its own. No further light bus messages are emitted.

4. If the key supplied is NULL_KEY and there is a device that supports the specified port type, the controller will tell the device to clean up by sending it a port-disconnect <type> message.