Electronics and Software
Engineering Innovation
BMeasure-lib  0.2.8

#include <BMeasureUnit.h>

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

Public Member Functions

 BMeasureUnit (Bool threaded=0, BUInt reqSize=1024)
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 sendDataServe1 (const DataBlock &dataBlock)
virtual BError setMeasurementConfig (const MeasurementConfig &configMeasurement)
virtual BError setChannelConfig (const BUInt8 &channelNumber, const ChannelConfig &channelConfig)
- Public Member Functions inherited from BMeasureApi::BMeasure
 BMeasure (Bool threaded=0, BUInt reqSize=512)
BError getNodeInfo (NodeInfo &nodeInfo)
 Get node information. More...
void factoryReset (const BInt32 &bootLoader, const BInt32 &resetConfig)
 Factory reset. More...
BError getStatus (NodeStatus &nodeStatus)
 Get the node status. More...
void sendStatus (const NodeStatus &nodeStatus)
 Sends the current status. More...
void sendTime (const BTimeUs &time)
 Sends the current time. More...
BError setSecureMode (const BUInt64 &key, const SecureMode &secureMode)
 Set the security mode. More...
BError login (const BUInt64 &key, const BString &user, const BString &password)
 Provides user/password information for secure connection. More...
BError setMode (const Mode &mode)
 Set the current operational mode. 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)
 Should we have this, not generic for different instruments ? More...
BError setConfig (const Configuration &config)
 Should we have this, not generic for different instruments ? More...
BError getMeasurementConfig (MeasurementConfig &measurementConfig)
 Get measurement config. More...
BError setMeasurementConfig (const MeasurementConfig &measurementConfig)
 Set measurement config. More...
void sendInfo (const InfoBlock &infoBlock)
 Sends an info block. More...
void sendData (const DataBlock &dataBlock)
 Sends a data block. More...
BError measure (DataBlock &dataBlock)
 Performs a single measurement. More...
BError getAwgConfig (AwgConfig &awgConfig)
 Get AWG Configuration. More...
BError setAwgConfig (const AwgConfig &awgConfig)
 Configure AWG. More...
BError setAwgWaveform (const DataBlock &dataBlock)
 Configure AWG Arbitrary waveform. More...
BError setDigital (const BUInt32 &bits)
 Set digital bits. More...
BError getDigital (BUInt32 &bits)
 Get digital bits. More...
BError setRelay (const BUInt32 &relayNum, const BInt32 &state)
 Set relay. More...
BError getSwitch (const BUInt32 &switchNum, BInt32 &state)
 Get digital bits. 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 getBoardConfig (BoardConfig &config)
 Get the boards configuration. More...
BError setBoardConfig (const BoardConfig &config)
 Sets the boards configuration. More...
BError runBoardTest (const BString &test, BString &result)
 Runs the given board test. More...
BError calibrate (const CalibrateMode &calibMode)
 Calibrate items. More...
void sendDebugMessage (const BUInt32 &source, const BString &message)
BError processRequest (BTimeout timeoutUs=BTimeoutForever)
virtual BError getNodeInfoServe (NodeInfo &nodeInfo)
virtual void factoryResetServe (const BInt32 &bootLoader, const BInt32 &resetConfig)
virtual BError getStatusServe (NodeStatus &nodeStatus)
virtual void sendStatusServe (const NodeStatus &nodeStatus)
virtual void sendTimeServe (const BTimeUs &time)
virtual BError setSecureModeServe (const BUInt64 &key, const SecureMode &secureMode)
virtual BError loginServe (const BUInt64 &key, const BString &user, const BString &password)
virtual BError setModeServe (const Mode &mode)
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 (MeasurementConfig &measurementConfig)
virtual BError setMeasurementConfigServe (const MeasurementConfig &measurementConfig)
virtual void sendInfoServe (const InfoBlock &infoBlock)
virtual BError measureServe (DataBlock &dataBlock)
virtual BError getAwgConfigServe (AwgConfig &awgConfig)
virtual BError setAwgConfigServe (const AwgConfig &awgConfig)
virtual BError setAwgWaveformServe (const DataBlock &dataBlock)
virtual BError setDigitalServe (const BUInt32 &bits)
virtual BError getDigitalServe (BUInt32 &bits)
virtual BError setRelayServe (const BUInt32 &relayNum, const BInt32 &state)
virtual BError getSwitchServe (const BUInt32 &switchNum, BInt32 &state)
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 getBoardConfigServe (BoardConfig &config)
virtual BError setBoardConfigServe (const BoardConfig &config)
virtual BError runBoardTestServe (const BString &test, BString &result)
virtual BError calibrateServe (const CalibrateMode &calibMode)
virtual void sendDebugMessageServe (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)

