Mathematica - RED Brick

This is the description of the Mathematica 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 Mathematica API bindings is part of their general description.

Examples

The example code below is Public Domain (CC0 1.0).

API

Generally, every method of the Mathematica bindings that returns a value can throw a Tinkerforge.TimeoutException. This exception gets thrown if the device did not respond. If a cable based connection is used, it is unlikely that this exception gets thrown (assuming nobody plugs the device out). However, if a wireless connection is used, timeouts will occur if the distance to the device gets too big.

Since .NET/Link does not support multiple return values directly, we use the out keyword to return multiple values from a method. For further information about the out keyword in .NET/Link see the corresponding Mathematica .NET/Link documentation.

The namespace for all Brick/Bricklet bindings and the IPConnection is Tinkerforge.*.

Note

The API documentation for the RED Brick is currently incomplete.

The RED Brick API is meant to be used by the Brick Viewer to implement the offered functionality (getting status information, managing programs etc.). Normal users will not need to use this API, it may only be interesting for power users.

FIXME: explain sessions

The RED Brick API operates on reference counted objects (strings, lists, files, directories, processes and programs) that are identified by their 16bit object ID. Functions that allocate or return an object ID (e.g. AllocateString[] and GetNextDirectoryEntry[]) increase the reference count of the returned object. If the object is no longer needed then ReleaseObject[] has to be called to decrease the reference count of the object again. In contrast to allocation and getter functions, the reference count for an object returned by a callback is not increased and ReleaseObject[] must not be called for such an object in response to a callback.

There are functions (e.g. GetFileInfo[]) that only return valid objects under certain conditions. This conditions are documented for the specific functions. For invalid objects ReleaseObject[] must not be called.

There are also function (e.g. SetProgramStdioRedirection[]) that have conditionally unused object parameters. Under which conditions an object parameter is unused is documented for the specific functions. For unused object parameters 0 has to be passed as object ID.

The RED Brick API is more complex then the typical Brick API and requires more elaborate error reporting than the TCP/IP protocol can provide with its 2bit error code. Therefore, almost all functions of the RED Brick API return an 8bit error code. Possible error codes are:

  • Success = 0
  • UnknownError = 1
  • InvalidOperation = 2
  • OperationAborted = 3
  • InternalError = 4
  • UnknownSessionID = 5
  • NoFreeSessionID = 6
  • UnknownObjectID = 7
  • NoFreeObjectID = 8
  • ObjectIsLocked = 9
  • NoMoreData = 10
  • WrongListItemType = 11
  • ProgramIsPurged = 12
  • InvalidParameter = 128 (EINVAL)
  • NoFreeMemory = 129 (ENOMEM)
  • NoFreeSpace = 130 (ENOSPC)
  • AccessDenied = 131 (EACCES)
  • AlreadyExists = 132 (EEXIST)
  • DoesNotExist = 133 (ENOENT)
  • Interrupted = 134 (EINTR)
  • IsDirectory = 135 (EISDIR)
  • NotADirectory = 136 (ENOTDIR)
  • WouldBlock = 137 (EWOULDBLOCK)
  • Overflow = 138 (EOVERFLOW)
  • BadFileDescriptor = 139 (EBADF)
  • OutOfRange = 140 (ERANGE)
  • NameTooLong = 141 (ENAMETOOLONG)
  • InvalidSeek = 142 (ESPIPE)
  • NotSupported = 143 (ENOTSUP)
  • TooManyOpenFiles = 144 (EMFILE)

If a function returns an error code other than Success then its other return values (if any) are invalid and must not be used.

The error code InvalidOperation is returned if the requested operation cannot be performed because the current state of the object does not allow it. For example, trying to append an item to a full list object or trying to undefine an already undefined program.

The error code NotSupported is returned if the requested operation can never be performed. For example, trying to append a list object to itself, trying to get the name of a file object with type Pipe or trying to create a directory non-recursively with more than the last part of the directory name referring to non-existing directories.

String objects store UTF-8 encoded data.

Advanced Functions

BrickRED@CreateSession[lifetime, out errorCode, out sessionId] → Null
Parameters:
  • lifetime -- Integer
  • errorCode -- Integer
  • sessionId -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@ExpireSession[sessionId] → errorCode
Parameters:
  • sessionId -- Integer
Returns:
  • errorCode -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@ExpireSessionUnchecked[sessionId] → Null
Parameters:
  • sessionId -- Integer
BrickRED@KeepSessionAlive[sessionId, lifetime] → errorCode
Parameters:
  • sessionId -- Integer
  • lifetime -- Integer
