File Writer Interface¶
-
class
py4syn.writing.FileWriter.
FileWriter
(fileName)[source]¶ Class to be inherited by all data output classes in order to be transparently used in scan functions.
By default some informations such as username, start and end timestamp, command and others are already filled by the scan routines using the getters and setters bellow.
Constructor
Parameters: - fileName : string
The output filename
-
getDevicesData
()[source]¶ Returns the map containing all devices data in a map where the device mnemonic is the key and the values are an array.
Returns: - `map`
-
getSignalsData
()[source]¶ Returns the map containing all signals data in a map where the device mnemonic is the key and the values are an array.
Returns: - `map`
-
insertComment
(value)[source]¶ Insert a new comment in the list
Parameters: - value : string
Comment information
-
insertDevice
(value)[source]¶ Insert a new device in the list
Parameters: - value : string
Device mnemonic
-
insertDeviceData
(device, value)[source]¶ Insert a new data value for the informed device in the map.
Parameters: - device : string
Device mnemonic
- value : float, int, str, etc
Collected value
-
insertSignal
(value)[source]¶ Insert a new signal in the list
Parameters: - value : string
Signal mnemonic
-
insertSignalData
(signal, value)[source]¶ Insert a new data value for the informed signal in the map.
Parameters: - signal : string
Signal mnemonic
- value : float, int, str, etc
Collected value
-
setCommand
(value)[source]¶ Set the command information
Parameters: - value : string
Command information
-
setEndDate
(value)[source]¶ Set the end date
Parameters: - value : string
Date when the process finished
-
setStartDate
(value)[source]¶ Set the start date
Parameters: - value : string
Date when the process started
-
setUsername
(value)[source]¶ Set the username information
Parameters: - value : string
Username information