Add device model & config

This commit is contained in:
John Zhao
2018-04-04 15:52:10 +08:00
parent c7390993dc
commit d1740c625e
10 changed files with 186 additions and 2 deletions

18
src/internal/config.cc Normal file
View File

@@ -0,0 +1,18 @@
#include "internal/config.h"
MYNTEYE_BEGIN_NAMESPACE
const std::map<Model, StreamSupports> stream_supports_map = {
{Model::STANDARD, {Stream::LEFT, Stream::RIGHT}}};
const std::map<Model, CapabilitiesSupports> capabilities_supports_map = {
{Model::STANDARD, {Capabilities::STEREO, Capabilities::IMU}}};
const std::map<Model, OptionSupports> option_supports_map = {
{Model::STANDARD,
{Option::GAIN, Option::BRIGHTNESS, Option::CONTRAST, Option::FRAME_RATE,
Option::IMU_FREQUENCY, Option::EXPOSURE_MODE, Option::MAX_GAIN,
Option::MAX_EXPOSURE_TIME, Option::DESIRED_BRIGHTNESS, Option::IR_CONTROL,
Option::HDR_MODE, Option::ZERO_DRIFT_CALIBRATION, Option::ERASE_CHIP}}};
MYNTEYE_END_NAMESPACE

23
src/internal/config.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef MYNTEYE_INTERNAL_CONFIG_H_ // NOLINT
#define MYNTEYE_INTERNAL_CONFIG_H_
#pragma once
#include <map>
#include <set>
#include "mynteye/mynteye.h"
#include "mynteye/types.h"
MYNTEYE_BEGIN_NAMESPACE
using StreamSupports = std::set<Stream>;
using CapabilitiesSupports = std::set<Capabilities>;
using OptionSupports = std::set<Option>;
extern const std::map<Model, StreamSupports> stream_supports_map;
extern const std::map<Model, CapabilitiesSupports> capabilities_supports_map;
extern const std::map<Model, OptionSupports> option_supports_map;
MYNTEYE_END_NAMESPACE
#endif // MYNTEYE_INTERNAL_CONFIG_H_ NOLINT