TopCon API  1.1.0
.Net API to control TopCon devices
CH.Regatron.HPPS.SolarArraySimulation.DataCollector Class Reference

More...

Inheritance diagram for CH.Regatron.HPPS.SolarArraySimulation.DataCollector:
Inheritance graph

Public Member Functions

 DataCollector (Device.TopCon myTopCon, UInt32 collectorID)
 Generates internal ChannelList object. ( implicitly calls method initChannelArray()). More...
 
void InitChannelArray ()
 This method resets alle items in the channelArray to null. This means that no channel is connected to any data signal. More...
 
UInt32 GetMaxNumberOfChannels ()
 This method returns the number of channels available for this DataCollector object. More...
 
Boolean IsAtLeastOneChannelSet ()
 This method returns true if at least one DataCollector channel ist set. More...
 
DC_ScopeChannel GetChannelDefinition (UInt32 channNumber)
 This method returns the channel definition it it was set before, null otherwise. More...
 
void SetChannelDefinition (UInt32 channelNumber, String scopeChannelIdentifier)
 This method allows to define channels of the DataCollector by defining the channel number and the -shortDescription- of the channel. More...
 
String GetChannelIdentifierAsSingleString ()
 This method returns a String representation of all channels currently set in this DataCollector. More...
 
String GetIdentifierOfChannel (UInt32 channNumber)
 This method returns the short description (identifier) of the channel with index given as parameter. More...
 
void SetSaveDirectory (String saveDirectory)
 This method allows to define the directory where More...
 
void SetSaveDirectory (String saveDirectory, Boolean forceCreation)
 This method allows to define the directory where More...
 
String GetSavePath ()
 This method returns the path where the data is saved. More...
 
UInt32 GetSamplingRateInMilliseconds ()
 This method allows to read the sampling time of the dataCollector object. More...
 
void SetDataCollectorSamplingRateInMilliseconds (UInt32 newSamplingTimeInMs)
 This method allows to set the sampling rate of the data collector. There exist minimal and maximal values for the time between two samples ( commonly: 100 .... 10.000ms). More...
 
void Start ()
 This method starts the data collector.
The following exception messages can occur:
More...
 
void Stop ()
 This command stops the current execution of the Data Collector and finishes the protocol of the recorded data in the CSV file. More...
 
Boolean IsRunning ()
 This method indicates if the data collector is running. More...
 
string GetLastError ()
 Get the last exception message. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ DataCollector()

CH.Regatron.HPPS.SolarArraySimulation.DataCollector.DataCollector ( Device.TopCon  myTopCon,
UInt32  collectorID 
)

Generates internal ChannelList object. ( implicitly calls method initChannelArray()).

Parameters
myTopConReference to the parent TopCon object.
collectorIDThis number is used to identify the different DataColletor objects; range: [1...3]

Member Function Documentation

◆ GetChannelDefinition()

DC_ScopeChannel CH.Regatron.HPPS.SolarArraySimulation.DataCollector.GetChannelDefinition ( UInt32  channNumber)

This method returns the channel definition it it was set before, null otherwise.

Parameters
channNumberIndex number of the channel of interest 1 to use GetMaxNumberOfChannels() to determine the upper limit)
Returns
DC_ScopeChannel object that previously has been assigned to that channel. Null otherwise.

◆ GetChannelIdentifierAsSingleString()

String CH.Regatron.HPPS.SolarArraySimulation.DataCollector.GetChannelIdentifierAsSingleString ( )

This method returns a String representation of all channels currently set in this DataCollector.