Static Public Member Functions

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 Public Attributes

static int blockNumChannels = 16
static int blockNumSamples = 13

Protected Attributes

BString odevice
NodeInfo onodeInfo
Information oinfo
 Instrument info. More...
MeasurementConfig oconfigMeasurement
BArray< ChannelConfigochannels
BUInt32 osequenceNext
BUInt32 osampleCount
BUInt32 oblockCount
Bool odisconnecting
- Protected Attributes inherited from BoapMc1Comms
Bool othreaded
BUInt32 oreqSize
BMutex olockCall
BMutex olockTx
BUInt32 oapiVersion
Bool ohalfDuplex
BUInt32 otimeout
BUInt16 oaddressTo
BUInt16 oaddressFrom
BoapMc1Packet opacketRxBase
BoapMc1Packet opacketTxBase
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

Additional Inherited Members

- Protected Member Functions inherited from BoapMc1Comms
virtual BError processRequests (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 *)

Constructor & Destructor Documentation

◆ BMeasureUnit()

BMeasureApi::BMeasureUnit::BMeasureUnit ( Bool  threaded = 0,
BUInt  reqSize = 1024 

◆ ~BMeasureUnit()

BMeasureApi::BMeasureUnit::~BMeasureUnit ( )

Member Function Documentation

◆ connect()

BError BMeasureApi::BMeasureUnit::connect ( BString  device)

Connect to a device.

◆ device()

BString BMeasureApi::BMeasureUnit::device ( )

◆ disconnect()

void BMeasureApi::BMeasureUnit::disconnect ( )

◆ disconnected()

void BMeasureApi::BMeasureUnit::disconnected ( )

Reimplemented in BMeasureApi::BMeasureUnit1.

◆ findDevices()

BError BMeasureApi::BMeasureUnit::findDevices ( BList< BMeasureUnitDevice > &  devices)

Find available devices.

◆ findDevicesNetwork()

BError BMeasureApi::BMeasureUnit::findDevicesNetwork ( BList< BMeasureUnitDevice > &  devices)

Find available devices on Network.

◆ findDevicesUsb()

BError BMeasureApi::BMeasureUnit::findDevicesUsb ( BList< BMeasureUnitDevice > &  devices)

Find available devices on USB bus.

◆ info()

BString BMeasureApi::BMeasureUnit::info ( )

◆ numChannels()

BUInt BMeasureApi::BMeasureUnit::numChannels ( )

The number of channels of data.

◆ run()

void BMeasureApi::BMeasureUnit::run ( )

Threaded run mode.

Reimplemented from BTask.

◆ sendDataServe()

void BMeasureApi::BMeasureUnit::sendDataServe ( const DataBlock dataBlock)

Reimplemented from BMeasureApi::BMeasure.

◆ sendDataServe1()

void BMeasureApi::BMeasureUnit::sendDataServe1 ( const DataBlock dataBlock)

Reimplemented in BMeasureApi::BMeasureUnit1.

◆ serialNumber()

BString BMeasureApi::BMeasureUnit::serialNumber ( )

◆ setChannelConfig()

BError BMeasureApi::BMeasureUnit::setChannelConfig ( const BUInt8 channelNumber,
const ChannelConfig channelConfig 

◆ setMeasurementConfig()

BError BMeasureApi::BMeasureUnit::setMeasurementConfig ( const MeasurementConfig configMeasurement)

Member Data Documentation

◆ blockNumChannels

int BMeasureApi::BMeasureUnit::blockNumChannels = 16

◆ blockNumSamples

int BMeasureApi::BMeasureUnit::blockNumSamples = 13

◆ oblockCount

BUInt32 BMeasureApi::BMeasureUnit::oblockCount

◆ ochannels

BArray<ChannelConfig> BMeasureApi::BMeasureUnit::ochannels

◆ oconfigMeasurement

MeasurementConfig BMeasureApi::BMeasureUnit::oconfigMeasurement

◆ odataBlock

DataBlock* BMeasureApi::BMeasureUnit::odataBlock

◆ odevice

BString BMeasureApi::BMeasureUnit::odevice

◆ odisconnecting

Bool BMeasureApi::BMeasureUnit::odisconnecting

◆ oinfo

Information BMeasureApi::BMeasureUnit::oinfo

Instrument info.

◆ onodeInfo

NodeInfo BMeasureApi::BMeasureUnit::onodeInfo

◆ osampleCount

BUInt32 BMeasureApi::BMeasureUnit::osampleCount

◆ osequenceNext

BUInt32 BMeasureApi::BMeasureUnit::osequenceNext

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