Structure TMSiRecordingConfig

TMSi Data Acquisition SDK

 
TMS International BV

TMSiRecordingConfig

typedef struct TMSiRecordingConfig
{
unsigned short StorageType;
unsigned short ADCSampRate;
unsigned short NumberOfChan;
unsigned int StartControl;
unsigned int EndControl;
unsigned int CardStatus;
unsigned int InitIdentifier;
char MeasureFileName[MAX_MEASUREFILENAME_LENGTH];
SYSTEMTIME AlarmTimeStart;
SYSTEMTIME AlarmTimeStop;
SYSTEMTIME AlarmTimeInterval;
unsigned int AlarmTimeCount;
unsigned int FrontEndSN;
unsigned int FrontEndAdpSN;/*!< Serial number of the Adapter connected to the Mobita during the measurement */
unsigned int RecordCondition;
SYSTEMTIME RFInterfStartTime;
SYSTEMTIME RFInterfStopTime;
SYSTEMTIME RFInterfInterval;
unsigned int RFInterfCount;
char PatientID[MAX_PATIENTID_LENGTH]; /*!< Patient identifier */
char UserString1[MAX_USERSTRING_LENGTH]; /*!< User/Application specific string */
} TMSiRecordingConfigType;

Members

FileType
   
Reserved

StorageType
   
These values identify the storage type. Below is a list of all types defined. 

   

Bit
Name Description
0 Raw Mode
If bit0 is set, then the data as it would be sent over the wireless/USB/Fiber connection will be stored in the measurement file.

1 Reserved

2 Reserved
3 Reserved
4 Reserved
5 Reserved
6 Reserved
7 Reserved
8 Reserved
9 Reserved
10 Reserved
11 Reserved

 

ADCSampleRate

    This integer value contains the sample rate of ADCs in Hertz. The ADC sample rate is defined by the maximum sample rate of the frontend.

NrOfChannels
This integer value contains the sum of storable channels, ExG, Aux, BIP etc. (analog)  and  Digi, SaO2, 3D etc. (digital) that are available on the frontend.

StartControl

    This integer consists of a number of bits that control the start-up behavior of the system.

WARNING: If both the RTC_SET and ALARM_RECORD_AUTO_START bit are set, both bits will be ignored, an error indication appears, and both bits will be cleared, so that at a next attempt a recording will start in the normal way.
If ALARM_RECORD_AUTO_START, BUTTON_ENABLE and POWER-ON RECORD AUTO START are all 0, then there is no way to start a recording!

   

Bit
Name Description
0 RTC_SET
If this bit (least significant bit) is set then the ‘Alarm time’ settings are used to set the Real Time Clock (RTC). This happens at the moment that the user switches the TMSi frontend ON for the first time, after this bit has been set. At the same time the bit will be cleared, so that the same RTC time will be not be set again.


1 ALARM_RECORD_AUTO_START If this bit is set the alarm settings of the RTC are used to automatically start the recording. The auto start time is programmed at the moment that the user switches the TMSi frontend on for the first time, after the bit has been set. At the same time the bit will be cleared, so that the same auto start time will be not be set again. After the auto start time, this time is also cleared from TMSi frontend internal memory.

2 MAN_RECORD_ENABLE If this bit is set then the recording can be started and stopped manually. Otherwise, when bit 2 is 0, the user ON/OFF is ignored during a recording.

3 POWER-ON_RECORD_AUTO_START If this bit is set, recording is started automatically at power on, without the need for user intervention. If this bit is not set, data will not be stored on the SD card.

4 ALARM_RECURRING If this bit is set, the system will reinitialize the RTC ALARM after the previous ALARM, based on the Alarm Time values specified.

5 RF_AUTO_START If this bit is set, the system will enable the RF module directly after power-up.
6 RF_TIMED_START If this bit is set, the system will enable the RF module according to the wireless interface parameters.

7 RF_RECURRING If this bit is set, the system will reinitialize the RF ALARM after the previous ALARM, based on the Wireless Time values specified.

8 MAN_SHUTDOWN_ENABLE If this bit is set, the user can manually shutdown the system. Otherwise, the system can only shut down automatically.

9 Reserved
10 Reserved
11 Reserved

 

EndControl

If this value is 0 then the recording is continued until the end of the flash memory is reached, until the recording is stopped manually, by RTCor when the system battery is empty.

Otherwise this value determines the recording length. In that case this value represents the number of sample periods of a recording (counted at the sample rate of the ADC Rate).

CardStatus
   
The following list shows all defined units

UnitId Name Description
0 Unknown
Unknown state for internal SD card
1 Formatted
Internal SD card is formatted
2 Filled
Internal SD card has files, but still has space available
3 Full
Internal SD card is full
0x7FFFFFFF Error
Error on internal SD card
0xFFFFFFFF Default

 

InitIdentifier
   
Reserved

MeasureFilename

    The TMSi frontend uses these fields to name the measurement files that are made.  All characters are printable ASCII characters. The default name is YYYYMMDD_HHMMSS


    AlarmtimeSTART / ALARMTIMEstop

When bit 0 or bit 1 is set in the field START CONTROL the defined time in this field will be used to program the RTC time or auto start time of real time clock in the ambulatory system. The real time clock is programmed when the system is turned on.

    Alarminterval

The alarm repetition interval is relative to the ALARM TIMESTART and must be larger than the time difference : ALARMTIMESTOP – ALARMTIMESTART.

If ALARMINTERVAL is not all zeroes then after passing ALARMTIMESTOP the value of ALARMINTERVAL is added to ALARMTIMESTART and ALARMTIMESTOP to set the new recording start and stop times. Only Day, Hours, Minutes and Seconds are used, the other fields are ignored.

    AlarmCount

The alarm repetition count is decreased every Alarm repetition interval, until it is zero.

    FrontendSN

The serial number of the device for which this recording configuration will be used. When initialized this field contains only the first part of the serial number = device identification, e.g. 0710 for a Mobita. After recording this field contains the complete serial number of the device which was used to do the recording.

    FrontendadpSN

The serial number of the adapter for which this recording configuration is to be used. When initialized this field contains only the first part of the serial number = device identification, e.g. 0710 for a Mobita. After recording this field contains the complete serial number of the adapter which was used to do the recording.

    RFInterfStartTime / StopTime

Not used.

    RFInterfCount

Not used.

    PatientId

This is an area that is used by the initialization/export program to store information about the patient or the type of measurement that is done with this card. The frontend itself does not use this information. If the TMSi application is not used to build a measurement and process the measurement data, this field may freely be used for other administration purposes.

    USERSTRING1

This is an area that is used by the initialization/export program to store information about the application etc.

 

Include

TMSiSDK.H

Also see

SetRecordingConfiguration, GetRecordingConfiguration