-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
--set up base class and class templates for wrappers.
- Loading branch information
Showing
8 changed files
with
323 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) Meta Platforms, Inc. and its affiliates. | ||
// This source code is licensed under the MIT license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
#include "SensorManager.h" | ||
|
||
namespace esp { | ||
namespace sensor { | ||
|
||
SensorManager::SensorManager() | ||
: SensorBaseManager<esp::sensor::ManagedSensorBase>::SensorBaseManager( | ||
"Sensor") { | ||
this->copyConstructorMap_["ManagedAudioSensor"] = | ||
&SensorManager::createObjCopyCtorMapEntry< | ||
esp::sensor::ManagedAudioSensor>; | ||
|
||
} // SensorManager ctor | ||
|
||
} // namespace sensor | ||
} // namespace esp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) Meta Platforms, Inc. and its affiliates. | ||
// This source code is licensed under the MIT license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
#ifndef ESP_SENSOR_SENSORMANAGER_H_ | ||
#define ESP_SENSOR_SENSORMANAGER_H_ | ||
|
||
#include "SensorBaseManager.h" | ||
#include "esp/sensor/sensorWrappers/ManagedAudioSensor.h" | ||
#include "esp/sensor/sensorWrappers/ManagedSensorBase.h" | ||
|
||
namespace esp { | ||
namespace sensor { | ||
|
||
class SensorManager : public SensorBaseManager<esp::sensor::ManagedSensorBase> { | ||
public: | ||
explicit SensorManager(); | ||
|
||
public: | ||
ESP_SMART_POINTERS(SensorManager) | ||
}; // class SensorManager | ||
|
||
} // namespace sensor | ||
} // namespace esp | ||
#endif // ESP_SENSOR_SENSORMANAGER_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright (c) Meta Platforms, Inc. and its affiliates. | ||
// This source code is licensed under the MIT license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
#ifndef ESP_SENSOR_MANAGEDAUDIOSENSOR_H_ | ||
#define ESP_SENSOR_MANAGEDAUDIOSENSOR_H_ | ||
|
||
#include <Corrade/Utility/FormatStl.h> | ||
#include <Corrade/Utility/Macros.h> | ||
|
||
#include "esp/sensor/AudioSensor.h" | ||
#include "esp/sensor/sensorWrappers/ManagedSensorTemplates.h" | ||
|
||
namespace Cr = Corrade; | ||
namespace Mn = Magnum; | ||
namespace esp { | ||
namespace sensor { | ||
|
||
/** | ||
* @brief Class for wrapper for sensor objects of all kinds to | ||
* enable Managed Container access. | ||
*/ | ||
class ManagedAudioSensor | ||
: public esp::sensor::AbstractManagedSensor<AudioSensor> { | ||
public: | ||
explicit ManagedAudioSensor() | ||
: AbstractManagedSensor<AudioSensor>::AbstractManagedSensor( | ||
"ManagedAudioSensor") {} | ||
|
||
// TODO Add appropriate audio sensor getters/setters here | ||
|
||
protected: | ||
/** | ||
* @brief Retrieve a comma-separated string holding the header values for | ||
* the info returned for this managed object, type-specific. | ||
*/ | ||
|
||
std::string getSensorObjInfoHeaderInternal() const override { | ||
return "Output Directory"; | ||
} | ||
/** | ||
* @brief Specialization-specific extension of getObjectInfo, comma | ||
* separated info ideal for saving to csv | ||
*/ | ||
std::string getSensorObjInfoInternal( | ||
CORRADE_UNUSED std::shared_ptr<AudioSensor>& sp) const override { | ||
// TODO provide info stream for sensors | ||
return ""; | ||
} | ||
|
||
public: | ||
ESP_SMART_POINTERS(ManagedAudioSensor) | ||
}; // class ManagedAudioSensor | ||
} // namespace sensor | ||
} // namespace esp | ||
|
||
#endif // ESP_SENSOR_MANAGEDAUDIOSENSOR_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.