Skip to content

Status Codes⚓︎

Error codes should be used as CONSTANTS and the programmer need not worry about the value they hold. To to validate that a connection was connected, you will implement something like

connection_status = ipg::get
if (ipg::CONNECTED != connection_status) {
    print("The connection is not connected")
}

Get the last error⚓︎

If an error status code is returned, a user friendly error description should have been set in the code. To access this error description, you can call ipg::get_last_error().

General⚓︎

Error Code Description
OK Everything is OK, no errors
INVALID_UUID A UUID was provided that doesn't match any current connection
INVALID_ARGUMENT A general error was detected because a provided argument was not correct
CHANNEL_OUT_OF_RANGE This is returned when a provided channel is not within the range of channels present on the device
SEND_FAILED Returned when the send fails
INVALID_COMMAND Returned if the given command is not valid

Connection⚓︎

Error Code Description
NOT_CONNECTED The specified connection is currently Not Connected
INVALID_IP_ADDRESS An incorrectly formatted IP Address
INVALID_PORT A port number that is out of range. JMP is 9220 by default, but can be changed. Valid port numbers are 1025 - 65535.
CONNECTING Returned while the socket connection is in progress
CONNECTED Returned when the socket is connected
CONNECTION_FAILED Returned when the connection attempt was unsuccessful
CONNECTION_LOST Returned when the client gracefully closes the connection or the client is no longer available
DISCONNECTING Returned when the connection is being disconnected
DISCONNECTED Returned after the connection has been disconnected. As of now there is nothing more that can be done with a disconnected connection

Authentication⚓︎

Error Code Description
NOT_AUTHENTICATED This connection has not yet attempted to authenicate
AUTHENTICATING This connection is currently in the process of authenticating
AUTHENTICATION_FAILED Authentication has been attempted and has failed. The JMP connection closes after 3 failures
ADMINISTRATOR The connection has been authenticated with administrator privileges
USER The connection has been authenticated with user privileges
GUEST The connection has been authenticated with guest privileges
NO_ADMINISTRATOR_PRIVILEGES A function was called that requires the connection to have administrator privileges
NO_CONTROL_PRIVILEGES A function was called that requires the connection to have control privileges. Control priviles are granted to users or administrators

External Modules⚓︎

Error Code Description
EIGHT_BIT_TEMPERATURE_PROBE No Longer Supported
TWELVE_BIT_TEMPERATURE_PROBE Type 0x28. Rugged External Temperature Sensor
ENVIRONMENTAL_SENSOR Type 0x7E. External Humidity/Temperature Sensor
OCTAL_INPUT_MODULE Type 0xF8.
THREE_CHANNEL_DIMMER Type 0xF9. 3 Channel LED Dimmer Expansion Module System
CONTROL_PANEL Type 0xFA. Control Panel
FOUR_RELAY_OUT_MODULE Type 0xFB. Power 4 Relay Output Expansion Module (up to 120/240VAC @ 10 amps)
RTD_MODULE No Longer Supported
TEN_VOLT_MODULE Type 0xFC. 10 VDC Analog Expansion Module
FOUR_TWENTY_MILLIAMP_MODULE Type 0xFE. 4 - 20 mA Analog Expansion Module
INTERNAL Type 0xFF.
dsgf