Returns:
  • errorCode -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@ReleaseObject[objectId, sessionId] → errorCode
Parameters:
  • objectId -- Integer
  • sessionId -- Integer
Returns:
  • errorCode -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@ReleaseObjectUnchecked[objectId, sessionId] → Null
Parameters:
  • objectId -- Integer
  • sessionId -- Integer
BrickRED@AllocateString[lengthToReserve, buffer, sessionId, out errorCode, out stringId] → Null
Parameters:
  • lengthToReserve -- Integer
  • buffer -- String
  • sessionId -- Integer
  • errorCode -- Integer
  • stringId -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@TruncateString[stringId, length] → errorCode
Parameters:
  • stringId -- Integer
  • length -- Integer
Returns:
  • errorCode -- Integer

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

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetStringLength[stringId, out errorCode, out length] → Null
Parameters:
  • stringId -- Integer
  • errorCode -- Integer
  • length -- Integer

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

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@SetStringChunk[stringId, offset, buffer] → errorCode
Parameters:
  • stringId -- Integer
  • offset -- Integer
  • buffer -- String
Returns:
  • errorCode -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetStringChunk[stringId, offset, out errorCode, out buffer] → Null
Parameters:
  • stringId -- Integer
  • offset -- Integer
  • errorCode -- Integer
  • buffer -- String

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@AllocateList[lengthToReserve, sessionId, out errorCode, out listId] → Null
Parameters:
  • lengthToReserve -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • listId -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetListLength[listId, out errorCode, out length] → Null
Parameters:
  • listId -- Integer
  • errorCode -- Integer
  • length -- Integer

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

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetListItem[listId, index, sessionId, out errorCode, out itemObjectId, out type] → Null
Parameters:
  • listId -- Integer
  • index -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • itemObjectId -- Integer
  • type -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
  • BrickRED`OBJECTUTYPEUSTRING = 0
  • BrickRED`OBJECTUTYPEULIST = 1
  • BrickRED`OBJECTUTYPEUFILE = 2
  • BrickRED`OBJECTUTYPEUDIRECTORY = 3
  • BrickRED`OBJECTUTYPEUPROCESS = 4
  • BrickRED`OBJECTUTYPEUPROGRAM = 5
BrickRED@AppendToList[listId, itemObjectId] → errorCode
Parameters:
  • listId -- Integer
  • itemObjectId -- Integer
Returns:
  • errorCode -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@RemoveFromList[listId, index] → errorCode
Parameters:
  • listId -- Integer
  • index -- Integer
Returns:
  • errorCode -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@OpenFile[nameStringId, flags, permissions, uid, gid, sessionId, out errorCode, out fileId] → Null
Parameters:
  • nameStringId -- Integer
  • flags -- Integer
  • permissions -- Integer
  • uid -- Integer
  • gid -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • fileId -- Integer

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:

  • BrickRED`FILEUFLAGUREADUONLY = 1
  • BrickRED`FILEUFLAGUWRITEUONLY = 2
  • BrickRED`FILEUFLAGUREADUWRITE = 4
  • BrickRED`FILEUFLAGUAPPEND = 8
  • BrickRED`FILEUFLAGUCREATE = 16
  • BrickRED`FILEUFLAGUEXCLUSIVE = 32
  • BrickRED`FILEUFLAGUNONUBLOCKING = 64
  • BrickRED`FILEUFLAGUTRUNCATE = 128
  • BrickRED`FILEUFLAGUTEMPORARY = 256
  • BrickRED`FILEUFLAGUREPLACE = 512
  • BrickRED`FILEUPERMISSIONUUSERUALL = 448
  • BrickRED`FILEUPERMISSIONUUSERUREAD = 256
  • BrickRED`FILEUPERMISSIONUUSERUWRITE = 128
  • BrickRED`FILEUPERMISSIONUUSERUEXECUTE = 64
  • BrickRED`FILEUPERMISSIONUGROUPUALL = 56
  • BrickRED`FILEUPERMISSIONUGROUPUREAD = 32
  • BrickRED`FILEUPERMISSIONUGROUPUWRITE = 16
  • BrickRED`FILEUPERMISSIONUGROUPUEXECUTE = 8
  • BrickRED`FILEUPERMISSIONUOTHERSUALL = 7
  • BrickRED`FILEUPERMISSIONUOTHERSUREAD = 4
  • BrickRED`FILEUPERMISSIONUOTHERSUWRITE = 2
  • BrickRED`FILEUPERMISSIONUOTHERSUEXECUTE = 1
  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@CreatePipe[flags, length, sessionId, out errorCode, out fileId] → Null
