Electronics and Software
Engineering Innovation
BMeasure-lib 1.1.0
BMeasureApi::BMeasureUnit1 Class Reference

#include <BMeasureUnits.h>

Inheritance diagram for BMeasureApi::BMeasureUnit1:
BMeasureApi::BMeasureUnit BMeasureApi::BMeasure BTask BoapMc1Comms

Public Member Functions

 BMeasureUnit1 (BMeasureUnits &measureUnits, BString device, Bool threaded=0, BUInt reqSize=2048)
 
BString serialNumber ()
 
void setSerialNumber (BString serialNumber)
 
void disconnected ()
 
void sendStatusServe (const NodeStatus &nodeStatus)
 
void sendMessageServe (const BUInt32 &source, const BString &message)
 
void sendDataFloatServe (const DataBlockFloat &dataBlockFloat)
 
void sendDataProcServe (const DataBlockProc &dataBlockProc)
 
- Public Member Functions inherited from BMeasureApi::BMeasureUnit
 BMeasureUnit (Bool threaded=0, BUInt reqSize=2048)
 
virtual ~BMeasureUnit ()
 
BError connect (BString device)
 Connect to a device. More...
 
void disconnect ()
 
BString device ()
 
BString serialNumber ()
 
BString info ()
 
BUInt numChannels ()
 The number of channels of data. More...
 
void run ()
 Threaded run mode. More...
 
virtual void disconnected ()
 
virtual void sendDataServe (const DataBlock &dataBlock)
 
virtual void sendDataFloatServe (const DataBlockFloat &dataBlockFloat)
 
virtual void sendDataProcServe (const DataBlockProc &dataBlockProc)
 
virtual BError setMeasurementConfig (const Bool &save, const MeasurementConfig &configMeasurement)
 
virtual BError setChannelConfig (const BUInt8 &channelNumber, const ChannelConfig &channelConfig)
 
BError getNodeInfo (NodeInfo &nodeInfo)
 Override getNodeInfo. More...
 
- Public Member Functions inherited from BMeasureApi::BMeasure
 BMeasure (Bool threaded=0, BUInt reqSize=512)
 
BError getNodeInfo (NodeInfo &nodeInfo)
 Get node information. More...
 
BError login (const BString &userid, const BString &password)
 Provides user/password information for secure connection. More...
 
BError logout ()
 Logs out. More...
 
BError changePassword (const BString &userid, const BString &oldPassword, const BString &newPassword)
 Changes the users password. More...
 
void factoryReset (const Bool &bootLoader, const Bool &resetConfig)
 Factory reset. More...
 
void sendTime (const BTimeUs &time)
 Sends the current time. More...
 
BError setMode (const Mode &mode)
 Set the current operational mode. More...
 
BError getStatus (NodeStatus &nodeStatus)
 Get the node status. More...
 
void sendStatus (const NodeStatus &nodeStatus)
 Sends the current status. More...
 
BError getInformation (Information &info)
 
BError getInfoBlock (InfoBlock &infoBlock)
 
BError getChannelConfig (const BUInt32 &channelNumber, ChannelConfig &channelConfig)
 
BError setChannelConfig (const BUInt32 &channelNumber, const ChannelConfig &channelConfig)
 
BError setChannelConfigFull (const BUInt64 &key, const BUInt32 &channelNumber, const ChannelConfig &channelConfig)
 
BError getConfig (Configuration &config)
 Return units configuration. More...
 
BError setConfig (const Configuration &config)
 Set units configuration. More...
 
BError getMeasurementConfig (const Bool &saved, MeasurementConfig &measurementConfig)
 Get measurement config. More...
 
BError setMeasurementConfig (const Bool &save, const MeasurementConfig &measurementConfig)
 Set measurement config. More...
 
BError sendDataEnable (const BUInt8 &sendSet)
 Enable the sending of different data streams. More...
 
BError measure (const DataType &dataType, DataBlock &dataBlock)
 Performs a single sample measurement. More...
 
void sendInfo (const InfoBlock &infoBlock)
 Sends an info block. More...
 
void sendData (const DataBlock &dataBlock)
 Sends a data block. More...
 
void sendChannelConfig (const ChannelConfig &channelConfig)
 Sends a ChannelConfig block. More...
 
