pub struct RedBrick { /* private fields */ }
Expand description
Executes user programs and controls other Bricks/Bricklets standalone
Implementations§
Source§impl RedBrick
impl RedBrick
pub const DEVICE_IDENTIFIER: u16 = 17u16
pub const DEVICE_DISPLAY_NAME: &'static str = "RED Brick"
Sourcepub fn new(uid: Uid, connection: AsyncIpConnection) -> RedBrick
pub fn new(uid: Uid, connection: AsyncIpConnection) -> RedBrick
Creates an object with the unique device ID uid
. This object can then be used after the IP Connection ip_connection
is connected.
Sourcepub fn get_response_expected(
&mut self,
fun: RedBrickFunction,
) -> Result<bool, GetResponseExpectedError>
pub fn get_response_expected( &mut self, fun: RedBrickFunction, ) -> Result<bool, GetResponseExpectedError>
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 set_response_expected
.
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 sent and errors are silently ignored, because they cannot be detected.
See set_response_expected
for the list of function ID constants available for this function.
Sourcepub fn set_response_expected(
&mut self,
fun: RedBrickFunction,
response_expected: bool,
) -> Result<(), SetResponseExpectedError>
pub fn set_response_expected( &mut self, fun: RedBrickFunction, response_expected: bool, ) -> Result<(), SetResponseExpectedError>
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 sent and errors are silently ignored, because they cannot be detected.
Sourcepub fn set_response_expected_all(&mut self, response_expected: bool)
pub fn set_response_expected_all(&mut self, response_expected: bool)
Changes the response expected flag for all setter and callback configuration functions of this device at once.
Sourcepub fn get_api_version(&self) -> [u8; 3]
pub fn get_api_version(&self) -> [u8; 3]
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.
Sourcepub async fn get_async_file_read_callback_receiver(
&mut self,
) -> impl Stream<Item = AsyncFileReadEvent>
pub async fn get_async_file_read_callback_receiver( &mut self, ) -> impl Stream<Item = AsyncFileReadEvent>
This receiver reports the result of a call to the read_file_async
function.
Sourcepub async fn get_async_file_write_callback_receiver(
&mut self,
) -> impl Stream<Item = AsyncFileWriteEvent>
pub async fn get_async_file_write_callback_receiver( &mut self, ) -> impl Stream<Item = AsyncFileWriteEvent>
This receiver reports the result of a call to the [write_file_async
]
function.
Sourcepub async fn get_file_events_occurred_callback_receiver(
&mut self,
) -> impl Stream<Item = FileEventsOccurredEvent>
pub async fn get_file_events_occurred_callback_receiver( &mut self, ) -> impl Stream<Item = FileEventsOccurredEvent>
Sourcepub async fn get_process_state_changed_callback_receiver(
&mut self,
) -> impl Stream<Item = ProcessStateChangedEvent>
pub async fn get_process_state_changed_callback_receiver( &mut self, ) -> impl Stream<Item = ProcessStateChangedEvent>
Sourcepub async fn get_program_scheduler_state_changed_callback_receiver(
&mut self,
) -> impl Stream<Item = u16>
pub async fn get_program_scheduler_state_changed_callback_receiver( &mut self, ) -> impl Stream<Item = u16>
Sourcepub async fn get_program_process_spawned_callback_receiver(
&mut self,
) -> impl Stream<Item = u16>
pub async fn get_program_process_spawned_callback_receiver( &mut self, ) -> impl Stream<Item = u16>
Sourcepub async fn create_session(
&mut self,
lifetime: u32,
) -> Result<CreateSession, TinkerforgeError>
pub async fn create_session( &mut self, lifetime: u32, ) -> Result<CreateSession, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn expire_session(
&mut self,
session_id: u16,
) -> Result<u8, TinkerforgeError>
pub async fn expire_session( &mut self, session_id: u16, ) -> Result<u8, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn expire_session_unchecked(
&mut self,
session_id: u16,
) -> Result<(), TinkerforgeError>
pub async fn expire_session_unchecked( &mut self, session_id: u16, ) -> Result<(), TinkerforgeError>
Sourcepub async fn keep_session_alive(
&mut self,
session_id: u16,
lifetime: u32,
) -> Result<u8, TinkerforgeError>
pub async fn keep_session_alive( &mut self, session_id: u16, lifetime: u32, ) -> Result<u8, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn release_object(
&mut self,
object_id: u16,
session_id: u16,
) -> Result<u8, TinkerforgeError>
pub async fn release_object( &mut self, object_id: u16, session_id: u16, ) -> Result<u8, TinkerforgeError>
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.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn release_object_unchecked(
&mut self,
object_id: u16,
session_id: u16,
) -> Result<(), TinkerforgeError>
pub async fn release_object_unchecked( &mut self, object_id: u16, session_id: u16, ) -> Result<(), TinkerforgeError>
Sourcepub async fn allocate_string(
&mut self,
length_to_reserve: u32,
buffer: String,
session_id: u16,
) -> Result<AllocateString, TinkerforgeError>
pub async fn allocate_string( &mut self, length_to_reserve: u32, buffer: String, session_id: u16, ) -> Result<AllocateString, TinkerforgeError>
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.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn truncate_string(
&mut self,
string_id: u16,
length: u32,
) -> Result<u8, TinkerforgeError>
pub async fn truncate_string( &mut self, string_id: u16, length: u32, ) -> Result<u8, TinkerforgeError>
Truncates a string object to length
bytes and returns the resulting
error code.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_string_length(
&mut self,
string_id: u16,
) -> Result<StringLength, TinkerforgeError>
pub async fn get_string_length( &mut self, string_id: u16, ) -> Result<StringLength, TinkerforgeError>
Returns the length of a string object and the resulting error code.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn set_string_chunk(
&mut self,
string_id: u16,
offset: u32,
buffer: String,
) -> Result<u8, TinkerforgeError>
pub async fn set_string_chunk( &mut self, string_id: u16, offset: u32, buffer: String, ) -> Result<u8, TinkerforgeError>
Sets a chunk of up to 58 bytes in a string object beginning at offset
.
Returns the resulting error code.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_string_chunk(
&mut self,
string_id: u16,
offset: u32,
) -> Result<StringChunk, TinkerforgeError>
pub async fn get_string_chunk( &mut self, string_id: u16, offset: u32, ) -> Result<StringChunk, TinkerforgeError>
Returns a chunk up to 63 bytes from a string object beginning at offset
and
returns the resulting error code.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn allocate_list(
&mut self,
length_to_reserve: u16,
session_id: u16,
) -> Result<AllocateList, TinkerforgeError>
pub async fn allocate_list( &mut self, length_to_reserve: u16, session_id: u16, ) -> Result<AllocateList, TinkerforgeError>
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.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_list_length(
&mut self,
list_id: u16,
) -> Result<ListLength, TinkerforgeError>
pub async fn get_list_length( &mut self, list_id: u16, ) -> Result<ListLength, TinkerforgeError>
Returns the length of a list object in items and the resulting error code.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_list_item(
&mut self,
list_id: u16,
index: u16,
session_id: u16,
) -> Result<ListItem, TinkerforgeError>
pub async fn get_list_item( &mut self, list_id: u16, index: u16, session_id: u16, ) -> Result<ListItem, TinkerforgeError>
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
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
- RED_BRICK_OBJECT_TYPE_STRING
- RED_BRICK_OBJECT_TYPE_LIST
- RED_BRICK_OBJECT_TYPE_FILE
- RED_BRICK_OBJECT_TYPE_DIRECTORY
- RED_BRICK_OBJECT_TYPE_PROCESS
- RED_BRICK_OBJECT_TYPE_PROGRAM
Sourcepub async fn append_to_list(
&mut self,
list_id: u16,
item_object_id: u16,
) -> Result<u8, TinkerforgeError>
pub async fn append_to_list( &mut self, list_id: u16, item_object_id: u16, ) -> Result<u8, TinkerforgeError>
Appends an object to a list object and increases the reference count of the appended object by one.
Returns the resulting error code.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn remove_from_list(
&mut self,
list_id: u16,
index: u16,
) -> Result<u8, TinkerforgeError>
pub async fn remove_from_list( &mut self, list_id: u16, index: u16, ) -> Result<u8, TinkerforgeError>
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.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn open_file(
&mut self,
name_string_id: u16,
flags: u32,
permissions: u16,
uid: u32,
gid: u32,
session_id: u16,
) -> Result<OpenFile, TinkerforgeError>
pub async fn open_file( &mut self, name_string_id: u16, flags: u32, permissions: u16, uid: u32, gid: u32, session_id: u16, ) -> Result<OpenFile, TinkerforgeError>
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.
Associated constants:
- RED_BRICK_FILE_FLAG_READ_ONLY
- RED_BRICK_FILE_FLAG_WRITE_ONLY
- RED_BRICK_FILE_FLAG_READ_WRITE
- RED_BRICK_FILE_FLAG_APPEND
- RED_BRICK_FILE_FLAG_CREATE
- RED_BRICK_FILE_FLAG_EXCLUSIVE
- RED_BRICK_FILE_FLAG_NON_BLOCKING
- RED_BRICK_FILE_FLAG_TRUNCATE
- RED_BRICK_FILE_FLAG_TEMPORARY
- RED_BRICK_FILE_FLAG_REPLACE
- RED_BRICK_FILE_PERMISSION_USER_ALL
- RED_BRICK_FILE_PERMISSION_USER_READ
- RED_BRICK_FILE_PERMISSION_USER_WRITE
- RED_BRICK_FILE_PERMISSION_USER_EXECUTE
- RED_BRICK_FILE_PERMISSION_GROUP_ALL
- RED_BRICK_FILE_PERMISSION_GROUP_READ
- RED_BRICK_FILE_PERMISSION_GROUP_WRITE
- RED_BRICK_FILE_PERMISSION_GROUP_EXECUTE
- RED_BRICK_FILE_PERMISSION_OTHERS_ALL
- RED_BRICK_FILE_PERMISSION_OTHERS_READ
- RED_BRICK_FILE_PERMISSION_OTHERS_WRITE
- RED_BRICK_FILE_PERMISSION_OTHERS_EXECUTE
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn create_pipe(
&mut self,
flags: u32,
length: u64,
session_id: u16,
) -> Result<CreatePipe, TinkerforgeError>
pub async fn create_pipe( &mut self, flags: u32, length: u64, session_id: u16, ) -> Result<CreatePipe, TinkerforgeError>
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.
Associated constants:
- RED_BRICK_PIPE_FLAG_NON_BLOCKING_READ
- RED_BRICK_PIPE_FLAG_NON_BLOCKING_WRITE
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_file_info(
&mut self,
file_id: u16,
session_id: u16,
) -> Result<FileInfo, TinkerforgeError>
pub async fn get_file_info( &mut self, file_id: u16, session_id: u16, ) -> Result<FileInfo, TinkerforgeError>
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 [open_file
].
The returned flags were used to open or create the file object, as passed to
[open_file
] or [create_pipe
]. 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
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
- RED_BRICK_FILE_TYPE_UNKNOWN
- RED_BRICK_FILE_TYPE_REGULAR
- RED_BRICK_FILE_TYPE_DIRECTORY
- RED_BRICK_FILE_TYPE_CHARACTER
- RED_BRICK_FILE_TYPE_BLOCK
- RED_BRICK_FILE_TYPE_FIFO
- RED_BRICK_FILE_TYPE_SYMLINK
- RED_BRICK_FILE_TYPE_SOCKET
- RED_BRICK_FILE_TYPE_PIPE
- RED_BRICK_FILE_FLAG_READ_ONLY
- RED_BRICK_FILE_FLAG_WRITE_ONLY
- RED_BRICK_FILE_FLAG_READ_WRITE
- RED_BRICK_FILE_FLAG_APPEND
- RED_BRICK_FILE_FLAG_CREATE
- RED_BRICK_FILE_FLAG_EXCLUSIVE
- RED_BRICK_FILE_FLAG_NON_BLOCKING
- RED_BRICK_FILE_FLAG_TRUNCATE
- RED_BRICK_FILE_FLAG_TEMPORARY
- RED_BRICK_FILE_FLAG_REPLACE
- RED_BRICK_FILE_PERMISSION_USER_ALL
- RED_BRICK_FILE_PERMISSION_USER_READ
- RED_BRICK_FILE_PERMISSION_USER_WRITE
- RED_BRICK_FILE_PERMISSION_USER_EXECUTE
- RED_BRICK_FILE_PERMISSION_GROUP_ALL
- RED_BRICK_FILE_PERMISSION_GROUP_READ
- RED_BRICK_FILE_PERMISSION_GROUP_WRITE
- RED_BRICK_FILE_PERMISSION_GROUP_EXECUTE
- RED_BRICK_FILE_PERMISSION_OTHERS_ALL
- RED_BRICK_FILE_PERMISSION_OTHERS_READ
- RED_BRICK_FILE_PERMISSION_OTHERS_WRITE
- RED_BRICK_FILE_PERMISSION_OTHERS_EXECUTE
Sourcepub async fn read_file(
&mut self,
file_id: u16,
length_to_read: u8,
) -> Result<ReadFile, TinkerforgeError>
pub async fn read_file( &mut self, file_id: u16, length_to_read: u8, ) -> Result<ReadFile, TinkerforgeError>
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 [open_file
] without the NonBlocking
flag or by [create_pipe
] without the NonBlockingRead flag then the
error code NotSupported is returned.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn read_file_async(
&mut self,
file_id: u16,
length_to_read: u64,
) -> Result<(), TinkerforgeError>
pub async fn read_file_async( &mut self, file_id: u16, length_to_read: u64, ) -> Result<(), TinkerforgeError>
Reads up to 2\ :sup:63
\ - 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 [get_async_file_read_callback_receiver
] receiver.
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 [open_file
] without the NonBlocking
flag or by [create_pipe
] without the NonBlockingRead flag then the error
code NotSupported is reported via the [get_async_file_read_callback_receiver
] receiver.
Sourcepub async fn abort_async_file_read(
&mut self,
file_id: u16,
) -> Result<u8, TinkerforgeError>
pub async fn abort_async_file_read( &mut self, file_id: u16, ) -> Result<u8, TinkerforgeError>
Aborts a [read_file_async
] operation in progress.
Returns the resulting error code.
On success the [get_async_file_read_callback_receiver
] receiver will report OperationAborted.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn write_file(
&mut self,
file_id: u16,
buffer: &[u8; 61],
length_to_write: u8,
) -> Result<WriteFile, TinkerforgeError>
pub async fn write_file( &mut self, file_id: u16, buffer: &[u8; 61], length_to_write: u8, ) -> Result<WriteFile, TinkerforgeError>
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 [open_file
] without the NonBlocking
flag or by [create_pipe
] without the NonBlockingWrite flag then the
error code NotSupported is returned.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn write_file_unchecked(
&mut self,
file_id: u16,
buffer: &[u8; 61],
length_to_write: u8,
) -> Result<(), TinkerforgeError>
pub async fn write_file_unchecked( &mut self, file_id: u16, buffer: &[u8; 61], length_to_write: u8, ) -> Result<(), TinkerforgeError>
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 [open_file
] without the NonBlocking
flag or by [create_pipe
] without the NonBlockingWrite flag then the
write operation will fail silently.
Sourcepub async fn write_file_async(
&mut self,
file_id: u16,
buffer: &[u8; 61],
length_to_write: u8,
) -> Result<(), TinkerforgeError>
pub async fn write_file_async( &mut self, file_id: u16, buffer: &[u8; 61], length_to_write: u8, ) -> Result<(), TinkerforgeError>
Writes up to 61 bytes to a file object.
Reports the actual number of bytes written and the resulting error code via the
[get_async_file_write_callback_receiver
] receiver.
If the file object was created by [open_file
] without the NonBlocking
flag or by [create_pipe
] without the NonBlockingWrite flag then the
error code NotSupported is reported via the [get_async_file_write_callback_receiver
] receiver.
Sourcepub async fn set_file_position(
&mut self,
file_id: u16,
offset: i64,
origin: u8,
) -> Result<SetFilePosition, TinkerforgeError>
pub async fn set_file_position( &mut self, file_id: u16, offset: i64, origin: u8, ) -> Result<SetFilePosition, TinkerforgeError>
Set the current seek position of a file object relative to origin
.
Possible file origins are:
- Beginning = 0
- Current = 1
- End = 2
Returns the resulting absolute seek position and error code.
If the file object was created by [create_pipe
] then it has no seek
position and the error code InvalidSeek is returned.
Associated constants:
- RED_BRICK_FILE_ORIGIN_BEGINNING
- RED_BRICK_FILE_ORIGIN_CURRENT
- RED_BRICK_FILE_ORIGIN_END
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_file_position(
&mut self,
file_id: u16,
) -> Result<FilePosition, TinkerforgeError>
pub async fn get_file_position( &mut self, file_id: u16, ) -> Result<FilePosition, TinkerforgeError>
Returns the current seek position of a file object and returns the resulting error code.
If the file object was created by [create_pipe
] then it has no seek
position and the error code InvalidSeek is returned.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn set_file_events(
&mut self,
file_id: u16,
events: u16,
) -> Result<u8, TinkerforgeError>
pub async fn set_file_events( &mut self, file_id: u16, events: u16, ) -> Result<u8, TinkerforgeError>
Associated constants:
- RED_BRICK_FILE_EVENT_READABLE
- RED_BRICK_FILE_EVENT_WRITABLE
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_file_events(
&mut self,
file_id: u16,
) -> Result<FileEvents, TinkerforgeError>
pub async fn get_file_events( &mut self, file_id: u16, ) -> Result<FileEvents, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
- RED_BRICK_FILE_EVENT_READABLE
- RED_BRICK_FILE_EVENT_WRITABLE
Sourcepub async fn open_directory(
&mut self,
name_string_id: u16,
session_id: u16,
) -> Result<OpenDirectory, TinkerforgeError>
pub async fn open_directory( &mut self, name_string_id: u16, session_id: u16, ) -> Result<OpenDirectory, TinkerforgeError>
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.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_directory_name(
&mut self,
directory_id: u16,
session_id: u16,
) -> Result<DirectoryName, TinkerforgeError>
pub async fn get_directory_name( &mut self, directory_id: u16, session_id: u16, ) -> Result<DirectoryName, TinkerforgeError>
Returns the name of a directory object, as passed to [open_directory
], and
the resulting error code.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_next_directory_entry(
&mut self,
directory_id: u16,
session_id: u16,
) -> Result<NextDirectoryEntry, TinkerforgeError>
pub async fn get_next_directory_entry( &mut self, directory_id: u16, session_id: u16, ) -> Result<NextDirectoryEntry, TinkerforgeError>
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 [rewind_directory
].
Possible directory entry types are:
- Unknown = 0
- Regular = 1
- Directory = 2
- Character = 3
- Block = 4
- FIFO = 5
- Symlink = 6
- Socket = 7
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
- RED_BRICK_DIRECTORY_ENTRY_TYPE_UNKNOWN
- RED_BRICK_DIRECTORY_ENTRY_TYPE_REGULAR
- RED_BRICK_DIRECTORY_ENTRY_TYPE_DIRECTORY
- RED_BRICK_DIRECTORY_ENTRY_TYPE_CHARACTER
- RED_BRICK_DIRECTORY_ENTRY_TYPE_BLOCK
- RED_BRICK_DIRECTORY_ENTRY_TYPE_FIFO
- RED_BRICK_DIRECTORY_ENTRY_TYPE_SYMLINK
- RED_BRICK_DIRECTORY_ENTRY_TYPE_SOCKET
Sourcepub async fn rewind_directory(
&mut self,
directory_id: u16,
) -> Result<u8, TinkerforgeError>
pub async fn rewind_directory( &mut self, directory_id: u16, ) -> Result<u8, TinkerforgeError>
Rewinds a directory object and returns the resulting error code.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn create_directory(
&mut self,
name_string_id: u16,
flags: u32,
permissions: u16,
uid: u32,
gid: u32,
) -> Result<u8, TinkerforgeError>
pub async fn create_directory( &mut self, name_string_id: u16, flags: u32, permissions: u16, uid: u32, gid: u32, ) -> Result<u8, TinkerforgeError>
FIXME: name has to be absolute
Associated constants:
- RED_BRICK_DIRECTORY_FLAG_RECURSIVE
- RED_BRICK_DIRECTORY_FLAG_EXCLUSIVE
- RED_BRICK_FILE_PERMISSION_USER_ALL
- RED_BRICK_FILE_PERMISSION_USER_READ
- RED_BRICK_FILE_PERMISSION_USER_WRITE
- RED_BRICK_FILE_PERMISSION_USER_EXECUTE
- RED_BRICK_FILE_PERMISSION_GROUP_ALL
- RED_BRICK_FILE_PERMISSION_GROUP_READ
- RED_BRICK_FILE_PERMISSION_GROUP_WRITE
- RED_BRICK_FILE_PERMISSION_GROUP_EXECUTE
- RED_BRICK_FILE_PERMISSION_OTHERS_ALL
- RED_BRICK_FILE_PERMISSION_OTHERS_READ
- RED_BRICK_FILE_PERMISSION_OTHERS_WRITE
- RED_BRICK_FILE_PERMISSION_OTHERS_EXECUTE
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_processes(
&mut self,
session_id: u16,
) -> Result<Processes, TinkerforgeError>
pub async fn get_processes( &mut self, session_id: u16, ) -> Result<Processes, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn spawn_process(
&mut self,
executable_string_id: u16,
arguments_list_id: u16,
environment_list_id: u16,
working_directory_string_id: u16,
uid: u32,
gid: u32,
stdin_file_id: u16,
stdout_file_id: u16,
stderr_file_id: u16,
session_id: u16,
) -> Result<SpawnProcess, TinkerforgeError>
pub async fn spawn_process( &mut self, executable_string_id: u16, arguments_list_id: u16, environment_list_id: u16, working_directory_string_id: u16, uid: u32, gid: u32, stdin_file_id: u16, stdout_file_id: u16, stderr_file_id: u16, session_id: u16, ) -> Result<SpawnProcess, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn kill_process(
&mut self,
process_id: u16,
signal: u8,
) -> Result<u8, TinkerforgeError>
pub async fn kill_process( &mut self, process_id: u16, signal: u8, ) -> Result<u8, TinkerforgeError>
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
Associated constants:
- RED_BRICK_PROCESS_SIGNAL_INTERRUPT
- RED_BRICK_PROCESS_SIGNAL_QUIT
- RED_BRICK_PROCESS_SIGNAL_ABORT
- RED_BRICK_PROCESS_SIGNAL_KILL
- RED_BRICK_PROCESS_SIGNAL_USER1
- RED_BRICK_PROCESS_SIGNAL_USER2
- RED_BRICK_PROCESS_SIGNAL_TERMINATE
- RED_BRICK_PROCESS_SIGNAL_CONTINUE
- RED_BRICK_PROCESS_SIGNAL_STOP
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_process_command(
&mut self,
process_id: u16,
session_id: u16,
) -> Result<ProcessCommand, TinkerforgeError>
pub async fn get_process_command( &mut self, process_id: u16, session_id: u16, ) -> Result<ProcessCommand, TinkerforgeError>
Returns the executable, arguments, environment and working directory used to
spawn a process object, as passed to [spawn_process
], and the resulting
error code.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_process_identity(
&mut self,
process_id: u16,
) -> Result<ProcessIdentity, TinkerforgeError>
pub async fn get_process_identity( &mut self, process_id: u16, ) -> Result<ProcessIdentity, TinkerforgeError>
Returns the process ID and the user and group ID used to spawn a process object,
as passed to [spawn_process
], and the resulting error code.
The process ID is only valid if the state is Running or Stopped, see
[get_process_state
].
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_process_stdio(
&mut self,
process_id: u16,
session_id: u16,
) -> Result<ProcessStdio, TinkerforgeError>
pub async fn get_process_stdio( &mut self, process_id: u16, session_id: u16, ) -> Result<ProcessStdio, TinkerforgeError>
Returns the stdin, stdout and stderr files used to spawn a process object, as
passed to [spawn_process
], and the resulting error code.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_process_state(
&mut self,
process_id: u16,
) -> Result<ProcessState, TinkerforgeError>
pub async fn get_process_state( &mut self, process_id: u16, ) -> Result<ProcessState, TinkerforgeError>
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.
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
- RED_BRICK_PROCESS_STATE_UNKNOWN
- RED_BRICK_PROCESS_STATE_RUNNING
- RED_BRICK_PROCESS_STATE_ERROR
- RED_BRICK_PROCESS_STATE_EXITED
- RED_BRICK_PROCESS_STATE_KILLED
- RED_BRICK_PROCESS_STATE_STOPPED
Sourcepub async fn get_programs(
&mut self,
session_id: u16,
) -> Result<Programs, TinkerforgeError>
pub async fn get_programs( &mut self, session_id: u16, ) -> Result<Programs, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn define_program(
&mut self,
identifier_string_id: u16,
session_id: u16,
) -> Result<DefineProgram, TinkerforgeError>
pub async fn define_program( &mut self, identifier_string_id: u16, session_id: u16, ) -> Result<DefineProgram, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn purge_program(
&mut self,
program_id: u16,
cookie: u32,
) -> Result<u8, TinkerforgeError>
pub async fn purge_program( &mut self, program_id: u16, cookie: u32, ) -> Result<u8, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_program_identifier(
&mut self,
program_id: u16,
session_id: u16,
) -> Result<ProgramIdentifier, TinkerforgeError>
pub async fn get_program_identifier( &mut self, program_id: u16, session_id: u16, ) -> Result<ProgramIdentifier, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_program_root_directory(
&mut self,
program_id: u16,
session_id: u16,
) -> Result<ProgramRootDirectory, TinkerforgeError>
pub async fn get_program_root_directory( &mut self, program_id: u16, session_id: u16, ) -> Result<ProgramRootDirectory, TinkerforgeError>
FIXME: root directory is absolute:
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn set_program_command(
&mut self,
program_id: u16,
executable_string_id: u16,
arguments_list_id: u16,
environment_list_id: u16,
working_directory_string_id: u16,
) -> Result<u8, TinkerforgeError>
pub async fn set_program_command( &mut self, program_id: u16, executable_string_id: u16, arguments_list_id: u16, environment_list_id: u16, working_directory_string_id: u16, ) -> Result<u8, TinkerforgeError>
FIXME: working directory is relative to
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_program_command(
&mut self,
program_id: u16,
session_id: u16,
) -> Result<ProgramCommand, TinkerforgeError>
pub async fn get_program_command( &mut self, program_id: u16, session_id: u16, ) -> Result<ProgramCommand, TinkerforgeError>
FIXME: working directory is relative to
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn set_program_stdio_redirection(
&mut self,
program_id: u16,
stdin_redirection: u8,
stdin_file_name_string_id: u16,
stdout_redirection: u8,
stdout_file_name_string_id: u16,
stderr_redirection: u8,
stderr_file_name_string_id: u16,
) -> Result<u8, TinkerforgeError>
pub async fn set_program_stdio_redirection( &mut self, program_id: u16, stdin_redirection: u8, stdin_file_name_string_id: u16, stdout_redirection: u8, stdout_file_name_string_id: u16, stderr_redirection: u8, stderr_file_name_string_id: u16, ) -> Result<u8, TinkerforgeError>
FIXME: stdio file names are relative to
Associated constants:
- RED_BRICK_PROGRAM_STDIO_REDIRECTION_DEV_NULL
- RED_BRICK_PROGRAM_STDIO_REDIRECTION_PIPE
- RED_BRICK_PROGRAM_STDIO_REDIRECTION_FILE
- RED_BRICK_PROGRAM_STDIO_REDIRECTION_INDIVIDUAL_LOG
- RED_BRICK_PROGRAM_STDIO_REDIRECTION_CONTINUOUS_LOG
- RED_BRICK_PROGRAM_STDIO_REDIRECTION_STDOUT
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_program_stdio_redirection(
&mut self,
program_id: u16,
session_id: u16,
) -> Result<ProgramStdioRedirection, TinkerforgeError>
pub async fn get_program_stdio_redirection( &mut self, program_id: u16, session_id: u16, ) -> Result<ProgramStdioRedirection, TinkerforgeError>
FIXME: stdio file names are relative to
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
- RED_BRICK_PROGRAM_STDIO_REDIRECTION_DEV_NULL
- RED_BRICK_PROGRAM_STDIO_REDIRECTION_PIPE
- RED_BRICK_PROGRAM_STDIO_REDIRECTION_FILE
- RED_BRICK_PROGRAM_STDIO_REDIRECTION_INDIVIDUAL_LOG
- RED_BRICK_PROGRAM_STDIO_REDIRECTION_CONTINUOUS_LOG
- RED_BRICK_PROGRAM_STDIO_REDIRECTION_STDOUT
Sourcepub async fn set_program_schedule(
&mut self,
program_id: u16,
start_mode: u8,
continue_after_error: bool,
start_interval: u32,
start_fields_string_id: u16,
) -> Result<u8, TinkerforgeError>
pub async fn set_program_schedule( &mut self, program_id: u16, start_mode: u8, continue_after_error: bool, start_interval: u32, start_fields_string_id: u16, ) -> Result<u8, TinkerforgeError>
Associated constants:
- RED_BRICK_PROGRAM_START_MODE_NEVER
- RED_BRICK_PROGRAM_START_MODE_ALWAYS
- RED_BRICK_PROGRAM_START_MODE_INTERVAL
- RED_BRICK_PROGRAM_START_MODE_CRON
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_program_schedule(
&mut self,
program_id: u16,
session_id: u16,
) -> Result<ProgramSchedule, TinkerforgeError>
pub async fn get_program_schedule( &mut self, program_id: u16, session_id: u16, ) -> Result<ProgramSchedule, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
- RED_BRICK_PROGRAM_START_MODE_NEVER
- RED_BRICK_PROGRAM_START_MODE_ALWAYS
- RED_BRICK_PROGRAM_START_MODE_INTERVAL
- RED_BRICK_PROGRAM_START_MODE_CRON
Sourcepub async fn get_program_scheduler_state(
&mut self,
program_id: u16,
session_id: u16,
) -> Result<ProgramSchedulerState, TinkerforgeError>
pub async fn get_program_scheduler_state( &mut self, program_id: u16, session_id: u16, ) -> Result<ProgramSchedulerState, TinkerforgeError>
FIXME: message is currently valid in error-occurred state only
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
- RED_BRICK_PROGRAM_SCHEDULER_STATE_STOPPED
- RED_BRICK_PROGRAM_SCHEDULER_STATE_RUNNING
Sourcepub async fn continue_program_schedule(
&mut self,
program_id: u16,
) -> Result<u8, TinkerforgeError>
pub async fn continue_program_schedule( &mut self, program_id: u16, ) -> Result<u8, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn start_program(
&mut self,
program_id: u16,
) -> Result<u8, TinkerforgeError>
pub async fn start_program( &mut self, program_id: u16, ) -> Result<u8, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_last_spawned_program_process(
&mut self,
program_id: u16,
session_id: u16,
) -> Result<LastSpawnedProgramProcess, TinkerforgeError>
pub async fn get_last_spawned_program_process( &mut self, program_id: u16, session_id: u16, ) -> Result<LastSpawnedProgramProcess, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_custom_program_option_names(
&mut self,
program_id: u16,
session_id: u16,
) -> Result<CustomProgramOptionNames, TinkerforgeError>
pub async fn get_custom_program_option_names( &mut self, program_id: u16, session_id: u16, ) -> Result<CustomProgramOptionNames, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn set_custom_program_option_value(
&mut self,
program_id: u16,
name_string_id: u16,
value_string_id: u16,
) -> Result<u8, TinkerforgeError>
pub async fn set_custom_program_option_value( &mut self, program_id: u16, name_string_id: u16, value_string_id: u16, ) -> Result<u8, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_custom_program_option_value(
&mut self,
program_id: u16,
name_string_id: u16,
session_id: u16,
) -> Result<CustomProgramOptionValue, TinkerforgeError>
pub async fn get_custom_program_option_value( &mut self, program_id: u16, name_string_id: u16, session_id: u16, ) -> Result<CustomProgramOptionValue, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn remove_custom_program_option(
&mut self,
program_id: u16,
name_string_id: u16,
) -> Result<u8, TinkerforgeError>
pub async fn remove_custom_program_option( &mut self, program_id: u16, name_string_id: u16, ) -> Result<u8, TinkerforgeError>
Associated constants:
- RED_BRICK_ERROR_CODE_SUCCESS
- RED_BRICK_ERROR_CODE_UNKNOWN_ERROR
- RED_BRICK_ERROR_CODE_INVALID_OPERATION
- RED_BRICK_ERROR_CODE_OPERATION_ABORTED
- RED_BRICK_ERROR_CODE_INTERNAL_ERROR
- RED_BRICK_ERROR_CODE_UNKNOWN_SESSION_ID
- RED_BRICK_ERROR_CODE_NO_FREE_SESSION_ID
- RED_BRICK_ERROR_CODE_UNKNOWN_OBJECT_ID
- RED_BRICK_ERROR_CODE_NO_FREE_OBJECT_ID
- RED_BRICK_ERROR_CODE_OBJECT_IS_LOCKED
- RED_BRICK_ERROR_CODE_NO_MORE_DATA
- RED_BRICK_ERROR_CODE_WRONG_LIST_ITEM_TYPE
- RED_BRICK_ERROR_CODE_PROGRAM_IS_PURGED
- RED_BRICK_ERROR_CODE_INVALID_PARAMETER
- RED_BRICK_ERROR_CODE_NO_FREE_MEMORY
- RED_BRICK_ERROR_CODE_NO_FREE_SPACE
- RED_BRICK_ERROR_CODE_ACCESS_DENIED
- RED_BRICK_ERROR_CODE_ALREADY_EXISTS
- RED_BRICK_ERROR_CODE_DOES_NOT_EXIST
- RED_BRICK_ERROR_CODE_INTERRUPTED
- RED_BRICK_ERROR_CODE_IS_DIRECTORY
- RED_BRICK_ERROR_CODE_NOT_A_DIRECTORY
- RED_BRICK_ERROR_CODE_WOULD_BLOCK
- RED_BRICK_ERROR_CODE_OVERFLOW
- RED_BRICK_ERROR_CODE_BAD_FILE_DESCRIPTOR
- RED_BRICK_ERROR_CODE_OUT_OF_RANGE
- RED_BRICK_ERROR_CODE_NAME_TOO_LONG
- RED_BRICK_ERROR_CODE_INVALID_SEEK
- RED_BRICK_ERROR_CODE_NOT_SUPPORTED
- RED_BRICK_ERROR_CODE_TOO_MANY_OPEN_FILES
Sourcepub async fn get_identity(&mut self) -> Result<Identity, TinkerforgeError>
pub async fn get_identity(&mut self) -> Result<Identity, TinkerforgeError>
Returns the UID, the UID where the Brick is connected to, the position, the hardware and firmware version as well as the device identifier.
The position is the position in the stack from ‘0’ (bottom) to ‘8’ (top).
The device identifier numbers can be found here. |device_identifier_constant|