Parameters:
  • flags -- Integer
  • length -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • fileId -- Integer

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:

  • BrickRED`PIPEUFLAGUNONUBLOCKINGUREAD = 1
  • BrickRED`PIPEUFLAGUNONUBLOCKINGUWRITE = 2
  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetFileInfo[fileId, sessionId, out errorCode, out type, out nameStringId, out flags, out permissions, out uid, out gid, out length, out accessTimestamp, out modificationTimestamp, out statusChangeTimestamp] → Null
Parameters:
  • fileId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • type -- Integer
  • nameStringId -- Integer
  • flags -- Integer
  • permissions -- Integer
  • uid -- Integer
  • gid -- Integer
  • length -- Integer
  • accessTimestamp -- Integer
  • modificationTimestamp -- Integer
  • statusChangeTimestamp -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
  • BrickRED`FILEUTYPEUUNKNOWN = 0
  • BrickRED`FILEUTYPEUREGULAR = 1
  • BrickRED`FILEUTYPEUDIRECTORY = 2
  • BrickRED`FILEUTYPEUCHARACTER = 3
  • BrickRED`FILEUTYPEUBLOCK = 4
  • BrickRED`FILEUTYPEUFIFO = 5
  • BrickRED`FILEUTYPEUSYMLINK = 6
  • BrickRED`FILEUTYPEUSOCKET = 7
  • BrickRED`FILEUTYPEUPIPE = 8
  • BrickRED`FILEUPERMISSIONUUSERUALL = 448
  • BrickRED`FILEUPERMISSIONUUSERUREAD = 256
  • BrickRED`FILEUPERMISSIONUUSERUWRITE = 128
  • BrickRED`FILEUPERMISSIONUUSERUEXECUTE = 64
  • BrickRED`FILEUPERMISSIONUGROUPUALL = 56
  • BrickRED`FILEUPERMISSIONUGROUPUREAD = 32
  • BrickRED`FILEUPERMISSIONUGROUPUWRITE = 16
  • BrickRED`FILEUPERMISSIONUGROUPUEXECUTE = 8
  • BrickRED`FILEUPERMISSIONUOTHERSUALL = 7
  • BrickRED`FILEUPERMISSIONUOTHERSUREAD = 4
  • BrickRED`FILEUPERMISSIONUOTHERSUWRITE = 2
  • BrickRED`FILEUPERMISSIONUOTHERSUEXECUTE = 1
BrickRED@ReadFile[fileId, lengthToRead, out errorCode, out {buffer1, buffer2, ..., buffer62}, out lengthRead] → Null
Parameters:
  • fileId -- Integer
  • lengthToRead -- Integer
  • errorCode -- Integer
  • bufferi -- Integer
  • lengthRead -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@ReadFileAsync[fileId, lengthToRead] → Null
Parameters:
  • fileId -- Integer
  • lengthToRead -- Integer

Reads up to 263 - 1 bytes from a file object asynchronously.

Reports the bytes read (in 60 byte chunks), the actual number of bytes read and the resulting error code via the AsyncFileReadCallback callback.

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 reported.

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 reported via the AsyncFileReadCallback callback.

BrickRED@AbortAsyncFileRead[fileId] → errorCode
Parameters:
  • fileId -- Integer
Returns:
  • errorCode -- Integer

Aborts a ReadFileAsync[] operation in progress.

Returns the resulting error code.

On success the AsyncFileReadCallback callback will report OperationAborted.

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@WriteFile[fileId, {buffer1, buffer2, ..., buffer61}, lengthToWrite, out errorCode, out lengthWritten] → Null
Parameters:
  • fileId -- Integer
  • bufferi -- Integer
  • lengthToWrite -- Integer
  • errorCode -- Integer
  • lengthWritten -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@WriteFileUnchecked[fileId, {buffer1, buffer2, ..., buffer61}, lengthToWrite] → Null
Parameters:
  • fileId -- Integer
  • bufferi -- Integer
  • lengthToWrite -- Integer

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.

BrickRED@WriteFileAsync[fileId, {buffer1, buffer2, ..., buffer61}, lengthToWrite] → Null
Parameters:
  • fileId -- Integer
  • bufferi -- Integer
  • lengthToWrite -- Integer

Writes up to 61 bytes to a file object.

Reports the actual number of bytes written and the resulting error code via the AsyncFileWriteCallback callback.

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 reported via the AsyncFileWriteCallback callback.

BrickRED@SetFilePosition[fileId, offset, origin, out errorCode, out position] → Null
Parameters:
  • fileId -- Integer
  • offset -- Integer
  • origin -- Integer
  • errorCode -- Integer
  • position -- Integer

Set the current seek position of a file object in bytes 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:

  • BrickRED`FILEUORIGINUBEGINNING = 0
  • BrickRED`FILEUORIGINUCURRENT = 1
  • BrickRED`FILEUORIGINUEND = 2
  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetFilePosition[fileId, out errorCode, out position] → Null