BError getAwgConfig (const Bool &saved, AwgConfig &awgConfig)
 Get AWG Configuration. More...
 
BError setAwgConfig (const Bool &save, const AwgConfig &awgConfig)
 Configure AWG. More...
 
BError setAwgWaveform (const BUInt32 &chan, const BUInt32 &pos, const FileData &dataBlock)
 Configure AWG Arbitrary waveform. More...
 
BError setAnalogueOut (const BUInt32 &chan, const BFloat32 &value)
 Set analogue output value. More...
 
BError setDigital (const BUInt32 &bits)
 Set digital bits. More...
 
BError getDigital (BUInt32 &bits)
 Get digital bits. More...
 
BError setRelay (const BUInt32 &relayNum, const Bool &state)
 Set relay. More...
 
BError getSwitch (const BUInt32 &switchNum, Bool &state)
 Get digital bits. More...
 
BError alarmsClear (const BUInt32 &bits)
 Clear alarms. More...
 
BError filesysInfo (const BString &path, FilesysInfo &filesysInfo)
 
BError filesysDelete (const BString &path, const FilesysDeleteType &deleteType)
 
BError fileList (const BString &path, const BUInt32 &pos, FileInfo &fileInfo)
 
BError fileOpen (const BString &name, const BString &mode, BUInt32 &handle)
 
BError fileRead (const BUInt32 &handle, const BUInt32 &pos, const BUInt32 &len, FileData &data)
 
BError fileWrite (const BUInt32 &handle, const BUInt32 &pos, const FileData &data)
 
BError fileClose (const BUInt32 &handle)
 
BError fileDelete (const BString &name)
 
BError wifiAccesspointNum (BUInt32 &numFound)
 Return how many access points found. More...
 
BError wifiAccesspointInfo (const BUInt32 &id, WifiAccessPoint &accessPoint)
 Return information on Wifi accesspoint. More...
 
BError wifiCommand (const WifiCmd &wifiCmd)
 Perform Wifi command. More...
 
BError functionUnLock (const BUInt32 &unlocks, const BString &key)
 UnLock/Lock special functions. More...
 
BError getBoardConfig (BoardConfig &config)
 Get the boards configuration. More...
 
BError setBoardConfig (const BoardConfig &config)
 Sets the boards configuration, requires key. More...
 
BError runBoardTest (const BString &test)
 Runs the given board test. More...
 
BError calibrate (const CalibrateInfo &calibInfo)
 Calibrate system. More...
 
void sendMessage (const BUInt32 &source, const BString &message)
 Send text messages. More...
 
BError processRequest ()
 
virtual BError getNodeInfoServe (NodeInfo &nodeInfo)
 
virtual BError loginServe (const BString &userid, const BString &password)
 
virtual BError logoutServe ()
 
virtual BError changePasswordServe (const BString &userid, const BString &oldPassword, const BString &newPassword)
 
virtual void factoryResetServe (const Bool &bootLoader, const Bool &resetConfig)
 
virtual void sendTimeServe (const BTimeUs &time)
 
virtual BError setModeServe (const Mode &mode)
 
virtual BError getStatusServe (NodeStatus &nodeStatus)
 
virtual void sendStatusServe (const NodeStatus &nodeStatus)
 
virtual BError getInformationServe (Information &info)
 
virtual BError getInfoBlockServe (InfoBlock &infoBlock)
 
virtual BError getChannelConfigServe (const BUInt32 &channelNumber, ChannelConfig &channelConfig)
 
virtual BError setChannelConfigServe (const BUInt32 &channelNumber, const ChannelConfig &channelConfig)
 
virtual BError setChannelConfigFullServe (const BUInt64 &key, const BUInt32 &channelNumber, const ChannelConfig &channelConfig)
 
virtual BError getConfigServe (Configuration &config)
 
virtual BError setConfigServe (const Configuration &config)
 
virtual BError getMeasurementConfigServe (const Bool &saved, MeasurementConfig &measurementConfig)
 
virtual BError setMeasurementConfigServe (const Bool &save, const MeasurementConfig &measurementConfig)
 
virtual BError sendDataEnableServe (const BUInt8 &sendSet)
 
virtual BError measureServe (const DataType &dataType, DataBlock &dataBlock)
 
virtual void sendInfoServe (const InfoBlock &infoBlock)
 