Returns
A string representation (shortDescription) with a text list of all items in the dataCollector.
Example:.
[VOLTAGE_ACT] [CURRENT_ACT] [POWER_ACT] [VOLTAGE_REF] [CURRENT_REF] [POWER_REF] [SAS_MPP_VOLTAGE_SCALED] [SAS_M ....

◆ GetIdentifierOfChannel()

String CH.Regatron.HPPS.SolarArraySimulation.DataCollector.GetIdentifierOfChannel ( UInt32  channNumber)

This method returns the short description (identifier) of the channel with index given as parameter.

Parameters
channNumberUnsigned integer, used as index of the channel to be used (1...n).
Returns
The short description of the indicated channel.

◆ GetLastError()

string CH.Regatron.HPPS.SolarArraySimulation.DataCollector.GetLastError ( )

Get the last exception message.

Returns

Implements CH.Regatron.HPPS.IExceptionMessenger.

◆ GetMaxNumberOfChannels()

UInt32 CH.Regatron.HPPS.SolarArraySimulation.DataCollector.GetMaxNumberOfChannels ( )

This method returns the number of channels available for this DataCollector object.

Returns
Integer to be interpreted as number of channels available.

◆ GetSamplingRateInMilliseconds()

UInt32 CH.Regatron.HPPS.SolarArraySimulation.DataCollector.GetSamplingRateInMilliseconds ( )

This method allows to read the sampling time of the dataCollector object.

Returns
Number of ms between two subsequent data samples.

◆ GetSavePath()

String CH.Regatron.HPPS.SolarArraySimulation.DataCollector.GetSavePath ( )

This method returns the path where the data is saved.

Returns
A string containing the path to the CSV file where the collected data is stored

◆ InitChannelArray()

void CH.Regatron.HPPS.SolarArraySimulation.DataCollector.InitChannelArray ( )

This method resets alle items in the channelArray to null. This means that no channel is connected to any data signal.

◆ IsAtLeastOneChannelSet()

Boolean CH.Regatron.HPPS.SolarArraySimulation.DataCollector.IsAtLeastOneChannelSet ( )

This method returns true if at least one DataCollector channel ist set.

Returns
true if at least one channel is defined by a ChannelDefinition, false otherwise.

◆ IsRunning()

Boolean CH.Regatron.HPPS.SolarArraySimulation.DataCollector.IsRunning ( )

This method indicates if the data collector is running.

Returns
true if the data collector is running, false otherwise.

◆ SetChannelDefinition()

void CH.Regatron.HPPS.SolarArraySimulation.DataCollector.SetChannelDefinition ( UInt32  channelNumber,
String  scopeChannelIdentifier 
)

This method allows to define channels of the DataCollector by defining the channel number and the -shortDescription- of the channel.

Parameters
channelNumberNumber of the channel to be used
scopeChannelIdentifierString that identifies the channel. Call

◆ SetDataCollectorSamplingRateInMilliseconds()

void CH.Regatron.HPPS.SolarArraySimulation.DataCollector.SetDataCollectorSamplingRateInMilliseconds ( UInt32  newSamplingTimeInMs)

This method allows to set the sampling rate of the data collector. There exist minimal and maximal values for the time between two samples ( commonly: 100 .... 10.000ms).

Parameters
newSamplingTimeInMssamolin time in [ms]

◆ SetSaveDirectory() [1/2]

void CH.Regatron.HPPS.SolarArraySimulation.DataCollector.SetSaveDirectory ( String  saveDirectory)

This method allows to define the directory where

Parameters
saveDirectoryString representing the directory where the collected data should be stored.
Example: "C:/Regatron/Data/"

◆ SetSaveDirectory() [2/2]

void CH.Regatron.HPPS.SolarArraySimulation.DataCollector.SetSaveDirectory ( String  saveDirectory,
Boolean  forceCreation 
)

This method allows to define the directory where

Parameters
saveDirectoryString representing the directory where the collected data should be stored.
Example: "C:/Regatron/Data/"
forceCreationIf true: forces the creation of this directory if it does not exist
otherwise: Exception if it does not exist.

◆ Start()

void CH.Regatron.HPPS.SolarArraySimulation.DataCollector.Start ( )

This method starts the data collector.
The following exception messages can occur:

  • Option not available ...'
  • No data channel is set! ...'.
Exceptions
CH.Regatron.HPPS.Device.TopConException

◆ Stop()

void CH.Regatron.HPPS.SolarArraySimulation.DataCollector.Stop ( )

This command stops the current execution of the Data Collector and finishes the protocol of the recorded data in the CSV file.