Parameters:
  • fileId -- Integer
  • errorCode -- Integer
  • position -- Integer

Returns the current seek position of a file object in bytes 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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@SetFileEvents[fileId, events] → errorCode
Parameters:
  • fileId -- Integer
  • events -- Integer
Returns:
  • errorCode -- Integer

The following constants are available for this function:

  • BrickRED`FILEUEVENTUREADABLE = 1
  • BrickRED`FILEUEVENTUWRITABLE = 2
  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetFileEvents[fileId, out errorCode, out events] → Null
Parameters:
  • fileId -- Integer
  • errorCode -- Integer
  • events -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
  • BrickRED`FILEUEVENTUREADABLE = 1
  • BrickRED`FILEUEVENTUWRITABLE = 2
BrickRED@OpenDirectory[nameStringId, sessionId, out errorCode, out directoryId] → Null
Parameters:
  • nameStringId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • directoryId -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetDirectoryName[directoryId, sessionId, out errorCode, out nameStringId] → Null
Parameters:
  • directoryId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • nameStringId -- Integer

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

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetNextDirectoryEntry[directoryId, sessionId, out errorCode, out nameStringId, out type] → Null
Parameters:
  • directoryId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • nameStringId -- Integer
  • type -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
  • BrickRED`DIRECTORYUENTRYUTYPEUUNKNOWN = 0
  • BrickRED`DIRECTORYUENTRYUTYPEUREGULAR = 1
  • BrickRED`DIRECTORYUENTRYUTYPEUDIRECTORY = 2
  • BrickRED`DIRECTORYUENTRYUTYPEUCHARACTER = 3
  • BrickRED`DIRECTORYUENTRYUTYPEUBLOCK = 4
  • BrickRED`DIRECTORYUENTRYUTYPEUFIFO = 5
  • BrickRED`DIRECTORYUENTRYUTYPEUSYMLINK = 6
  • BrickRED`DIRECTORYUENTRYUTYPEUSOCKET = 7
BrickRED@RewindDirectory[directoryId] → errorCode
Parameters:
  • directoryId -- Integer
Returns:
  • errorCode -- Integer

Rewinds a directory object and returns the resulting error code.

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@CreateDirectory[nameStringId, flags, permissions, uid, gid] → errorCode
Parameters:
  • nameStringId -- Integer
  • flags -- Integer
  • permissions -- Integer
  • uid -- Integer
  • gid -- Integer
Returns:
  • errorCode -- Integer

FIXME: name has to be absolute

The following constants are available for this function:

  • BrickRED`DIRECTORYUFLAGURECURSIVE = 1
  • BrickRED`DIRECTORYUFLAGUEXCLUSIVE = 2
  • BrickRED`FILEUPERMISSIONUUSERUALL = 448
  • BrickRED`FILEUPERMISSIONUUSERUREAD = 256
  • BrickRED`FILEUPERMISSIONUUSERUWRITE = 128
  • BrickRED`FILEUPERMISSIONUUSERUEXECUTE = 64
  • BrickRED`FILEUPERMISSIONUGROUPUALL = 56
  • BrickRED`FILEUPERMISSIONUGROUPUREAD = 32
  • BrickRED`FILEUPERMISSIONUGROUPUWRITE = 16
  • BrickRED`FILEUPERMISSIONUGROUPUEXECUTE = 8
  • BrickRED`FILEUPERMISSIONUOTHERSUALL = 7
  • BrickRED`FILEUPERMISSIONUOTHERSUREAD = 4
  • BrickRED`FILEUPERMISSIONUOTHERSUWRITE = 2
  • BrickRED`FILEUPERMISSIONUOTHERSUEXECUTE = 1
  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetProcesses[sessionId, out errorCode, out processesListId] → Null
