openHAB - RED Brick

Bemerkung

Die openHAB-Dokumentation ist nur auf Englisch verfügbar.

Warnung

The openHAB bindings are still in beta, but the development was stopped.

This is the description of the openHAB API bindings for the RED Brick. General information and technical specifications for the RED Brick are summarized in its hardware description.

An installation guide for the openHAB API bindings is part of their general description.

Channels

Actions

Actions can be used in rules by creating an action object. All actions return a Map<String, Object>. Returned values can be accessed by name, sometimes the type deduction needs some hints, as shown below:

val actions = getActions("tinkerforge", "tinkerforge:brickred:[UID]")
val hwVersion = actions.brickREDGetIdentity().get("hardwareVersion") as short[]
logInfo("Example", "Hardware version: " + hwVersion.get(0) + "." + hwVersion.get(1) + "." + hwVersion.get(2))

Advanced Actions

brickREDCreateSession(long lifetime)
Parameters:
  • lifetime – Type: long, Range: [0 to 232 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • sessionId – Type: int, Range: [0 to 216 - 1]

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDExpireSession(int sessionId)
Parameters:
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDExpireSessionUnchecked(int sessionId)
Parameters:
  • sessionId – Type: int, Range: [0 to 216 - 1]
brickREDKeepSessionAlive(int sessionId, long lifetime)
Parameters:
  • sessionId – Type: int, Range: [0 to 216 - 1]
  • lifetime – Type: long, Range: [0 to 232 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDReleaseObject(int objectId, int sessionId)
Parameters:
  • objectId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

Decreases the reference count of an object by one and returns the resulting error code. If the reference count reaches zero the object gets destroyed.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDReleaseObjectUnchecked(int objectId, int sessionId)
Parameters:
  • objectId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
brickREDAllocateString(long lengthToReserve, String buffer, int sessionId)
Parameters:
  • lengthToReserve – Type: long, Unit: 1 B, Range: [0 to 232 - 1]
  • buffer – Type: String, Length: up to 58
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • stringId – Type: int, Range: [0 to 216 - 1]

Allocates a new string object, reserves length_to_reserve bytes memory for it and sets up to the first 60 bytes. Set length_to_reserve to the length of the string that should be stored in the string object.

Returns the object ID of the new string object and the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDTruncateString(int stringId, long length)
Parameters:
  • stringId – Type: int, Range: [0 to 216 - 1]
  • length – Type: long, Unit: 1 B, Range: [0 to 232 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

Truncates a string object to length bytes and returns the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetStringLength(int stringId)
Parameters:
  • stringId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • length – Type: long, Unit: 1 B, Range: [0 to 232 - 1]

Returns the length of a string object and the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDSetStringChunk(int stringId, long offset, String buffer)
Parameters:
  • stringId – Type: int, Range: [0 to 216 - 1]
  • offset – Type: long, Unit: 1 B, Range: [0 to 232 - 1]
  • buffer – Type: String, Length: up to 58
Return Map:
  • errorCode – Type: short, Range: See constants

Sets a chunk of up to 58 bytes in a string object beginning at offset.

Returns the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetStringChunk(int stringId, long offset)
Parameters:
  • stringId – Type: int, Range: [0 to 216 - 1]
  • offset – Type: long, Unit: 1 B, Range: [0 to 232 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • buffer – Type: String, Length: up to 63

Returns a chunk up to 63 bytes from a string object beginning at offset and returns the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDAllocateList(int lengthToReserve, int sessionId)
Parameters:
  • lengthToReserve – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • listId – Type: int, Range: [0 to 216 - 1]

Allocates a new list object and reserves memory for length_to_reserve items. Set length_to_reserve to the number of items that should be stored in the list object.

Returns the object ID of the new list object and the resulting error code.

When a list object gets destroyed then the reference count of each object in the list object is decreased by one.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetListLength(int listId)
Parameters:
  • listId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • length – Type: int, Range: [0 to 216 - 1]

Returns the length of a list object in items and the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetListItem(int listId, int index, int sessionId)
Parameters:
  • listId – Type: int, Range: [0 to 216 - 1]
  • index – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • itemObjectId – Type: int, Range: [0 to 216 - 1]
  • type – Type: short, Range: See constants

Returns the object ID and type of the object stored at index in a list object and returns the resulting error code.

Possible object types are:

  • String = 0
  • List = 1
  • File = 2
  • Directory = 3
  • Process = 4
  • Program = 5

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144

For type:

  • val OBJECT_TYPE_STRING = 0
  • val OBJECT_TYPE_LIST = 1
  • val OBJECT_TYPE_FILE = 2
  • val OBJECT_TYPE_DIRECTORY = 3
  • val OBJECT_TYPE_PROCESS = 4
  • val OBJECT_TYPE_PROGRAM = 5
brickREDAppendToList(int listId, int itemObjectId)
Parameters:
  • listId – Type: int, Range: [0 to 216 - 1]
  • itemObjectId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

Appends an object to a list object and increases the reference count of the appended object by one.

Returns the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDRemoveFromList(int listId, int index)
Parameters:
  • listId – Type: int, Range: [0 to 216 - 1]
  • index – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

Removes the object stored at index from a list object and decreases the reference count of the removed object by one.

Returns the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDOpenFile(int nameStringId, long flags, int permissions, long uid, long gid, int sessionId)
Parameters:
  • nameStringId – Type: int, Range: [0 to 216 - 1]
  • flags – Type: long, Range: See constants
  • permissions – Type: int, Range: See constants
  • uid – Type: long, Range: [0 to 232 - 1]
  • gid – Type: long, Range: [0 to 232 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • fileId – Type: int, Range: [0 to 216 - 1]

Opens an existing file or creates a new file and allocates a new file object for it.

FIXME: name has to be absolute

The reference count of the name string object is increased by one. When the file object gets destroyed then the reference count of the name string object is decreased by one. Also the name string object is locked and cannot be modified while the file object holds a reference to it.

The flags parameter takes a ORed combination of the following possible file flags (in hexadecimal notation):

  • ReadOnly = 0x0001 (O_RDONLY)
  • WriteOnly = 0x0002 (O_WRONLY)
  • ReadWrite = 0x0004 (O_RDWR)
  • Append = 0x0008 (O_APPEND)
  • Create = 0x0010 (O_CREAT)
  • Exclusive = 0x0020 (O_EXCL)
  • NonBlocking = 0x0040 (O_NONBLOCK)
  • Truncate = 0x0080 (O_TRUNC)
  • Temporary = 0x0100
  • Replace = 0x0200

FIXME: explain Temporary and Replace flag

The permissions parameter takes a ORed combination of the following possible file permissions (in octal notation) that match the common UNIX permission bits:

  • UserRead = 00400
  • UserWrite = 00200
  • UserExecute = 00100
  • GroupRead = 00040
  • GroupWrite = 00020
  • GroupExecute = 00010
  • OthersRead = 00004
  • OthersWrite = 00002
  • OthersExecute = 00001

Returns the object ID of the new file object and the resulting error code.

The following constants are available for this function:

For flags:

  • val FILE_FLAG_READ_ONLY = 1
  • val FILE_FLAG_WRITE_ONLY = 2
  • val FILE_FLAG_READ_WRITE = 4
  • val FILE_FLAG_APPEND = 8
  • val FILE_FLAG_CREATE = 16
  • val FILE_FLAG_EXCLUSIVE = 32
  • val FILE_FLAG_NON_BLOCKING = 64
  • val FILE_FLAG_TRUNCATE = 128
  • val FILE_FLAG_TEMPORARY = 256
  • val FILE_FLAG_REPLACE = 512

For permissions:

  • val FILE_PERMISSION_USER_ALL = 448
  • val FILE_PERMISSION_USER_READ = 256
  • val FILE_PERMISSION_USER_WRITE = 128
  • val FILE_PERMISSION_USER_EXECUTE = 64
  • val FILE_PERMISSION_GROUP_ALL = 56
  • val FILE_PERMISSION_GROUP_READ = 32
  • val FILE_PERMISSION_GROUP_WRITE = 16
  • val FILE_PERMISSION_GROUP_EXECUTE = 8
  • val FILE_PERMISSION_OTHERS_ALL = 7
  • val FILE_PERMISSION_OTHERS_READ = 4
  • val FILE_PERMISSION_OTHERS_WRITE = 2
  • val FILE_PERMISSION_OTHERS_EXECUTE = 1

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDCreatePipe(long flags, long length, int sessionId)
Parameters:
  • flags – Type: long, Range: See constants
  • length – Type: long, Unit: 1 B, Range: [0 to 264 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • fileId – Type: int, Range: [0 to 216 - 1]

Creates a new pipe and allocates a new file object for it.

The flags parameter takes a ORed combination of the following possible pipe flags (in hexadecimal notation):

  • NonBlockingRead = 0x0001
  • NonBlockingWrite = 0x0002

The length of the pipe buffer can be specified with the length parameter in bytes. If length is set to zero, then the default pipe buffer length is used.

Returns the object ID of the new file object and the resulting error code.

The following constants are available for this function:

For flags:

  • val PIPE_FLAG_NON_BLOCKING_READ = 1
  • val PIPE_FLAG_NON_BLOCKING_WRITE = 2

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetFileInfo(int fileId, int sessionId)
Parameters:
  • fileId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • type – Type: short, Range: See constants
  • nameStringId – Type: int, Range: [0 to 216 - 1]
  • flags – Type: long, Range: See constants
  • permissions – Type: int, Range: See constants
  • uid – Type: long, Range: [0 to 232 - 1]
  • gid – Type: long, Range: [0 to 232 - 1]
  • length – Type: long, Unit: 1 B, Range: [0 to 264 - 1]
  • accessTimestamp – Type: long, Range: [0 to 264 - 1]
  • modificationTimestamp – Type: long, Range: [0 to 264 - 1]
  • statusChangeTimestamp – Type: long, Range: [0 to 264 - 1]

Returns various information about a file and the resulting error code.

Possible file types are:

  • Unknown = 0
  • Regular = 1
  • Directory = 2
  • Character = 3
  • Block = 4
  • FIFO = 5
  • Symlink = 6
  • Socket = 7
  • Pipe = 8

If the file type is Pipe then the returned name string object is invalid, because a pipe has no name. Otherwise the returned name string object was used to open or create the file object, as passed to OpenFile().

The returned flags were used to open or create the file object, as passed to OpenFile() or CreatePipe(). See the respective function for a list of possible file and pipe flags.

FIXME: everything except flags and length is invalid if file type is Pipe

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144

For type:

  • val FILE_TYPE_UNKNOWN = 0
  • val FILE_TYPE_REGULAR = 1
  • val FILE_TYPE_DIRECTORY = 2
  • val FILE_TYPE_CHARACTER = 3
  • val FILE_TYPE_BLOCK = 4
  • val FILE_TYPE_FIFO = 5
  • val FILE_TYPE_SYMLINK = 6
  • val FILE_TYPE_SOCKET = 7
  • val FILE_TYPE_PIPE = 8

For flags:

  • val FILE_FLAG_READ_ONLY = 1
  • val FILE_FLAG_WRITE_ONLY = 2
  • val FILE_FLAG_READ_WRITE = 4
  • val FILE_FLAG_APPEND = 8
  • val FILE_FLAG_CREATE = 16
  • val FILE_FLAG_EXCLUSIVE = 32
  • val FILE_FLAG_NON_BLOCKING = 64
  • val FILE_FLAG_TRUNCATE = 128
  • val FILE_FLAG_TEMPORARY = 256
  • val FILE_FLAG_REPLACE = 512

For permissions:

  • val FILE_PERMISSION_USER_ALL = 448
  • val FILE_PERMISSION_USER_READ = 256
  • val FILE_PERMISSION_USER_WRITE = 128
  • val FILE_PERMISSION_USER_EXECUTE = 64
  • val FILE_PERMISSION_GROUP_ALL = 56
  • val FILE_PERMISSION_GROUP_READ = 32
  • val FILE_PERMISSION_GROUP_WRITE = 16
  • val FILE_PERMISSION_GROUP_EXECUTE = 8
  • val FILE_PERMISSION_OTHERS_ALL = 7
  • val FILE_PERMISSION_OTHERS_READ = 4
  • val FILE_PERMISSION_OTHERS_WRITE = 2
  • val FILE_PERMISSION_OTHERS_EXECUTE = 1
brickREDReadFile(int fileId, short lengthToRead)
Parameters:
  • fileId – Type: int, Range: [0 to 216 - 1]
  • lengthToRead – Type: short, Unit: 1 B, Range: [0 to 255]
Return Map:
  • errorCode – Type: short, Range: See constants
  • buffer – Type: short[], Length: 62, Range: [0 to 255]
  • lengthRead – Type: short, Unit: 1 B, Range: [0 to 255]

Reads up to 62 bytes from a file object.

Returns the bytes read, the actual number of bytes read and the resulting error code.

If there is not data to be read, either because the file position reached end-of-file or because there is not data in the pipe, then zero bytes are returned.

If the file object was created by OpenFile() without the NonBlocking flag or by CreatePipe() without the NonBlockingRead flag then the error code NotSupported is returned.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDWriteFile(int fileId, short[] buffer, short lengthToWrite)
Parameters:
  • fileId – Type: int, Range: [0 to 216 - 1]
  • buffer – Type: short[], Length: 61, Range: [0 to 255]
  • lengthToWrite – Type: short, Unit: 1 B, Range: [0 to 255]
Return Map:
  • errorCode – Type: short, Range: See constants
  • lengthWritten – Type: short, Unit: 1 B, Range: [0 to 255]

Writes up to 61 bytes to a file object.

Returns the actual number of bytes written and the resulting error code.

If the file object was created by OpenFile() without the NonBlocking flag or by CreatePipe() without the NonBlockingWrite flag then the error code NotSupported is returned.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDWriteFileUnchecked(int fileId, short[] buffer, short lengthToWrite)
Parameters:
  • fileId – Type: int, Range: [0 to 216 - 1]
  • buffer – Type: short[], Length: 61, Range: [0 to 255]
  • lengthToWrite – Type: short, Unit: 1 B, Range: [0 to 255]

Writes up to 61 bytes to a file object.

Does neither report the actual number of bytes written nor the resulting error code.

If the file object was created by OpenFile() without the NonBlocking flag or by CreatePipe() without the NonBlockingWrite flag then the write operation will fail silently.

brickREDSetFilePosition(int fileId, long offset, short origin)
Parameters:
  • fileId – Type: int, Range: [0 to 216 - 1]
  • offset – Type: long, Unit: 1 B, Range: [-263 to 263 - 1]
  • origin – Type: short, Range: See constants
Return Map:
  • errorCode – Type: short, Range: See constants
  • position – Type: long, Unit: 1 B, Range: [0 to 264 - 1]

Set the current seek position of a file object relative to origin.

Possible file origins are:

  • Beginning = 0
  • Current = 1
  • End = 2

Returns the resulting absolute seek position and error code.

If the file object was created by CreatePipe() then it has no seek position and the error code InvalidSeek is returned.

The following constants are available for this function:

For origin:

  • val FILE_ORIGIN_BEGINNING = 0
  • val FILE_ORIGIN_CURRENT = 1
  • val FILE_ORIGIN_END = 2

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetFilePosition(int fileId)
Parameters:
  • fileId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • position – Type: long, Unit: 1 B, Range: [0 to 264 - 1]

Returns the current seek position of a file object and returns the resulting error code.

If the file object was created by CreatePipe() then it has no seek position and the error code InvalidSeek is returned.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDSetFileEvents(int fileId, int events)
Parameters:
  • fileId – Type: int, Range: [0 to 216 - 1]
  • events – Type: int, Range: See constants
Return Map:
  • errorCode – Type: short, Range: See constants

The following constants are available for this function:

For events:

  • val FILE_EVENT_READABLE = 1
  • val FILE_EVENT_WRITABLE = 2

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetFileEvents(int fileId)
Parameters:
  • fileId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • events – Type: int, Range: See constants

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144

For events:

  • val FILE_EVENT_READABLE = 1
  • val FILE_EVENT_WRITABLE = 2
brickREDOpenDirectory(int nameStringId, int sessionId)
Parameters:
  • nameStringId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • directoryId – Type: int, Range: [0 to 216 - 1]

Opens an existing directory and allocates a new directory object for it.

FIXME: name has to be absolute

The reference count of the name string object is increased by one. When the directory object is destroyed then the reference count of the name string object is decreased by one. Also the name string object is locked and cannot be modified while the directory object holds a reference to it.

Returns the object ID of the new directory object and the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetDirectoryName(int directoryId, int sessionId)
Parameters:
  • directoryId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • nameStringId – Type: int, Range: [0 to 216 - 1]

Returns the name of a directory object, as passed to OpenDirectory(), and the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetNextDirectoryEntry(int directoryId, int sessionId)
Parameters:
  • directoryId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • nameStringId – Type: int, Range: [0 to 216 - 1]
  • type – Type: short, Range: See constants

Returns the next entry in a directory object and the resulting error code.

If there is not next entry then error code NoMoreData is returned. To rewind a directory object call RewindDirectory().

Possible directory entry types are:

  • Unknown = 0
  • Regular = 1
  • Directory = 2
  • Character = 3
  • Block = 4
  • FIFO = 5
  • Symlink = 6
  • Socket = 7

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144

For type:

  • val DIRECTORY_ENTRY_TYPE_UNKNOWN = 0
  • val DIRECTORY_ENTRY_TYPE_REGULAR = 1
  • val DIRECTORY_ENTRY_TYPE_DIRECTORY = 2
  • val DIRECTORY_ENTRY_TYPE_CHARACTER = 3
  • val DIRECTORY_ENTRY_TYPE_BLOCK = 4
  • val DIRECTORY_ENTRY_TYPE_FIFO = 5
  • val DIRECTORY_ENTRY_TYPE_SYMLINK = 6
  • val DIRECTORY_ENTRY_TYPE_SOCKET = 7
brickREDRewindDirectory(int directoryId)
Parameters:
  • directoryId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

Rewinds a directory object and returns the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDCreateDirectory(int nameStringId, long flags, int permissions, long uid, long gid)
Parameters:
  • nameStringId – Type: int, Range: [0 to 216 - 1]
  • flags – Type: long, Range: See constants
  • permissions – Type: int, Range: See constants
  • uid – Type: long, Range: [0 to 232 - 1]
  • gid – Type: long, Range: [0 to 232 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

FIXME: name has to be absolute

The following constants are available for this function:

For flags:

  • val DIRECTORY_FLAG_RECURSIVE = 1
  • val DIRECTORY_FLAG_EXCLUSIVE = 2

For permissions:

  • val FILE_PERMISSION_USER_ALL = 448
  • val FILE_PERMISSION_USER_READ = 256
  • val FILE_PERMISSION_USER_WRITE = 128
  • val FILE_PERMISSION_USER_EXECUTE = 64
  • val FILE_PERMISSION_GROUP_ALL = 56
  • val FILE_PERMISSION_GROUP_READ = 32
  • val FILE_PERMISSION_GROUP_WRITE = 16
  • val FILE_PERMISSION_GROUP_EXECUTE = 8
  • val FILE_PERMISSION_OTHERS_ALL = 7
  • val FILE_PERMISSION_OTHERS_READ = 4
  • val FILE_PERMISSION_OTHERS_WRITE = 2
  • val FILE_PERMISSION_OTHERS_EXECUTE = 1

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetProcesses(int sessionId)
Parameters:
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • processesListId – Type: int, Range: [0 to 216 - 1]

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDSpawnProcess(int executableStringId, int argumentsListId, int environmentListId, int workingDirectoryStringId, long uid, long gid, int stdinFileId, int stdoutFileId, int stderrFileId, int sessionId)
Parameters:
  • executableStringId – Type: int, Range: [0 to 216 - 1]
  • argumentsListId – Type: int, Range: [0 to 216 - 1]
  • environmentListId – Type: int, Range: [0 to 216 - 1]
  • workingDirectoryStringId – Type: int, Range: [0 to 216 - 1]
  • uid – Type: long, Range: [0 to 232 - 1]
  • gid – Type: long, Range: [0 to 232 - 1]
  • stdinFileId – Type: int, Range: [0 to 216 - 1]
  • stdoutFileId – Type: int, Range: [0 to 216 - 1]
  • stderrFileId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • processId – Type: int, Range: [0 to 216 - 1]

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDKillProcess(int processId, short signal)
Parameters:
  • processId – Type: int, Range: [0 to 216 - 1]
  • signal – Type: short, Range: See constants
Return Map:
  • errorCode – Type: short, Range: See constants

Sends a UNIX signal to a process object and returns the resulting error code.

Possible UNIX signals are:

  • Interrupt = 2
  • Quit = 3
  • Abort = 6
  • Kill = 9
  • User1 = 10
  • User2 = 12
  • Terminate = 15
  • Continue = 18
  • Stop = 19

The following constants are available for this function:

For signal:

  • val PROCESS_SIGNAL_INTERRUPT = 2
  • val PROCESS_SIGNAL_QUIT = 3
  • val PROCESS_SIGNAL_ABORT = 6
  • val PROCESS_SIGNAL_KILL = 9
  • val PROCESS_SIGNAL_USER1 = 10
  • val PROCESS_SIGNAL_USER2 = 12
  • val PROCESS_SIGNAL_TERMINATE = 15
  • val PROCESS_SIGNAL_CONTINUE = 18
  • val PROCESS_SIGNAL_STOP = 19

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetProcessCommand(int processId, int sessionId)
Parameters:
  • processId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • executableStringId – Type: int, Range: [0 to 216 - 1]
  • argumentsListId – Type: int, Range: [0 to 216 - 1]
  • environmentListId – Type: int, Range: [0 to 216 - 1]
  • workingDirectoryStringId – Type: int, Range: [0 to 216 - 1]

Returns the executable, arguments, environment and working directory used to spawn a process object, as passed to SpawnProcess(), and the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetProcessIdentity(int processId)
Parameters:
  • processId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • pid – Type: long, Range: [0 to 232 - 1]
  • uid – Type: long, Range: [0 to 232 - 1]
  • gid – Type: long, Range: [0 to 232 - 1]

Returns the process ID and the user and group ID used to spawn a process object, as passed to SpawnProcess(), and the resulting error code.

The process ID is only valid if the state is Running or Stopped, see GetProcessState().

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetProcessStdio(int processId, int sessionId)
Parameters:
  • processId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • stdinFileId – Type: int, Range: [0 to 216 - 1]
  • stdoutFileId – Type: int, Range: [0 to 216 - 1]
  • stderrFileId – Type: int, Range: [0 to 216 - 1]

Returns the stdin, stdout and stderr files used to spawn a process object, as passed to SpawnProcess(), and the resulting error code.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetProcessState(int processId)
Parameters:
  • processId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • state – Type: short, Range: See constants
  • timestamp – Type: long, Range: [0 to 264 - 1]
  • exitCode – Type: short, Range: [0 to 255]

Returns the current state, timestamp and exit code of a process object, and the resulting error code.

Possible process states are:

  • Unknown = 0
  • Running = 1
  • Error = 2
  • Exited = 3
  • Killed = 4
  • Stopped = 5

The timestamp represents the UNIX time since when the process is in its current state.

The exit code is only valid if the state is Error, Exited, Killed or Stopped and has different meanings depending on the state:

  • Error: error code for error occurred while spawning the process (see below)
  • Exited: exit status of the process
  • Killed: UNIX signal number used to kill the process
  • Stopped: UNIX signal number used to stop the process

Possible exit/error codes in Error state are:

  • InternalError = 125
  • CannotExecute = 126
  • DoesNotExist = 127

The CannotExecute error can be caused by the executable being opened for writing.

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144

For state:

  • val PROCESS_STATE_UNKNOWN = 0
  • val PROCESS_STATE_RUNNING = 1
  • val PROCESS_STATE_ERROR = 2
  • val PROCESS_STATE_EXITED = 3
  • val PROCESS_STATE_KILLED = 4
  • val PROCESS_STATE_STOPPED = 5
brickREDGetPrograms(int sessionId)
Parameters:
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • programsListId – Type: int, Range: [0 to 216 - 1]

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDDefineProgram(int identifierStringId, int sessionId)
Parameters:
  • identifierStringId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • programId – Type: int, Range: [0 to 216 - 1]

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDPurgeProgram(int programId, long cookie)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • cookie – Type: long, Range: [0 to 232 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetProgramIdentifier(int programId, int sessionId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • identifierStringId – Type: int, Range: [0 to 216 - 1]

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetProgramRootDirectory(int programId, int sessionId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • rootDirectoryStringId – Type: int, Range: [0 to 216 - 1]

FIXME: root directory is absolute: <home>/programs/<identifier>

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDSetProgramCommand(int programId, int executableStringId, int argumentsListId, int environmentListId, int workingDirectoryStringId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • executableStringId – Type: int, Range: [0 to 216 - 1]
  • argumentsListId – Type: int, Range: [0 to 216 - 1]
  • environmentListId – Type: int, Range: [0 to 216 - 1]
  • workingDirectoryStringId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

FIXME: working directory is relative to <home>/programs/<identifier>/bin

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetProgramCommand(int programId, int sessionId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • executableStringId – Type: int, Range: [0 to 216 - 1]
  • argumentsListId – Type: int, Range: [0 to 216 - 1]
  • environmentListId – Type: int, Range: [0 to 216 - 1]
  • workingDirectoryStringId – Type: int, Range: [0 to 216 - 1]

FIXME: working directory is relative to <home>/programs/<identifier>/bin

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDSetProgramStdioRedirection(int programId, short stdinRedirection, int stdinFileNameStringId, short stdoutRedirection, int stdoutFileNameStringId, short stderrRedirection, int stderrFileNameStringId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • stdinRedirection – Type: short, Range: See constants
  • stdinFileNameStringId – Type: int, Range: [0 to 216 - 1]
  • stdoutRedirection – Type: short, Range: See constants
  • stdoutFileNameStringId – Type: int, Range: [0 to 216 - 1]
  • stderrRedirection – Type: short, Range: See constants
  • stderrFileNameStringId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

FIXME: stdio file names are relative to <home>/programs/<identifier>/bin

The following constants are available for this function:

For stdinRedirection:

  • val PROGRAM_STDIO_REDIRECTION_DEV_NULL = 0
  • val PROGRAM_STDIO_REDIRECTION_PIPE = 1
  • val PROGRAM_STDIO_REDIRECTION_FILE = 2
  • val PROGRAM_STDIO_REDIRECTION_INDIVIDUAL_LOG = 3
  • val PROGRAM_STDIO_REDIRECTION_CONTINUOUS_LOG = 4
  • val PROGRAM_STDIO_REDIRECTION_STDOUT = 5

For stdoutRedirection:

  • val PROGRAM_STDIO_REDIRECTION_DEV_NULL = 0
  • val PROGRAM_STDIO_REDIRECTION_PIPE = 1
  • val PROGRAM_STDIO_REDIRECTION_FILE = 2
  • val PROGRAM_STDIO_REDIRECTION_INDIVIDUAL_LOG = 3
  • val PROGRAM_STDIO_REDIRECTION_CONTINUOUS_LOG = 4
  • val PROGRAM_STDIO_REDIRECTION_STDOUT = 5

For stderrRedirection:

  • val PROGRAM_STDIO_REDIRECTION_DEV_NULL = 0
  • val PROGRAM_STDIO_REDIRECTION_PIPE = 1
  • val PROGRAM_STDIO_REDIRECTION_FILE = 2
  • val PROGRAM_STDIO_REDIRECTION_INDIVIDUAL_LOG = 3
  • val PROGRAM_STDIO_REDIRECTION_CONTINUOUS_LOG = 4
  • val PROGRAM_STDIO_REDIRECTION_STDOUT = 5

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetProgramStdioRedirection(int programId, int sessionId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • stdinRedirection – Type: short, Range: See constants
  • stdinFileNameStringId – Type: int, Range: [0 to 216 - 1]
  • stdoutRedirection – Type: short, Range: See constants
  • stdoutFileNameStringId – Type: int, Range: [0 to 216 - 1]
  • stderrRedirection – Type: short, Range: See constants
  • stderrFileNameStringId – Type: int, Range: [0 to 216 - 1]

FIXME: stdio file names are relative to <home>/programs/<identifier>/bin

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144

For stdinRedirection:

  • val PROGRAM_STDIO_REDIRECTION_DEV_NULL = 0
  • val PROGRAM_STDIO_REDIRECTION_PIPE = 1
  • val PROGRAM_STDIO_REDIRECTION_FILE = 2
  • val PROGRAM_STDIO_REDIRECTION_INDIVIDUAL_LOG = 3
  • val PROGRAM_STDIO_REDIRECTION_CONTINUOUS_LOG = 4
  • val PROGRAM_STDIO_REDIRECTION_STDOUT = 5

For stdoutRedirection:

  • val PROGRAM_STDIO_REDIRECTION_DEV_NULL = 0
  • val PROGRAM_STDIO_REDIRECTION_PIPE = 1
  • val PROGRAM_STDIO_REDIRECTION_FILE = 2
  • val PROGRAM_STDIO_REDIRECTION_INDIVIDUAL_LOG = 3
  • val PROGRAM_STDIO_REDIRECTION_CONTINUOUS_LOG = 4
  • val PROGRAM_STDIO_REDIRECTION_STDOUT = 5

For stderrRedirection:

  • val PROGRAM_STDIO_REDIRECTION_DEV_NULL = 0
  • val PROGRAM_STDIO_REDIRECTION_PIPE = 1
  • val PROGRAM_STDIO_REDIRECTION_FILE = 2
  • val PROGRAM_STDIO_REDIRECTION_INDIVIDUAL_LOG = 3
  • val PROGRAM_STDIO_REDIRECTION_CONTINUOUS_LOG = 4
  • val PROGRAM_STDIO_REDIRECTION_STDOUT = 5
brickREDSetProgramSchedule(int programId, short startMode, boolean continueAfterError, long startInterval, int startFieldsStringId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • startMode – Type: short, Range: See constants
  • continueAfterError – Type: boolean
  • startInterval – Type: long, Range: [0 to 232 - 1]
  • startFieldsStringId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

The following constants are available for this function:

For startMode:

  • val PROGRAM_START_MODE_NEVER = 0
  • val PROGRAM_START_MODE_ALWAYS = 1
  • val PROGRAM_START_MODE_INTERVAL = 2
  • val PROGRAM_START_MODE_CRON = 3

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetProgramSchedule(int programId, int sessionId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • startMode – Type: short, Range: See constants
  • continueAfterError – Type: boolean
  • startInterval – Type: long, Range: [0 to 232 - 1]
  • startFieldsStringId – Type: int, Range: [0 to 216 - 1]

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144

For startMode:

  • val PROGRAM_START_MODE_NEVER = 0
  • val PROGRAM_START_MODE_ALWAYS = 1
  • val PROGRAM_START_MODE_INTERVAL = 2
  • val PROGRAM_START_MODE_CRON = 3
brickREDGetProgramSchedulerState(int programId, int sessionId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • state – Type: short, Range: See constants
  • timestamp – Type: long, Range: [0 to 264 - 1]
  • messageStringId – Type: int, Range: [0 to 216 - 1]

FIXME: message is currently valid in error-occurred state only

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144

For state:

  • val PROGRAM_SCHEDULER_STATE_STOPPED = 0
  • val PROGRAM_SCHEDULER_STATE_RUNNING = 1
brickREDContinueProgramSchedule(int programId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDStartProgram(int programId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetLastSpawnedProgramProcess(int programId, int sessionId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • processId – Type: int, Range: [0 to 216 - 1]
  • timestamp – Type: long, Range: [0 to 264 - 1]

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetCustomProgramOptionNames(int programId, int sessionId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • namesListId – Type: int, Range: [0 to 216 - 1]

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDSetCustomProgramOptionValue(int programId, int nameStringId, int valueStringId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • nameStringId – Type: int, Range: [0 to 216 - 1]
  • valueStringId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetCustomProgramOptionValue(int programId, int nameStringId, int sessionId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • nameStringId – Type: int, Range: [0 to 216 - 1]
  • sessionId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants
  • valueStringId – Type: int, Range: [0 to 216 - 1]

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDRemoveCustomProgramOption(int programId, int nameStringId)
Parameters:
  • programId – Type: int, Range: [0 to 216 - 1]
  • nameStringId – Type: int, Range: [0 to 216 - 1]
Return Map:
  • errorCode – Type: short, Range: See constants

The following constants are available for this function:

For errorCode:

  • val ERROR_CODE_SUCCESS = 0
  • val ERROR_CODE_UNKNOWN_ERROR = 1
  • val ERROR_CODE_INVALID_OPERATION = 2
  • val ERROR_CODE_OPERATION_ABORTED = 3
  • val ERROR_CODE_INTERNAL_ERROR = 4
  • val ERROR_CODE_UNKNOWN_SESSION_ID = 5
  • val ERROR_CODE_NO_FREE_SESSION_ID = 6
  • val ERROR_CODE_UNKNOWN_OBJECT_ID = 7
  • val ERROR_CODE_NO_FREE_OBJECT_ID = 8
  • val ERROR_CODE_OBJECT_IS_LOCKED = 9
  • val ERROR_CODE_NO_MORE_DATA = 10
  • val ERROR_CODE_WRONG_LIST_ITEM_TYPE = 11
  • val ERROR_CODE_PROGRAM_IS_PURGED = 12
  • val ERROR_CODE_INVALID_PARAMETER = 128
  • val ERROR_CODE_NO_FREE_MEMORY = 129
  • val ERROR_CODE_NO_FREE_SPACE = 130
  • val ERROR_CODE_ACCESS_DENIED = 121
  • val ERROR_CODE_ALREADY_EXISTS = 132
  • val ERROR_CODE_DOES_NOT_EXIST = 133
  • val ERROR_CODE_INTERRUPTED = 134
  • val ERROR_CODE_IS_DIRECTORY = 135
  • val ERROR_CODE_NOT_A_DIRECTORY = 136
  • val ERROR_CODE_WOULD_BLOCK = 137
  • val ERROR_CODE_OVERFLOW = 138
  • val ERROR_CODE_BAD_FILE_DESCRIPTOR = 139
  • val ERROR_CODE_OUT_OF_RANGE = 140
  • val ERROR_CODE_NAME_TOO_LONG = 141
  • val ERROR_CODE_INVALID_SEEK = 142
  • val ERROR_CODE_NOT_SUPPORTED = 143
  • val ERROR_CODE_TOO_MANY_OPEN_FILES = 144
brickREDGetIdentity()
Return Map:
  • uid – Type: String, Length: up to 8
  • connectedUid – Type: String, Length: up to 8
  • position – Type: char, Range: ['0' to '8']
  • hardwareVersion – Type: short[], Length: 3
    • 0: major – Type: short, Range: [0 to 255]
    • 1: minor – Type: short, Range: [0 to 255]
    • 2: revision – Type: short, Range: [0 to 255]
  • firmwareVersion – Type: short[], Length: 3
    • 0: major – Type: short, Range: [0 to 255]
    • 1: minor – Type: short, Range: [0 to 255]
    • 2: revision – Type: short, Range: [0 to 255]
  • deviceIdentifier – Type: int, Range: [0 to 216 - 1]

Returns the UID, the UID where the Brick is connected to, the position, the hardware and firmware version as well as the device identifier.

The position is the position in the stack from '0' (bottom) to '8' (top).

The device identifier numbers can be found here