BdsApi
3.0.12
This is the Blacknest BDS API.
|
This is the Data Access API interface. More...
#include <BdsC.h>
Public Member Functions | |
DataAccess (BString name="") | |
BError | connect (BString user, BString password) |
Provides user/password information for secure connection. More... | |
BError | validateUser (BString user, BString email) |
Checks the user given name or email. More... | |
BError | setUser (BString user, BString email) |
Sets user to given name or email. More... | |
BError | setUserReal () |
Sets user back to real user. More... | |
BError | getVersion (BString &version, BString &name) |
Gets the software version and server name. More... | |
BError | userGetFromId (BUInt32 id, User &user) |
Get user info given user ID. More... | |
BError | userGet (User &user) |
Get user info. More... | |
BError | userSet (User user) |
Set user info. More... | |
BError | userGetGroups (BList< BString > &groups) |
Get list of groups the user belongs to. More... | |
BError | userGetOptions (BDict< BString > &items) |
Get user options. More... | |
BError | userSetOptions (BDict< BString > &items) |
Set user options. More... | |
BError | groupGetList (BList< Group > &groups) |
Get list of Groups. More... | |
BError | networkGetList (BList< Network > &networks) |
Get list of Networks. More... | |
BError | stationGetList (Selection sel, BList< Station > &stations) |
Get list of Stations. More... | |
BError | channelGetList (Selection sel, BList< Channel > &channels) |
Get list of Channels. More... | |
BError | sourceGetList (BList< Source > &sources) |
Get list of Sources. More... | |
BError | sourcePriorityGetList (BList< SourcePriority > &sourcePrioritys) |
Get list of SourcePriorities. More... | |
BError | dataFileGetList (Selection sel, BList< DataFileInfo > &dataFile) |
Get list of DataFiles. More... | |
BError | dataChannelGetList (Selection sel, BList< DataChannel > &dataChannel) |
Get list of DataChannels. More... | |
BError | channelInstrumentGetList (Selection sel, BList< ChannelInstrument > &channelInstruments) |
Get list of Instruments. More... | |
BError | digitiserGetList (Selection sel, BList< Digitiser > &digitisers) |
Get list of Digitisers. More... | |
BError | digitiserGet (BUInt32 id, Digitiser &digitiser) |
Get a Digitiser object given its ID. More... | |
BError | sensorGetList (Selection sel, BList< Sensor > &sensors) |
Get list of Sensors. More... | |
BError | sensorGet (BUInt32 id, Sensor &sensor) |
Get a Sensor object given its ID. More... | |
BError | calibrationGetList (Selection sel, BList< Calibration > &calibrations) |
Get list of Calibrations. More... | |
BError | responseGetList (Selection sel, BList< Response > &responses) |
Get list of Responces. More... | |
BError | locationGetList (Selection sel, BList< Location > &locations) |
Get list of Station, Channel or both Locations depending on the sel.locationSelect parameter. More... | |
BError | eventGetList (Selection sel, BList< Event > &events) |
Get list of Events. More... | |
BError | specialChannelGetList (Selection sel, BList< SpecialChannel > &specialChannels) |
Get list of Special Channels. More... | |
BError | metadataGetChannelInfo (Selection sel, ChannelInfos &channelInfos) |
Return the channel MetaData in structured form. More... | |
BError | metadataGetFormatted (Selection sel, BString format, BArray< BUInt8 > &data) |
Return the channel MetaData in a particular format. More... | |
BError | getSelectionInfo (SelectionGroup group, Selection selectionIn, SelectionInfo &selectionInfo) |
Get information on possible selections. Use in GUI programs to list options available. More... | |
BError | getSelections (SelectionGroup group, Selection selectionIn, Selection &selectionOut) |
Get selection list. More... | |
BError | dataAvailability (Selection selection, BUInt32 num, BArray< DataAvailChan > &dataAvailChans) |
Return availability for data matching the given selection parameters. If num > 0 segment ito this number of fixed time segments. More... | |
BError | dataSearch (Selection selection, DataInfo &dataInfo) |
Search for data matching the given selection parameters. More... | |
BError | dataGetChannelInfo (DataInfo dataInfo, ChannelInfos &channelInfos) |
Return the channel MetaData in structured form. More... | |
BError | dataOpen (DataInfo dataInfo, BString mode, BString format, BUInt32 flags, DataHandle &dataHandle) |
Open a data file. More... | |
BError | dataGetInfo (DataHandle dataHandle, BUInt32 infoExtra, DataInfo &dataInfo) |
Get information on the data file. More... | |
BError | dataGetNotes (DataHandle dataHandle, BList< Note > ¬es) |
Get notes on the data file. More... | |
BError | dataGetWarnings (DataHandle dataHandle, BList< BString > &warnings) |
Get information on the data file. More... | |
BError | dataSeekBlock (DataHandle dataHandle, BUInt32 channel, BUInt32 segment, BTimeStamp time, BUInt32 &blockNumber) |
Searches for a data block matching the time given. More... | |
BError | dataGetBlock (DataHandle dataHandle, BUInt32 channel, BUInt32 segment, BUInt32 blockNumber, DataBlock &data) |
Return a block of data. More... | |
BError | dataClose (DataHandle dataHandle, BError error, BInt32 del) |
Close a file. More... | |
BError | dataFormattedRead (DataHandle dataHandle, BUInt32 number, BArray< BUInt8 > &data) |
Read the raw data from the file. More... | |
BError | dataFormattedGetLength (DataHandle dataHandle, BUInt64 &length) |
Read the raw data from the file. More... | |
BError | dataRealtimeConfig (BInt32 enable, Selection sel) |
Configures the sending of real-time data blocks. More... | |
BError | dataRealtimeGet (BUInt32 numBlocks, BUInt32 &numBlocksAvailable, BList< DataBlockChannel > &dataBlocks) |
Returns the number of data blocks available and up to numBlocks of these. More... | |
BError | noteGetList (Selection sel, BList< Note > ¬es) |
Return a list of Notes. More... | |
BError | noteUpdate (BInt32 append, Note note, BUInt32 &id) |
Add or update a Note. More... | |
BError | noteWriteDocument (BUInt32 id, BString format, BArray< BUInt8 > data) |
Given a Note write a document associated with it. More... | |
BError | noteReadDocument (BUInt32 id, BString &format, BArray< BUInt8 > &data) |
Read a document associated with a Note. More... | |
BError | logUpdate (BInt32 append, Log log, BUInt32 &id) |
Add or update a Log item. More... | |
BError | logAppend (BString type, BUInt32 priority, BString subSystem, BString title, BString description) |
Append a log item. More... | |
BError | modeSet (Mode mode, Mode &previousMode) |
Changes the system mode from Master to slave. More... | |
BError | modeSnapshotPause (BInt32 on) |
Enables/disables backup synchronisation pause. More... | |
BError | clean (CleanOptions cleanOptions) |
Cleans the system logs and Changes information. More... | |
BError | databaseBackup (BString &ref) |
Backup the database. More... | |
BError | statisticsGet (BDict< BString > &info) |
Get a list of system statistics. More... | |
BError | serverConfigurationGet (BDict< BString > &items) |
Get server configuration parameters. More... | |
BError | dataFormatGetList (BList< DataFormat > &formats) |
Get list of data formats. More... | |
![]() | |
BoapClientObject (BString name="") | |
virtual | ~BoapClientObject () |
BError | connectService (BString name) |
BError | disconnectService () |
BString | getServiceName () |
BError | ping (BUInt32 &apiVersion) |
BError | setConnectionPriority (BoapPriority priority) |
void | setMaxLength (BUInt32 maxLength) |
void | setTimeout (int timeout) |
BoapClientObject (BString name) | |
BError | connectService (BString name) |
![]() | |
BSocket () | |
BSocket (int fd) | |
BSocket (NType type) | |
BSocket (int domain, int type, int protocol) | |
~BSocket () | |
BError | init (int domain, int type, int protocol) |
BError | init (NType type) |
void | setFd (int fd) |
int | getFd () |
BError | bind (const BSocketAddress &add) |
BError | connect (const BSocketAddress &add) |
BError | shutdown (int how) |
BError | close () |
BError | listen (int backlog=5) |
BError | accept (int &fd) |
BError | accept (int &fd, BSocketAddress &address) |
BError | send (const void *buf, BSize nbytes, BSize &nbytesSent, int flags=0) |
BError | sendTo (const BSocketAddress &address, const void *buf, BSize nbytes, BSize &nbytesSent, int flags=0) |
BError | sendChunks (const BDataChunk *chunks, BSize nChunks, BSize &nbytesSent, int flags=0) |
BError | recv (void *buf, BSize maxbytes, BSize &nbytesRecv, int flags=0) |
BError | recvFrom (BSocketAddress &address, void *buf, BSize maxbytes, BSize &nbytesRecv, int flags=0) |
BError | recvWithTimeout (void *buf, BSize maxbytes, BSize &nbytesRecv, int timeout, int flags=0) |
BError | recvFromWithTimeout (BSocketAddress &address, void *buf, BSize maxbytes, BSize &nbytesRecv, int timeout, int flags=0) |
BUInt | recvAvailable () |
BError | setSockOpt (int level, int optname, void *optval, unsigned int optlen) |
BError | getSockOpt (int level, int optname, void *optval, unsigned int *optlen) |
BError | setReuseAddress (int on) |
BError | setBroadCast (int on) |
BError | setPriority (Priority priority) |
BError | getMTU (uint32_t &mtu) |
BError | getAddress (BSocketAddress &address) |
Additional Inherited Members | |
![]() | |
enum | NType |
enum | Priority |
![]() | |
STREAM | |
DGRAM | |
PriorityLow | |
PriorityNormal | |
PriorityHigh | |
![]() | |
BError | pingLocked (BUInt32 &apiVersion) |
BError | checkApiVersion () |
BError | performCall (BoapPacket &tx, BoapPacket &rx) |
BError | performSend (BoapPacket &tx) |
BError | performRecv (BoapPacket &rx) |
virtual BError | handleReconnect (BError err) |
BError | performSend (BoapPacket &tx) |
BError | performRecv (BoapPacket &rx) |
BError | performCall (BoapPacket &tx, BoapPacket &rx) |
![]() | |
BString | oname |
BUInt32 | oapiVersion |
BoapPriority | opriority |
BoapService | oservice |
int | oconnected |
BUInt32 | omaxLength |
BoapPacket | otx |
BoapPacket | orx |
BMutex | olock |
int | otimeout |
int | oreconnect |
This is the Data Access API interface.
This object provides the set of API functions that make RPC network calls to a BdsServer. It provides the basic and restricted user orientated read only, data access API.
Bds::DataAccess::DataAccess | ( | BString | name = "" | ) |
BError Bds::DataAccess::calibrationGetList | ( | Selection | sel, |
BList< Calibration > & | calibrations | ||
) |
Get list of Calibrations.
Get list of Channels.
BError Bds::DataAccess::channelInstrumentGetList | ( | Selection | sel, |
BList< ChannelInstrument > & | channelInstruments | ||
) |
Get list of Instruments.
BError Bds::DataAccess::clean | ( | CleanOptions | cleanOptions | ) |
Cleans the system logs and Changes information.
Provides user/password information for secure connection.
BError Bds::DataAccess::dataAvailability | ( | Selection | selection, |
BUInt32 | num, | ||
BArray< DataAvailChan > & | dataAvailChans | ||
) |
Return availability for data matching the given selection parameters. If num > 0 segment ito this number of fixed time segments.
BError Bds::DataAccess::dataChannelGetList | ( | Selection | sel, |
BList< DataChannel > & | dataChannel | ||
) |
Get list of DataChannels.
BError Bds::DataAccess::dataClose | ( | DataHandle | dataHandle, |
BError | error, | ||
BInt32 | del | ||
) |
Close a file.
BError Bds::DataAccess::dataFileGetList | ( | Selection | sel, |
BList< DataFileInfo > & | dataFile | ||
) |
Get list of DataFiles.
BError Bds::DataAccess::dataFormatGetList | ( | BList< DataFormat > & | formats | ) |
Get list of data formats.
BError Bds::DataAccess::dataFormattedGetLength | ( | DataHandle | dataHandle, |
BUInt64 & | length | ||
) |
Read the raw data from the file.
BError Bds::DataAccess::dataFormattedRead | ( | DataHandle | dataHandle, |
BUInt32 | number, | ||
BArray< BUInt8 > & | data | ||
) |
Read the raw data from the file.
BError Bds::DataAccess::dataGetBlock | ( | DataHandle | dataHandle, |
BUInt32 | channel, | ||
BUInt32 | segment, | ||
BUInt32 | blockNumber, | ||
DataBlock & | data | ||
) |
Return a block of data.
BError Bds::DataAccess::dataGetChannelInfo | ( | DataInfo | dataInfo, |
ChannelInfos & | channelInfos | ||
) |
Return the channel MetaData in structured form.
BError Bds::DataAccess::dataGetInfo | ( | DataHandle | dataHandle, |
BUInt32 | infoExtra, | ||
DataInfo & | dataInfo | ||
) |
Get information on the data file.
BError Bds::DataAccess::dataGetNotes | ( | DataHandle | dataHandle, |
BList< Note > & | notes | ||
) |
Get notes on the data file.
BError Bds::DataAccess::dataGetWarnings | ( | DataHandle | dataHandle, |
BList< BString > & | warnings | ||
) |
Get information on the data file.
BError Bds::DataAccess::dataOpen | ( | DataInfo | dataInfo, |
BString | mode, | ||
BString | format, | ||
BUInt32 | flags, | ||
DataHandle & | dataHandle | ||
) |
Open a data file.
[in] | dataInfo | The sensor data to open selection |
[in] | mode | The open format. The mode should be set to "w" for writing data, "a" when appending data and "r" for reading data. |
[in] | format | What format to open the data stream as. This can be API for raw BDS API access or one of the supported formats that the BDS is able to convert to. |
[in] | flags | A bitset of flags as defined by Bds::DataFlags. |
[out] | dataHandle | The handle for the open data set |
Configures the sending of real-time data blocks.
BError Bds::DataAccess::dataRealtimeGet | ( | BUInt32 | numBlocks, |
BUInt32 & | numBlocksAvailable, | ||
BList< DataBlockChannel > & | dataBlocks | ||
) |
Returns the number of data blocks available and up to numBlocks of these.
Search for data matching the given selection parameters.
BError Bds::DataAccess::dataSeekBlock | ( | DataHandle | dataHandle, |
BUInt32 | channel, | ||
BUInt32 | segment, | ||
BTimeStamp | time, | ||
BUInt32 & | blockNumber | ||
) |
Searches for a data block matching the time given.
Get a Digitiser object given its ID.
Get list of Digitisers.
BError Bds::DataAccess::getSelectionInfo | ( | SelectionGroup | group, |
Selection | selectionIn, | ||
SelectionInfo & | selectionInfo | ||
) |
Get information on possible selections. Use in GUI programs to list options available.
BError Bds::DataAccess::getSelections | ( | SelectionGroup | group, |
Selection | selectionIn, | ||
Selection & | selectionOut | ||
) |
Get selection list.
Gets the software version and server name.
BError Bds::DataAccess::logAppend | ( | BString | type, |
BUInt32 | priority, | ||
BString | subSystem, | ||
BString | title, | ||
BString | description | ||
) |
Append a log item.
Add or update a Log item.
BError Bds::DataAccess::metadataGetChannelInfo | ( | Selection | sel, |
ChannelInfos & | channelInfos | ||
) |
Return the channel MetaData in structured form.
BError Bds::DataAccess::metadataGetFormatted | ( | Selection | sel, |
BString | format, | ||
BArray< BUInt8 > & | data | ||
) |
Return the channel MetaData in a particular format.
Changes the system mode from Master to slave.
Enables/disables backup synchronisation pause.
Return a list of Notes.
Read a document associated with a Note.
Given a Note write a document associated with it.
Get list of Responces.
Get list of Sensors.
Get server configuration parameters.
BError Bds::DataAccess::setUserReal | ( | ) |
Sets user back to real user.
BError Bds::DataAccess::sourcePriorityGetList | ( | BList< SourcePriority > & | sourcePrioritys | ) |
Get list of SourcePriorities.
BError Bds::DataAccess::specialChannelGetList | ( | Selection | sel, |
BList< SpecialChannel > & | specialChannels | ||
) |
Get list of Special Channels.
Get list of Stations.
Get list of groups the user belongs to.
Checks the user given name or email.