Parameters:
  • sessionId -- Integer
  • errorCode -- Integer
  • processesListId -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@SpawnProcess[executableStringId, argumentsListId, environmentListId, workingDirectoryStringId, uid, gid, stdinFileId, stdoutFileId, stderrFileId, sessionId, out errorCode, out processId] → Null
Parameters:
  • executableStringId -- Integer
  • argumentsListId -- Integer
  • environmentListId -- Integer
  • workingDirectoryStringId -- Integer
  • uid -- Integer
  • gid -- Integer
  • stdinFileId -- Integer
  • stdoutFileId -- Integer
  • stderrFileId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • processId -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@KillProcess[processId, signal] → errorCode
Parameters:
  • processId -- Integer
  • signal -- Integer
Returns:
  • errorCode -- Integer

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:

  • BrickRED`PROCESSUSIGNALUINTERRUPT = 2
  • BrickRED`PROCESSUSIGNALUQUIT = 3
  • BrickRED`PROCESSUSIGNALUABORT = 6
  • BrickRED`PROCESSUSIGNALUKILL = 9
  • BrickRED`PROCESSUSIGNALUUSER1 = 10
  • BrickRED`PROCESSUSIGNALUUSER2 = 12
  • BrickRED`PROCESSUSIGNALUTERMINATE = 15
  • BrickRED`PROCESSUSIGNALUCONTINUE = 18
  • BrickRED`PROCESSUSIGNALUSTOP = 19
  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetProcessCommand[processId, sessionId, out errorCode, out executableStringId, out argumentsListId, out environmentListId, out workingDirectoryStringId] → Null
Parameters:
  • processId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • executableStringId -- Integer
  • argumentsListId -- Integer
  • environmentListId -- Integer
  • workingDirectoryStringId -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetProcessIdentity[processId, out errorCode, out pid, out uid, out gid] → Null
Parameters:
  • processId -- Integer
  • errorCode -- Integer
  • pid -- Integer
  • uid -- Integer
  • gid -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetProcessStdio[processId, sessionId, out errorCode, out stdinFileId, out stdoutFileId, out stderrFileId] → Null
Parameters:
  • processId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • stdinFileId -- Integer
  • stdoutFileId -- Integer
  • stderrFileId -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetProcessState[processId, out errorCode, out state, out timestamp, out exitCode] → Null
Parameters:
  • processId -- Integer
  • errorCode -- Integer
  • state -- Integer
  • timestamp -- Integer
  • exitCode -- Integer

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:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
  • BrickRED`PROCESSUSTATEUUNKNOWN = 0
  • BrickRED`PROCESSUSTATEURUNNING = 1
  • BrickRED`PROCESSUSTATEUERROR = 2
  • BrickRED`PROCESSUSTATEUEXITED = 3
  • BrickRED`PROCESSUSTATEUKILLED = 4
  • BrickRED`PROCESSUSTATEUSTOPPED = 5
BrickRED@GetPrograms[sessionId, out errorCode, out programsListId] → Null
Parameters:
  • sessionId -- Integer
  • errorCode -- Integer
  • programsListId -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@DefineProgram[identifierStringId, sessionId, out errorCode, out programId] → Null
Parameters:
  • identifierStringId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • programId -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@PurgeProgram[programId, cookie] → errorCode
Parameters:
  • programId -- Integer
  • cookie -- Integer
Returns:
  • errorCode -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetProgramIdentifier[programId, sessionId, out errorCode, out identifierStringId] → Null
Parameters:
  • programId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • identifierStringId -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetProgramRootDirectory[programId, sessionId, out errorCode, out rootDirectoryStringId] → Null
Parameters:
  • programId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • rootDirectoryStringId -- Integer

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

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@SetProgramCommand[programId, executableStringId, argumentsListId, environmentListId, workingDirectoryStringId] → errorCode
Parameters:
  • programId -- Integer
  • executableStringId -- Integer
  • argumentsListId -- Integer
  • environmentListId -- Integer
  • workingDirectoryStringId -- Integer
Returns:
  • errorCode -- Integer

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

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetProgramCommand[programId, sessionId, out errorCode, out executableStringId, out argumentsListId, out environmentListId, out workingDirectoryStringId] → Null
Parameters:
  • programId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • executableStringId -- Integer
  • argumentsListId -- Integer
  • environmentListId -- Integer
  • workingDirectoryStringId -- Integer

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

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@SetProgramStdioRedirection[programId, stdinRedirection, stdinFileNameStringId, stdoutRedirection, stdoutFileNameStringId, stderrRedirection, stderrFileNameStringId] → errorCode
Parameters:
  • programId -- Integer
  • stdinRedirection -- Integer
  • stdinFileNameStringId -- Integer
  • stdoutRedirection -- Integer
  • stdoutFileNameStringId -- Integer
  • stderrRedirection -- Integer
  • stderrFileNameStringId -- Integer
Returns:
  • errorCode -- Integer

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

The following constants are available for this function:

  • BrickRED`PROGRAMUSTDIOUREDIRECTIONUDEVUNULL = 0
  • BrickRED`PROGRAMUSTDIOUREDIRECTIONUPIPE = 1
  • BrickRED`PROGRAMUSTDIOUREDIRECTIONUFILE = 2
  • BrickRED`PROGRAMUSTDIOUREDIRECTIONUINDIVIDUALULOG = 3
  • BrickRED`PROGRAMUSTDIOUREDIRECTIONUCONTINUOUSULOG = 4
  • BrickRED`PROGRAMUSTDIOUREDIRECTIONUSTDOUT = 5
  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetProgramStdioRedirection[programId, sessionId, out errorCode, out stdinRedirection, out stdinFileNameStringId, out stdoutRedirection, out stdoutFileNameStringId, out stderrRedirection, out stderrFileNameStringId] → Null
Parameters:
  • programId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • stdinRedirection -- Integer
  • stdinFileNameStringId -- Integer
  • stdoutRedirection -- Integer
  • stdoutFileNameStringId -- Integer
  • stderrRedirection -- Integer
  • stderrFileNameStringId -- Integer

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

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
  • BrickRED`PROGRAMUSTDIOUREDIRECTIONUDEVUNULL = 0
  • BrickRED`PROGRAMUSTDIOUREDIRECTIONUPIPE = 1
  • BrickRED`PROGRAMUSTDIOUREDIRECTIONUFILE = 2
  • BrickRED`PROGRAMUSTDIOUREDIRECTIONUINDIVIDUALULOG = 3
  • BrickRED`PROGRAMUSTDIOUREDIRECTIONUCONTINUOUSULOG = 4
  • BrickRED`PROGRAMUSTDIOUREDIRECTIONUSTDOUT = 5
BrickRED@SetProgramSchedule[programId, startMode, continueAfterError, startInterval, startFieldsStringId] → errorCode
Parameters:
  • programId -- Integer
  • startMode -- Integer
  • continueAfterError -- True/False
  • startInterval -- Integer
  • startFieldsStringId -- Integer
Returns:
  • errorCode -- Integer

The following constants are available for this function:

  • BrickRED`PROGRAMUSTARTUMODEUNEVER = 0
  • BrickRED`PROGRAMUSTARTUMODEUALWAYS = 1
  • BrickRED`PROGRAMUSTARTUMODEUINTERVAL = 2
  • BrickRED`PROGRAMUSTARTUMODEUCRON = 3
  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetProgramSchedule[programId, sessionId, out errorCode, out startMode, out continueAfterError, out startInterval, out startFieldsStringId] → Null
Parameters:
  • programId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • startMode -- Integer
  • continueAfterError -- True/False
  • startInterval -- Integer
  • startFieldsStringId -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
  • BrickRED`PROGRAMUSTARTUMODEUNEVER = 0
  • BrickRED`PROGRAMUSTARTUMODEUALWAYS = 1
  • BrickRED`PROGRAMUSTARTUMODEUINTERVAL = 2
  • BrickRED`PROGRAMUSTARTUMODEUCRON = 3
BrickRED@GetProgramSchedulerState[programId, sessionId, out errorCode, out state, out timestamp, out messageStringId] → Null
Parameters:
  • programId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • state -- Integer
  • timestamp -- Integer
  • messageStringId -- Integer

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

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
  • BrickRED`PROGRAMUSCHEDULERUSTATEUSTOPPED = 0
  • BrickRED`PROGRAMUSCHEDULERUSTATEURUNNING = 1
BrickRED@ContinueProgramSchedule[programId] → errorCode
Parameters:
  • programId -- Integer
Returns:
  • errorCode -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@StartProgram[programId] → errorCode
Parameters:
  • programId -- Integer
Returns:
  • errorCode -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetLastSpawnedProgramProcess[programId, sessionId, out errorCode, out processId, out timestamp] → Null
Parameters:
  • programId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • processId -- Integer
  • timestamp -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetCustomProgramOptionNames[programId, sessionId, out errorCode, out namesListId] → Null
Parameters:
  • programId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • namesListId -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@SetCustomProgramOptionValue[programId, nameStringId, valueStringId] → errorCode
Parameters:
  • programId -- Integer
  • nameStringId -- Integer
  • valueStringId -- Integer
Returns:
  • errorCode -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetCustomProgramOptionValue[programId, nameStringId, sessionId, out errorCode, out valueStringId] → Null
Parameters:
  • programId -- Integer
  • nameStringId -- Integer
  • sessionId -- Integer
  • errorCode -- Integer
  • valueStringId -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@RemoveCustomProgramOption[programId, nameStringId] → errorCode
Parameters:
  • programId -- Integer
  • nameStringId -- Integer
Returns:
  • errorCode -- Integer

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
BrickRED@GetAPIVersion[] → {apiVersion1, apiVersion2, apiVersion3}
Returns:
  • apiVersioni -- Integer

Returns the version of the API definition (major, minor, revision) implemented by this API bindings. This is neither the release version of this API bindings nor does it tell you anything about the represented Brick or Bricklet.

BrickRED@GetResponseExpected[functionId] → responseExpected
Parameters:
  • functionId -- Integer
Returns:
  • responseExpected -- True/False

Returns the response expected flag for the function specified by the function ID parameter. It is true if the function is expected to send a response, false otherwise.

For getter functions this is enabled by default and cannot be disabled, because those functions will always send a response. For callback configuration functions it is enabled by default too, but can be disabled by SetResponseExpected[]. For setter functions it is disabled by default and can be enabled.

Enabling the response expected flag for a setter function allows to detect timeouts and other error conditions calls of this setter as well. The device will then send a response for this purpose. If this flag is disabled for a setter function then no response is send and errors are silently ignored, because they cannot be detected.

See SetResponseExpected[] for the list of function ID constants available for this function.

BrickRED@SetResponseExpected[functionId, responseExpected] → Null
Parameters:
  • functionId -- Integer
  • responseExpected -- True/False

Changes the response expected flag of the function specified by the function ID parameter. This flag can only be changed for setter (default value: false) and callback configuration functions (default value: true). For getter functions it is always enabled.

Enabling the response expected flag for a setter function allows to detect timeouts and other error conditions calls of this setter as well. The device will then send a response for this purpose. If this flag is disabled for a setter function then no response is send and errors are silently ignored, because they cannot be detected.

The following function ID constants are available for this function:

  • BrickRED`FUNCTIONUEXPIREUSESSIONUUNCHECKED = 3
  • BrickRED`FUNCTIONURELEASEUOBJECTUUNCHECKED = 6
  • BrickRED`FUNCTIONUREADUFILEUASYNC = 21
  • BrickRED`FUNCTIONUWRITEUFILEUUNCHECKED = 24
  • BrickRED`FUNCTIONUWRITEUFILEUASYNC = 25
BrickRED@SetResponseExpectedAll[responseExpected] → Null
Parameters:
  • responseExpected -- True/False

Changes the response expected flag for all setter and callback configuration functions of this device at once.

BrickRED@GetIdentity[out uid, out connectedUid, out position, out {hardwareVersion1, hardwareVersion2, hardwareVersion3}, out {firmwareVersion1, firmwareVersion2, firmwareVersion3}, out deviceIdentifier] → Null
Parameters:
  • uid -- String
  • connectedUid -- String
  • position -- Integer
  • hardwareVersioni -- Integer
  • firmwareVersioni -- Integer
  • deviceIdentifier -- Integer

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 can be '0'-'8' (stack position).

The device identifier numbers can be found here. There is also a constant for the device identifier of this Brick.

Callbacks

Callbacks can be registered to receive time critical or recurring data from the device. The registration is done by assigning a function to a callback property of the device object:

MyCallback[sender_,value_]:=Print["Value: "<>ToString[value]]

AddEventHandler[red@ExampleCallback,MyCallback]

For further information about event handling using .NET/Link see the corresponding Mathematica .NET/Link documentation.

The available callback property and their type of parameters are described below.

Note

Using callbacks for recurring events is always preferred compared to using getters. It will use less USB bandwidth and the latency will be a lot better, since there is no round trip time.

event BrickRED@AsyncFileReadCallback[sender, fileId, errorCode, {buffer1, buffer2, ..., buffer60}, lengthRead]
Parameters:
  • sender -- NETObject[BrickRED]
  • fileId -- Integer
  • errorCode -- Integer
  • bufferi -- Integer
  • lengthRead -- Integer

This callback reports the result of a call to the ReadFileAsync[] function.

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
event BrickRED@AsyncFileWriteCallback[sender, fileId, errorCode, lengthWritten]
Parameters:
  • sender -- NETObject[BrickRED]
  • fileId -- Integer
  • errorCode -- Integer
  • lengthWritten -- Integer

This callback reports the result of a call to the WriteFileAsync[] function.

The following constants are available for this function:

  • BrickRED`ERRORUCODEUSUCCESS = 0
  • BrickRED`ERRORUCODEUUNKNOWNUERROR = 1
  • BrickRED`ERRORUCODEUINVALIDUOPERATION = 2
  • BrickRED`ERRORUCODEUOPERATIONUABORTED = 3
  • BrickRED`ERRORUCODEUINTERNALUERROR = 4
  • BrickRED`ERRORUCODEUUNKNOWNUSESSIONUID = 5
  • BrickRED`ERRORUCODEUNOUFREEUSESSIONUID = 6
  • BrickRED`ERRORUCODEUUNKNOWNUOBJECTUID = 7
  • BrickRED`ERRORUCODEUNOUFREEUOBJECTUID = 8
  • BrickRED`ERRORUCODEUOBJECTUISULOCKED = 9
  • BrickRED`ERRORUCODEUNOUMOREUDATA = 10
  • BrickRED`ERRORUCODEUWRONGULISTUITEMUTYPE = 11
  • BrickRED`ERRORUCODEUPROGRAMUISUPURGED = 12
  • BrickRED`ERRORUCODEUINVALIDUPARAMETER = 128
  • BrickRED`ERRORUCODEUNOUFREEUMEMORY = 129
  • BrickRED`ERRORUCODEUNOUFREEUSPACE = 130
  • BrickRED`ERRORUCODEUACCESSUDENIED = 121
  • BrickRED`ERRORUCODEUALREADYUEXISTS = 132
  • BrickRED`ERRORUCODEUDOESUNOTUEXIST = 133
  • BrickRED`ERRORUCODEUINTERRUPTED = 134
  • BrickRED`ERRORUCODEUISUDIRECTORY = 135
  • BrickRED`ERRORUCODEUNOTUAUDIRECTORY = 136
  • BrickRED`ERRORUCODEUWOULDUBLOCK = 137
  • BrickRED`ERRORUCODEUOVERFLOW = 138
  • BrickRED`ERRORUCODEUBADUFILEUDESCRIPTOR = 139
  • BrickRED`ERRORUCODEUOUTUOFURANGE = 140
  • BrickRED`ERRORUCODEUNAMEUTOOULONG = 141
  • BrickRED`ERRORUCODEUINVALIDUSEEK = 142
  • BrickRED`ERRORUCODEUNOTUSUPPORTED = 143
  • BrickRED`ERRORUCODEUTOOUMANYUOPENUFILES = 144