virtual void sendDataServe (const DataBlock &dataBlock)
 
virtual void sendChannelConfigServe (const ChannelConfig &channelConfig)
 
virtual BError getAwgConfigServe (const Bool &saved, AwgConfig &awgConfig)
 
virtual BError setAwgConfigServe (const Bool &save, const AwgConfig &awgConfig)
 
virtual BError setAwgWaveformServe (const BUInt32 &chan, const BUInt32 &pos, const FileData &dataBlock)
 
virtual BError setAnalogueOutServe (const BUInt32 &chan, const BFloat32 &value)
 
virtual BError setDigitalServe (const BUInt32 &bits)
 
virtual BError getDigitalServe (BUInt32 &bits)
 
virtual BError setRelayServe (const BUInt32 &relayNum, const Bool &state)
 
virtual BError getSwitchServe (const BUInt32 &switchNum, Bool &state)
 
virtual BError alarmsClearServe (const BUInt32 &bits)
 
virtual BError filesysInfoServe (const BString &path, FilesysInfo &filesysInfo)
 
virtual BError filesysDeleteServe (const BString &path, const FilesysDeleteType &deleteType)
 
virtual BError fileListServe (const BString &path, const BUInt32 &pos, FileInfo &fileInfo)
 
virtual BError fileOpenServe (const BString &name, const BString &mode, BUInt32 &handle)
 
virtual BError fileReadServe (const BUInt32 &handle, const BUInt32 &pos, const BUInt32 &len, FileData &data)
 
virtual BError fileWriteServe (const BUInt32 &handle, const BUInt32 &pos, const FileData &data)
 
virtual BError fileCloseServe (const BUInt32 &handle)
 
virtual BError fileDeleteServe (const BString &name)
 
virtual BError wifiAccesspointNumServe (BUInt32 &numFound)
 
virtual BError wifiAccesspointInfoServe (const BUInt32 &id, WifiAccessPoint &accessPoint)
 
virtual BError wifiCommandServe (const WifiCmd &wifiCmd)
 
virtual BError functionUnLockServe (const BUInt32 &unlocks, const BString &key)
 
virtual BError getBoardConfigServe (BoardConfig &config)
 
virtual BError setBoardConfigServe (const BoardConfig &config)
 
virtual BError runBoardTestServe (const BString &test)
 
virtual BError calibrateServe (const CalibrateInfo &calibInfo)
 
virtual void sendMessageServe (const BUInt32 &source, const BString &message)
 
- Public Member Functions inherited from BoapMc1Comms
 BoapMc1Comms (Bool threaded=0, BUInt reqSize=512)
 
virtual ~BoapMc1Comms ()
 
void setCommsMode (Bool halfDuplex)
 
void setComms (BComms &comms)
 
void setComms (BComms *comms)
 
void setAddress (BUInt16 addressTo, BUInt16 addressFrom)
 
BUInt32 getApiVersion ()
 
BUInt32 setTimeout (BUInt32 timeoutUs)
 
BoapMc1PacketpacketRx ()
 
virtual BError processRx (BTimeout timeoutUs=BTimeoutForever)
 
- Public Member Functions inherited from BTask
 BTask (const char *name="", BUInt stackSize=0, BUInt priority=1)
 
 ~BTask ()
 
void init (const char *name, BUInt stackSize=0, BUInt priority=1)
 
BError start ()
 
void stop ()
 
void waitForCompletion ()
 
int setPriority (BUInt priority)
 
virtual void run ()
 

Public Attributes

BMeasureUnitsomeasureUnits
 
Bool oenabled
 
Bool oconnected
 
BUInt oorder
 
BUInt osource
 
BString oserialNumber
 

Additional Inherited Members

- Static Public Member Functions inherited from BMeasureApi::BMeasureUnit
static BError findDevices (BList< BMeasureUnitDevice > &devices)
 Find available devices. More...
 
static BError findDevicesUsb (BList< BMeasureUnitDevice > &devices)
 Find available devices on USB bus. More...
 
static BError findDevicesNetwork (BList< BMeasureUnitDevice > &devices)
 Find available devices on Network. More...
 
static void processdataBlock (const DataBlock &dataBlock, DataBlockFloat *dataBlockOut)
 
- Static Public Attributes inherited from BMeasureApi::BMeasureUnit
static int blockNumChannels = 16
 
