Zebra Bioptic Color Camera SDK For Linux  1.0.0-17
All Classes Functions Variables Enumerations Enumerator
camera_configuration.h
1 /*
2  * camera_configuration.h
3  *
4  * Created on: Nov 5, 2019
5  * ©2019 Zebra Technologies Corp. and/or its affiliates. All rights reserved.
6  */
7 
8 #ifndef CAMERA_SDK_CAMERA_CONFIGURATION_CAMERA_CONFIGURATION_H_
9 #define CAMERA_SDK_CAMERA_CONFIGURATION_CAMERA_CONFIGURATION_H_
10 
11 #include "zebra_camera.h"
12 #include "camera_enums.h"
13 #include "pugixml.hpp"
14 
15 #include <string>
16 #include <iostream>
17 #include <vector>
18 #include <map>
19 
20 namespace zebra {
21 namespace camera_sdk {
22 
23 
31 private:
32  pugi::xml_document configuration_documant_;
33 
34 public:
36  virtual ~CameraConfiguration();
37 
38  const std::string kXmlSchema = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
39  const std::string kTagNameConfig = "cameraconfig";
40  const std::string kVersion = "version";
41  const std::string kAppVersion = "app-version";
42  const std::string kMetadata = "metadata";
43  const std::string kFirmware = "firmware";
44  const std::string kSerialNumber = "serialnumber";
45  const std::string kModelNumber = "modelnumber";
46  const std::string kHardwareVersion = "hardwareversion";
47  const std::string kAttribList = "attrib_list";
48  const std::string kAttribute = "attribute";
49  const std::string kAuto = "auto";
50  const std::string kStrAutoSupported = "auto_supported";
51  const std::string kStrOne = "1";
52  const std::string kStrZero = "0";
53  const std::string kStrTrue = "true";
54  const std::string kStrFalse = "false";
55  const std::string kStrConfig = "cameraconfig";
56  const std::string kStrAttriblist = "attrib_list";
57  const std::string kStrAttribute = "attribute";
58  const std::string kStrId = "id";
59  const std::string kStrName = "name";
60  const std::string kStrValue = "value";
61  const std::string kStrRed = "red";
62  const std::string kStrBlue = "blue";
63 
64 
65  // parameter names
66  const std::string kParameterNameBrighness = "Brightness";
67  const std::string kParameterNameGamma = "Gamma";
68  const std::string kParameterNameContrast = "Contrast";
69  const std::string kParameterNameSaturation = "Saturation";
70  const std::string kParameterNameSharpness = "Sharpness";
71  const std::string kParameterNameWhiteBalance = "White Balance";
72  const std::string kParameterNameWhiteBalanceBlue = "White Balance - Blue";
73  const std::string kParameterNameWhiteBalanceRed = "White Balance - Red";
74  const std::string kParameterNameBacklight = "Backlight";
75  const std::string kParameterNameGain = "Gain";
76  const std::string kParameterNameAbsoluteET = "Absolute Exposure Time";
77  const std::string kParameterNameVideoMode = "Video Mode";
78  const std::string kParameterNameIlluminationMode = "Illumination Mode";
79 
80  // structure for representing an attribute/parameter
81  struct AttributeInfo {
82  std::string id;
83  std::string name;
84  std::string data_type;
85  };
86 
92  void GenerateXmlConfiguration(pugi::xml_document *config_doc, std::shared_ptr<ZebraCamera> camera);
93 
99  void AppendMetadataNode(pugi::xml_node *node, std::shared_ptr<ZebraCamera> camera);
100 
107  void AppendAttributeNode(pugi::xml_node *node, zebra::camera_sdk::CameraPropertyId attribute_id, std::shared_ptr<ZebraCamera> camera);
108 
114  void SetParameter(std::shared_ptr<ZebraCamera> camera, pugi::xml_node attribute_node);
115 
121  bool ValidateConfigurationFileExtension(std::string configuration_file_path);
122 
123 
124 };
125 
126 } /* namespace camera_sdk*/
127 } /* namespace zebra */
128 
129 #endif /* CAMERA_SDK_CAMERA_CONFIGURATION_CAMERA_CONFIGURATION_H_ */
zebra::camera_sdk::CameraConfiguration
Definition: camera_configuration.h:30
zebra::camera_sdk::CameraConfiguration::AppendMetadataNode
void AppendMetadataNode(pugi::xml_node *node, std::shared_ptr< ZebraCamera > camera)
zebra::camera_sdk::CameraConfiguration::GenerateXmlConfiguration
void GenerateXmlConfiguration(pugi::xml_document *config_doc, std::shared_ptr< ZebraCamera > camera)
zebra::camera_sdk::CameraConfiguration::SetParameter
void SetParameter(std::shared_ptr< ZebraCamera > camera, pugi::xml_node attribute_node)
zebra::camera_sdk::CameraConfiguration::AttributeInfo
Definition: camera_configuration.h:81
zebra::camera_sdk::CameraConfiguration::ValidateConfigurationFileExtension
bool ValidateConfigurationFileExtension(std::string configuration_file_path)
zebra::camera_sdk::CameraConfiguration::AppendAttributeNode
void AppendAttributeNode(pugi::xml_node *node, zebra::camera_sdk::CameraPropertyId attribute_id, std::shared_ptr< ZebraCamera > camera)