Skip to content

file_wos

pierre drezet edited this page Aug 20, 2025 · 3 revisions
FILE_WriteOnly_String Misc ↓ Params ↓ Ports ↓

This components allows string data presented to the data input [In]data to be written to a file. The data presented to the input port [In]path specifies the path of the file to open. The path is relative to the User Data directory, "userdata", in the eRT installation directory. If no data is presented to [In]path then the file path is specified using the File name parameter.

It is also possible to specify an absolute path for the file by prefixing "localhost:" to the file path. Users are advised not to use this method as the absolute file path is device dependent.

The data can be structured in the file through the use of a fixed width format where the width of the data to be written is specified by the Field Width parameter or delimitered using a delimiter specified by the Delimiter parameter. The use of the Field Width parameter means that each data item written to the file is truncated or padded with spaces to the specified width and similarly the use of the Delimiter parameter will use the specified delimiter to separate data each time it is written to the file.

Please note that the delimiter must be enclosed in brackets so that "( )" indicates the use of a single space as a delimiter and "(\n)" denotes the use of a line break as a delimiter. A Field Width of "0" indicates that no fixed width is used to structure the data and a Delimiter of "()" or "" indicates that no delimiter is used. A combination of fixed width and delimeters can be used.

The file must be opened before it can be written to using the input event [In]open. If the file does not exist it is created. If the file does exist then the Append parameter specifies if the file is truncated to an empty file when the file is opened or whether new data is appended to the existing data. If there is an error when opening, closing or writing to the file then an error code is presented to the data output [Out]err code and the corresponding error event is asserted.

The file is closed when the input event [In]close is triggered and is released ready to be opened by another process. Please note that the input event [In]open closes a previously opened file before opening another. Therefore if multiple files are being written to, it is not necessary to trigger the input event [In]close inbetween the opening, and writing to, each file.

name type default min. max. description
File name String out.txt None None The output file path. Escap spaces in filenames with a \. If the includes a ? in the name it will use the preseeding string as the final filename but will replace the ? with a . while the file is open so that long file writes can overlap Other files accessing the orginal file.
Field Width Integer 0 0 100 Fixed Width data structure
Delimiter String () None None Character used to delimit data, in the form "(x)" where "x" is the delimiter
Append Boolean 0 0 1 Boolean value to indicate if the file is appended to or overwritten when opened
In Ev.
open Input event, opens the file in preparation for writing.
close Input event, closes the file and release it ready for another process to use
write Input event, writes the data to the file
Data In
path Data input, the file path, relative to the User Data directory, of the file to open
data Data input, the data to be written the file
Data Out
err code Data output, an error code produced if the input events open, close or write fail
Out Ev.
.. Output event, triggered if the file is opened succesfully.
err Output event, triggered if there is an error opening the file
.. Output event, triggered if the file is closed succesfully.
err Output event, triggered if there is an error closing the file
.. Output event, triggered if the file is written to succesfully.
inc Asserted if and only if an increment event is received and the count is less than the maximum threshold.
State Machine NONE

Toolbox Core Version v1.0.
Licence Type MPL2.0 Component Supplier inx ltd.
Minumum DCC A0000 Profiles All.

Core Components

Events & Triggers

State Management

  • STATE - Represents a State in Lucid
  • state_condition - Event driven state condition --> transition and actions
  • state_debug - To debug state machines this function block is required.
  • state_manager - Each state machine is defined by a State Manager

Array & Data Structures

Buffers & Queues

Primitive Data Constants

Data Converters

Boolean Logic



Mathematics

Alebraic Evaluation

Mathematical Operators

Inequalities

Trigonometry

Other Functions

Data Selection

  • indexed_mux_int - Indexed Mux Int
  • indexed_mux_str - Indexed Mux String
  • map_int - Map Int
  • mux_1b - mux_1b
  • mux_1i - mux_1i
  • mux_1r - mux_1r
  • mux_1s - mux_1s
  • mux_2b - MultiplexTwo Input Bool
  • mux_2i - MultiplexTwo Input Int
  • mux_2r - MultiplexTwo Input Real
  • mux_2s - MultiplexTwo Input String
  • mux_3b - MultiplexThree Input Bool
  • mux_3i - MultiplexThree Input Int
  • mux_3r - MultiplexThree Input Real
  • mux_3s - MultiplexThree Input String
  • mux_4b - MultiplexFour Input Bool
  • mux_4i - MultiplexFour Input Int
  • mux_4r - MultiplexFour Input Real
  • mux_4s - MultiplexFour Input String
  • mux_8b - 8-Input Indexed Boolean Multiplexer Function Block
  • mux_8i - 8-Input Indexed Integer Multiplexer Function Block
  • mux_8r - 8-Input Real Number Multiplexer Function Block
  • mux_8s - Number Multiplexer Function Block
  • num_mux - Numeric Multiplexer Function Block

Data Processing & Parsers

Database & Storage

Demultiplexers

String Functions

File Operations



Basic IO Components

GPIO & Hardware I/O



Graphics and UI Components

GUI & User Interface

User Input

  • keypress - Reads key presses & control keys

Unity & Web Integration

  • inx-unity - Provides media and animation widget interface
  • unity2 - Unity 3D
  • webkit - JavaScript/WebKit Interface (Obsolete)

Language & Localization



Media Components

Audio & Media

Digital TV & Media Control



Communications Components

TCPIP Network & Communication

Wireless & LPWAN Networks

Fieldbus Comms



Digital Signal Processing

  • ADC Polled Analogue to Digital converter.
  • ADC_continuous Advanced ADC supporting clocked ISR modes and advanced signal averaging.
  • FFT8 Fast Fourier Transform of 8 bit binary input data
  • FIR8 Finite Impulse Response filter for 8 bit binary data.
  • IIR8 Infinite Impulse Response filter for 8 bit binary data.
  • [calibrate](ADC calibrate) - Calibrates the ADCs


Control Systems Components

PID Controllers



Machine Learning & Machine Vision

  • mv_camera - Provides access to camera input data image streams
  • mv_idsplay - Renders camera image streams.
  • mv_resize - Resizes an image using given interpolation method
  • mv_crop - Crops and image width and height at a give offset
  • mv_apriltag_reader Plain Old Prgramming AprilTag Reader
  • ml_tflite_inference Machine learning model inference.
  • ml_osvm Online iterative machine learning (training& inference).


Platform Components

System Utilities

  • reboot - Reboot the device
  • rtc - RealTimeClock - provdes date/time from RTC device or OS.
  • rtinfo - RuntimeInfo (e.g. MAC/IP address, memory,... )
  • scheduler - Weekly Scheduler
  • system_exec - Executes linux shell commands
  • rng - Random Number Generator (may use hardware RNG)

Time Components

Application Management

Over the Air Update (OTA)

  • ota - OTA Function Block for updating firmware
  • ota_data_parser - Assembles OTA data files from Devman.


Non-functional Components

Some function blocks that can be used Lucid app are for visual/organisation purposes only and do not translate into any executable ert-components.

Sub System Input/Output Ports

-Note this file is autogenerated from ert-config help files and may not currently be complete or properly categorised!

Clone this wiki locally