static int blockNumSamples = 13
 
- Protected Member Functions inherited from BoapMc1Comms
virtual BError processRequests (BTimeout timeoutUs=BTimeoutForever)
 
virtual BError processRequest (BTimeout timeoutUs=BTimeoutForever)
 
BError packetTx (BDataChunk *chunks, BUInt nChunks, BUInt16 waitCmdReply)
 
BError packetRxData (void *data, BUInt nBytes)
 
BError packetRxEnd ()
 
- Static Protected Member Functions inherited from BTask
static void * taskFunc (void *)
 
- Protected Attributes inherited from BMeasureApi::BMeasureUnit
BString odevice
 
NodeInfo onodeInfo
 
Information oinfo
 Instrument info. More...
 
MeasurementConfig oconfigMeasurement
 
BArray< ChannelConfigochannels
 
DataBlockFloatodataBlockFloat
 
BUInt32 osequenceNext
 
BUInt32 osampleCount
 
BUInt32 oblockCount
 
Bool odisconnecting
 
BSemaphoreBool oprocEnable
 Enable processing. More...
 
BSemaphoreBool oprocRunning
 Processing is running. More...
 
- Protected Attributes inherited from BoapMc1Comms
Bool othreaded
 
BUInt32 oreqSize
 
BMutex olockCall
 
BMutex olockTx
 
BCommsocomms
 
BUInt32 oapiVersion
 
Bool ohalfDuplex
 
BUInt32 otimeout
 
BUInt16 oaddressTo
 
BUInt16 oaddressFrom
 
BoapMc1Packet opacketRxBase
 
BoapMc1PacketopacketRx
 
BoapMc1Packet opacketTxBase
 
BoapMc1PacketopacketTx
 
BUInt opacketRpcCmd
 
BSemaphore opacketRpcSema
 
BSemaphore opacketRpcDoneSema
 
BoapMc1Error oerror
 
- Protected Attributes inherited from BTask
const char * oname
 
BUInt ostackSize
 
BUInt opolicy
 
BUInt opriority
 
pthread_t othread
 
Bool orunning
 

Constructor & Destructor Documentation

◆ BMeasureUnit1()

BMeasureApi::BMeasureUnit1::BMeasureUnit1 ( BMeasureUnits measureUnits,
BString  device,
Bool  threaded = 0,
BUInt  reqSize = 2048 
)

Member Function Documentation

◆ disconnected()

void BMeasureApi::BMeasureUnit1::disconnected ( )
virtual

Reimplemented from BMeasureApi::BMeasureUnit.

◆ sendDataFloatServe()

void BMeasureApi::BMeasureUnit1::sendDataFloatServe ( const DataBlockFloat dataBlockFloat)
virtual

Reimplemented from BMeasureApi::BMeasureUnit.

◆ sendDataProcServe()

void BMeasureApi::BMeasureUnit1::sendDataProcServe ( const DataBlockProc dataBlockProc)
virtual

Reimplemented from BMeasureApi::BMeasureUnit.

◆ sendMessageServe()

void BMeasureApi::BMeasureUnit1::sendMessageServe ( const BUInt32 source,
const BString message 
)
virtual

Reimplemented from BMeasureApi::BMeasure.

◆ sendStatusServe()

void BMeasureApi::BMeasureUnit1::sendStatusServe ( const NodeStatus nodeStatus)
virtual

Reimplemented from BMeasureApi::BMeasure.

◆ serialNumber()

BString BMeasureApi::BMeasureUnit1::serialNumber ( )

◆ setSerialNumber()

void BMeasureApi::BMeasureUnit1::setSerialNumber ( BString  serialNumber)

Member Data Documentation

◆ oconnected

Bool BMeasureApi::BMeasureUnit1::oconnected

◆ oenabled

Bool BMeasureApi::BMeasureUnit1::oenabled

◆ omeasureUnits

BMeasureUnits& BMeasureApi::BMeasureUnit1::omeasureUnits

◆ oorder

BUInt BMeasureApi::BMeasureUnit1::oorder

◆ oserialNumber

BString BMeasureApi::BMeasureUnit1::oserialNumber

◆ osource

BUInt BMeasureApi::BMeasureUnit1::osource

The documentation for this class was generated from the following files: