DevAttachment:Rename: api=>stimbuffapi, implexor=>qualeiface
This commit is contained in:
@@ -25,6 +25,8 @@ public:
|
||||
{
|
||||
return deviceIdentifier == other.deviceIdentifier &&
|
||||
sensorType == other.sensorType &&
|
||||
qualeIfaceApi == other.qualeIfaceApi &&
|
||||
stimBuffApi == other.stimBuffApi &&
|
||||
provider == other.provider &&
|
||||
deviceSelector == other.deviceSelector;
|
||||
}
|
||||
@@ -32,9 +34,9 @@ public:
|
||||
public:
|
||||
std::string deviceIdentifier;
|
||||
char sensorType;
|
||||
std::string implexor;
|
||||
std::string api;
|
||||
std::vector<std::pair<std::string,std::string>> apiParams;
|
||||
std::string qualeIfaceApi;
|
||||
std::string stimBuffApi;
|
||||
std::vector<std::pair<std::string,std::string>> stimBuffApiParams;
|
||||
std::string provider;
|
||||
std::vector<std::pair<std::string,std::string>> providerParams;
|
||||
std::string deviceSelector;
|
||||
@@ -44,9 +46,9 @@ public:
|
||||
std::ostringstream os;
|
||||
os << "Device Identifier: " << deviceIdentifier
|
||||
<< ", Sensor Type: " << sensorType
|
||||
<< ", Implexor: " << implexor << ", API: " << api
|
||||
<< ", API Params: (";
|
||||
for (const auto& param : apiParams)
|
||||
<< ", QualeIface API: " << qualeIfaceApi << ", StimBuff API: " << stimBuffApi
|
||||
<< ", StimBuff API Params: (";
|
||||
for (const auto& param : stimBuffApiParams)
|
||||
{
|
||||
os << param.first;
|
||||
if (!param.second.empty()) {
|
||||
|
||||
+11
-11
@@ -110,15 +110,15 @@ struct Sal_Mgmt_LibOps
|
||||
};
|
||||
|
||||
/* Exported by all sense API Libraries to tell Salmanoff what API the lib uses
|
||||
* to connect to providers; and also to state which implexor APIs it exports.
|
||||
* to connect to providers; and also to state which quale-iface APIs it exports.
|
||||
*/
|
||||
class SenseApiDesc
|
||||
{
|
||||
public:
|
||||
class ExportedImplexorApiDesc
|
||||
class ExportedQualeIfaceApiDesc
|
||||
{
|
||||
public:
|
||||
static bool sanityCheck(const ExportedImplexorApiDesc &desc)
|
||||
static bool sanityCheck(const ExportedQualeIfaceApiDesc &desc)
|
||||
{
|
||||
if (desc.name.empty()) { return false; }
|
||||
return true;
|
||||
@@ -132,8 +132,8 @@ public:
|
||||
std::string stringify() const
|
||||
{
|
||||
std::string result = "Name: " + name + "\n";
|
||||
result += "Exported Implexor APIs:\n";
|
||||
for (const auto& api : exportedImplexorApis) {
|
||||
result += "Exported QualeIface APIs:\n";
|
||||
for (const auto& api : exportedQualeIfaceApis) {
|
||||
result += " - " + api.name + "\n";
|
||||
}
|
||||
return result;
|
||||
@@ -141,20 +141,20 @@ public:
|
||||
|
||||
static bool sanityCheck(const SenseApiDesc &desc)
|
||||
{
|
||||
if (desc.name.empty() || desc.exportedImplexorApis.empty()) {
|
||||
if (desc.name.empty() || desc.exportedQualeIfaceApis.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const auto& api : desc.exportedImplexorApis) {
|
||||
if (!ExportedImplexorApiDesc::sanityCheck(api)) { return false; }
|
||||
for (const auto& api : desc.exportedQualeIfaceApis) {
|
||||
if (!ExportedQualeIfaceApiDesc::sanityCheck(api)) { return false; }
|
||||
}
|
||||
|
||||
return Sal_Mgmt_LibOps::sanityCheck(desc.sal_mgmt_libOps);
|
||||
}
|
||||
|
||||
std::string name;
|
||||
// These are the implexors whose APIs this lib exports.
|
||||
std::vector<ExportedImplexorApiDesc> exportedImplexorApis;
|
||||
// These are the quale-iface APIs this lib exports.
|
||||
std::vector<ExportedQualeIfaceApiDesc> exportedQualeIfaceApis;
|
||||
Sal_Mgmt_LibOps sal_mgmt_libOps;
|
||||
};
|
||||
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
* function. Salmanoff will search for it and invoke it via dlsym().
|
||||
*
|
||||
* The function must return a SenseApiDesc struct that Smo will tell
|
||||
* Smo what implexors can be used with it & what APIs it exports.
|
||||
* Smo what quale-iface APIs can be used with it & what APIs it exports.
|
||||
* The SenseApiDesc struct also gives Smo pointers to API functions
|
||||
* to invoke for communication between Smo and the library.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user