event BrickRED@FileEventsOccurredCallback[sender, fileId, events]
Parameters:
  • sender -- NETObject[BrickRED]
  • fileId -- Integer
  • events -- Integer

The following constants are available for this function:

  • BrickRED`FILEUEVENTUREADABLE = 1
  • BrickRED`FILEUEVENTUWRITABLE = 2
event BrickRED@ProcessStateChangedCallback[sender, processId, state, timestamp, exitCode]
Parameters:
  • sender -- NETObject[BrickRED]
  • processId -- Integer
  • state -- Integer
  • timestamp -- Integer
  • exitCode -- Integer

The following constants are available for this function:

  • BrickRED`PROCESSUSTATEUUNKNOWN = 0
  • BrickRED`PROCESSUSTATEURUNNING = 1
  • BrickRED`PROCESSUSTATEUERROR = 2
  • BrickRED`PROCESSUSTATEUEXITED = 3
  • BrickRED`PROCESSUSTATEUKILLED = 4
  • BrickRED`PROCESSUSTATEUSTOPPED = 5
event BrickRED@ProgramSchedulerStateChangedCallback[sender, programId]
Parameters:
  • sender -- NETObject[BrickRED]
  • programId -- Integer
event BrickRED@ProgramProcessSpawnedCallback[sender, programId]
Parameters:
  • sender -- NETObject[BrickRED]
  • programId -- Integer

Constants

BrickRED`DEVICEUIDENTIFIER

This constant is used to identify a RED Brick.

The GetIdentity[] function and the EnumerateCallback callback of the IP Connection have a deviceIdentifier parameter to specify the Brick's or Bricklet's type.

BrickRED`DEVICEDISPLAYNAME

This constant represents the human readable name of a RED Brick.