opCOM_READY (HARDWARE, *pNAME)
- Test if communication is busy
- Dispatch status may be set to BUSYBREAK
- If name is 0 then own adapter status is evaluated
- Parameters
-
(DATA8) | HARDWARE - Hardware Transport Layer
|
(DATA8*) | *pNAME - Name of the remote/own device
opCOM_TEST (HARDWARE, *pName, BUSY) |
- Test if communication is busy
- Dispatch status is set to NOBREAK
If name is 0 then own adapter busy status is returned
- Parameters
-
- Returns
- (DATA8) BUSY - BUSY flag (0 = Ready, 1 = Busy)
opCOM_READ (CMD, DUMMY, *IMAGE, *GLOBAL, FLAG)
- Communication read
Dispatch status unchanged
- Parameters
-
- Returns
- (DATA32) *IMAGE - Address of image
-
(DATA32) *GLOBAL - Address of global variables
-
(DATA8) FLAG - Flag that tells if image is ready
opCOM_WRITE (CMD, *IMAGE, *GLOBAL, STATUS)
- Communication write
Dispatch status unchanged
- Parameters
-
- Returns
- (DATA32) *IMAGE - Address of image
-
(DATA32) *GLOBAL - Address of global variables
-
(DATA8) STATUS - Execution status of the direct command
opMAILBOX_OPEN (NO, BOXNAME, TYPE, FIFOSIZE, VALUES)
- Open a mail box on the brick
Dispatch status can return FAILBREAK
- Parameters
-
(DATA8) | NO - Reference ID for the mailbox. Maximum number of mailboxes is 30
|
(DATA8) | BOXNAME - Zero terminated string with the mailbox name
|
(DATA8) | TYPE - Data type of the content of the mailbox TYPE enum
|
(DATA8) | FIFOSIZE - Not used
|
(DATA8) | VALUES - Number of values of the type (specified by TYPE).
|
If data type DATA_S is selected then it requires that a zero terminated string is send.
Maximum mailbox size is 250 bytes. I.e. if type is string (DATA_S) then there can only be 1 string
of maximum 250 bytes (incl. zero termination), or if array (DATA_A), then array size cannot be
larger than 250 bytes
opMAILBOX_WRITE (BRICKNAME, HARDWARE, BOXNAME, TYPE, VALUES, ..)
- Write to mailbox in remote brick
Dispatch status can return FAILBREAK
If Brick name is left empty (0) then all connected devices will
receive the mailbox message
- Parameters
-
(DATA8) | BRICKNAME - Zero terminated string name of the receiving brick
|
(DATA8) | HARDWARE - Transportation media
|
(DATA8) | BOXNAME - Zero terminated string name of the receiving mailbox
|
(DATA8) | TYPE - Data type of the values TYPE enum
|
(DATA8) | VALUES - Number of values of the specified type to send
if VALUES != 0 then |
(TYPE) | x VALUES - Data to be sent to the mailbox
If string type (DATA_S) data is to be transmitted then a zero terminated string is
expected. |
If array type data (DATA_A) is to be transmitted then the number of bytes to be send
is equal to the array size
opMAILBOX_READ (NO, LENGTH, VALUES)
- Read data from mailbox specified by NO
Dispatch status can return FAILBREAK
- Parameters
-
(DATA8) | NO - Messagebox ID of the message box you want to read
|
(DATA16) | LENGTH - Maximum bytes to be read
|
(DATA8) | VALUES - Number of value to read
|
- Returns
- (Type specified in open) VALUE - Data from the message box
The type of Value is specified by mailbox open byte code.
opMAILBOX_TEST (NO, BUSY)
- Tests if new message has been read
Dispatch status can return FAILBREAK
- Parameters
-
(DATA8) | NO - Reference ID mailbox number
|
- Returns
- (DATA8) BUSY - If Busy = TRUE then no new messages are received
opMAILBOX_READY (NO)
- Waiting from message to be read
Dispatch status can return FAILBREAK
- Parameters
-
(DATA8) | NO - Reference ID mailbox number
opMAILBOX_CLOSE (NO) |
- Closes mailbox indicated by NO
Dispatch status can return FAILBREAK
- Parameters
-
(DATA8) | NO - Reference ID mailbox number
opCOM_WRITEFILE (HARDWARE, *REMOTE_NAME, *FILE_NAME, FILE_TYPE) |
- Sends a file or folder to remote brick
- Remote brick is specified by remote brick name
Dispatch status can return FAILBREAK
- Parameters
-
(DATA8) | HARDWARE - Hardware Transport Layer
|
(DATA8) | *REMOTE_NAME - Pointer to remote brick name
|
(DATA8) | *FILE_NAME - File/folder name to send
|
(DATA8) | FILE_TYPE - File or folder type to send
opCOM_GET (CMD, ....) |
- Communication get entry
Dispatch status can return FAILBREAK
- Parameters
-
- CMD = GET_ON_OFF
Get active state
- Parameters
-
- Returns
- (DATA8) ACTIVE - Active [0,1]
- CMD = GET_VISIBLE
Get visibility state
- Parameters
-
- Returns
- (DATA8) VISIBLE - Visible [0,1]
- CMD = GET_RESULT
Get status. This command gets the result of the command that
is being executed. This could be a search or a connection
request.
- Parameters
-
- Returns
- (DATA8) RESULT - Results
- CMD = GET_PIN
Get pin code. For now "1234" is returned
- Parameters
-
(DATA8) | HARDWARE - Hardware Transport Layer
|
(DATA8) | NAME - First character in character string
|
(DATA8) | LENGTH - Max length of returned string
|
- Returns
- (DATA8) PINCODE - First character in character string
- CMD = SEARCH_ITEMS
Get number of item from search. After a search has been completed,
SEARCH ITEMS will return the number of remote devices found.
- Parameters
-
- Returns
- (DATA8) ITEMS - No of items in seach list
- CMD = SEARCH_ITEM
Get search item informations. Used to retrieve the item information
in the search list
- Parameters
-
(DATA8) | HARDWARE - Hardware Transport Layer
|
(DATA8) | ITEM - Item - index in search list
|
(DATA8) | LENGTH - Max length of returned string
|
- Returns
- (DATA8) NAME - First character in character string
-
(DATA8) PARRED - Parred [0,1]
-
(DATA8) CONNECTED - Connected [0,1]
-
(DATA8) TYPE - Bluetooth Device Types
-
(DATA8) VISIBLE - Visible [0,1]
- CMD = FAVOUR_ITEMS
Get no of item in favourite list. The number of paired devices, not
necessarily visible or present devices
- Parameters
-
- Returns
- (DATA8) ITEMS - No of items in list
- CMD = FAVOUR_ITEM
Get favourite item informations. Used to retrieve the item information
in the favourite list. All items in the favourite list are paired devices
- Parameters
-
(DATA8) | HARDWARE - Hardware Transport Layer
|
(DATA8) | ITEM - Item - index in favourite list
|
(DATA8) | LENGTH - Max length of returned string
|
- Returns
- (DATA8) NAME - First character in character string
-
(DATA8) PARRED - Parred [0,1]
-
(DATA8) CONNECTED - Connected [0,1]
-
(DATA8) TYPE - Bluetooth Device Types
- CMD = GET_ID
Get bluetooth address information
- Parameters
-
- Returns
- (DATA8) STRING - First character in BT adr string
- CMD = GET_BRICKNAME
Gets the name of the brick
- Parameters
-
(DATA8) | LENGTH - Max length of returned string
|
- Returns
- (DATA8) NAME - First character in brick name
- CMD = GET_NETWORK
Gets the network information. WIFI only
- Parameters
-
- Returns
- (DATA8) NAME - First character in AP name
-
(DATA8) MAC - First character in MAC adr string
-
(DATA8) IP - First character in IP no string
- CMD = GET_PRESENT
Return if hardare is present. WIFI only
- Parameters
-
- Returns
- (DATA8) OK - Present [0,1]
- CMD = GET_ENCRYPT
Returns the encryption mode of the hardware. WIFI only
- Parameters
-
- CMD = GET_INCOMMING
Returns the encryption mode of the hardware. Bluetooth only
- Parameters
-
(DATA8) | HARDWARE - Hardware Transport Layer
|
(DATA8) | LENGTH - Max length of returned string
|
(DATA8) | NAME - First character in name
opCOM_SET (CMD, ....) |
- Communication set entry
Dispatch status can return FAILBREAK
- Parameters
-
- CMD = SET_MODE2
Set active mode state, either active or not
- Parameters
-
- CMD = SET_ON_OFF
Set active state, either on or off
- Parameters
-
- CMD = SET_VISIBLE
Set visibility state - Only available for bluetooth
- Parameters
-
- CMD = SET_SEARCH
Control search. Starts or or stops the search for remote devices
- Parameters
-
- CMD = SET_PIN
Set pin code. Set the pincode for a remote device.
Used when requested by bluetooth.
not at this point possible by user program
- Parameters
-
*(DATA8) | HARDWARE - Hardware Transport Layer
|
(DATA8) | NAME - First character in character string
|
(DATA8) | PINCODE - First character in character string
|
- CMD = SET_PASSKEY
Set pin code. Set the pincode for a remote device.
Used when requested by bluetooth.
not at this point possible by user program
- Parameters
-
- CMD = SET_CONNECTION
Control connection. Initiate or closes the connection request to a
remote device by the specified name
- Parameters
-
(DATA8) | Hardware - Hardware Transport Layer
|
*(DATA8) | NAME - First character in Name
|
(DATA8) | CONNECTION - Connect [0,1], 1 = Connect, 0 = Disconnect
|
- CMD = SET_BRICKNAME
Sets the name of the brick
- Parameters
-
(DATA8) | NAME - First character in character string
|
- CMD = SET_MOVEUP
Moves the index in list one step up. Used to re-arrange WIFI list
Only used for WIFI
- Parameters
-
- CMD = SET_MOVEDOWN
Moves the index in list one step down. Used to re-arrange WIFI list
Only used for WIFI
- Parameters
-
- CMD = SET_ENCRYPT
Moves the index in list one step down. Only used for WIFI
- Parameters
-
- CMD = SET_SSID
Sets the SSID name. Only used for WIFI
- Parameters
-
- Removes a know remote device from the brick
- Dispatch status can return FAILBREAK
- Parameters
-