Raritan PX2/PX3 JSON-RPC API: pdu-json-rpc-api/idl/Webcam.idl Source File

Raritan PX2/PX3 JSON-RPC API

Webcam.idl
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3 * Copyright 2011 Raritan Inc. All rights reserved.
4 */
5
6 #include <UserEvent.idl>
7
8 /** Webcam Management */
9 module webcam {
10
11 /** PixelFormat */
12 enumeration PixelFormat {
13 MJPEG, ///< Motion JPEG
14 JPEG, ///< JPEG
15 RGB, ///< RGB encoded
16 YUV ///< YUV encoded
17 };
18
19 /** PowerLineFrequency */
20 enumeration PowerLineFrequency {
21 NOT_SUPPORTED,
22 HZ50,
23 HZ60,
24 DISABLED
25 };
26
27 /** Format */
28 structure Format_2_0_0 {
29 int width; ///< image width
30 int height; ///< image height
31 PixelFormat pixelFormat; ///< pixel format
32 };
33
34 /** Controls
35 *
36 * All int values are normed to a range of 1 to 1000
37 * 0 means "auto" if available, -1 means not supported by the webcam
38 */
39 structure Controls {
40 int brightness; ///< brightness
41 int contrast; ///< contrast
42 int saturation; ///< saturation
43 int gain; ///< gain
44 int gamma; ///< gamma
45 PowerLineFrequency powerLineFrequency; ///< power line frequency (50Hz, 60Hz or disabled)
46 };
47
48 /** Location */
49 structure Location {
50 string name; ///< location name
51 string x; ///< x
52 string y; ///< y
53 string z; ///< z
54 };
55
56 /** Image meta data */
57 structure ImageMetaData {
58 Format_2_0_0 format; ///< image format information
59 long timestamp; ///< image timestamp
60 Location location; ///< source webcam location
61 };
62
63 /** Image */
64 structure Image_2_0_0 {
65 ImageMetaData meta; ///< image meta data
66 string data; ///< base64 encoded image data
67 };
68
69 /** Webcam settings */
70 structure Settings_2_0_0 {
71 Format_2_0_0 format; ///< currently selected image format
72 Controls controls; ///< image settings like brightness, contrast, gain, ...
73 string name; ///< webcam name
74 Location location; ///< webcam location
75 int refreshInterval; ///< in ms, toggle "video" and "static image" mode
76 };
77
78 /** Webcam information */
79 structure Information_3_0_0 {
80 string id; ///< port and camera specific ID string
81 string model; ///< camera model
82 vector<Format_2_0_0> supportedFormats; ///< supported image formats
83 };
84
85 /** The webcam interface */
86 interface Webcam_2_0_1 {
87 /**
88 * This event is emitted after the settings of a webcam were changed
89 */
90 valueobject SettingsChangedEvent extends event.UserEvent {
91 Settings_2_0_0 oldSettings; ///< the old settings
92 Settings_2_0_0 newSettings; ///< the new settings
93 };
94
95 /**
96 * Retrieve information of a specific webcam.
97 *
98 * @return Information
99 */
100 Information_3_0_0 getInformation();
101
102 /**
103 * Retrieve settings of a specific webcam.
104 *
105 * @return Settings
106 */
107 Settings_2_0_0 getSettings();
108
109 /**
110 * Change settings of a specific webcam.
111 *
112 * @param settings New webcam settings
113 *
114 * @return 0 if success
115 */
116 int setSettings(in Settings_2_0_0 settings);
117
118 /**
119 * Apply webcam control settings without storing them
120 *
121 * @param controls Control settings
122 *
123 * @return 0 if success
124 */
125 int setControls(in Controls controls) ;
126
127 /**
128 * Retrieve the default value of the controls.
129 *
130 * @return Controls
131 */
132 Controls getControlDefaults() ;
133 };
134 }
webcam::Location::z
string z
z
Definition: Webcam.idl:53
webcam::Format_2_0_0::width
int width
image width
Definition: Webcam.idl:29
webcam::Information_3_0_0
Webcam information.
Definition: Webcam.idl:79
webcam::Controls::powerLineFrequency
PowerLineFrequency powerLineFrequency
power line frequency (50Hz, 60Hz or disabled)
Definition: Webcam.idl:45
webcam::RGB
RGB encoded.
Definition: Webcam.idl:15
webcam::Settings_2_0_0::controls
Controls controls
image settings like brightness, contrast, gain, ...
Definition: Webcam.idl:72
webcam::Format_2_0_0
Format.
Definition: Webcam.idl:28
webcam::Webcam_2_0_1
The webcam interface.
Definition: Webcam.idl:86
webcam::Information_3_0_0::id
string id
port and camera specific ID string
Definition: Webcam.idl:80
webcam::Controls
Controls.
Definition: Webcam.idl:39
webcam::Location::name
string name
location name
Definition: Webcam.idl:50
webcam::Settings_2_0_0::location
Location location
webcam location
Definition: Webcam.idl:74
webcam::ImageMetaData::location
Location location
source webcam location
Definition: Webcam.idl:60
webcam::PowerLineFrequency
PowerLineFrequency
PowerLineFrequency.
Definition: Webcam.idl:20
webcam::Settings_2_0_0::name
string name
webcam name
Definition: Webcam.idl:73
webcam::MJPEG
Motion JPEG.
Definition: Webcam.idl:13
webcam::PixelFormat
PixelFormat
PixelFormat.
Definition: Webcam.idl:12
webcam::Controls::gamma
int gamma
gamma
Definition: Webcam.idl:44
webcam::Webcam_2_0_1::newSettings
Settings_2_0_0 newSettings
the new settings
Definition: Webcam.idl:92
webcam::Settings_2_0_0
Webcam settings.
Definition: Webcam.idl:70
webcam::Information_3_0_0::model
string model
camera model
Definition: Webcam.idl:81
webcam::Image_2_0_0::meta
ImageMetaData meta
image meta data
Definition: Webcam.idl:65
webcam::Controls::gain
int gain
gain
Definition: Webcam.idl:43
webcam::Location::x
string x
x
Definition: Webcam.idl:51
webcam::YUV
YUV encoded.
Definition: Webcam.idl:16
webcam::Image_2_0_0::data
string data
base64 encoded image data
Definition: Webcam.idl:66
webcam::ImageMetaData::timestamp
long timestamp
image timestamp
Definition: Webcam.idl:59
webcam::Format_2_0_0::pixelFormat
PixelFormat pixelFormat
pixel format
Definition: Webcam.idl:31
webcam::Image_2_0_0
Image.
Definition: Webcam.idl:64
webcam::Location::y
string y
y
Definition: Webcam.idl:52
webcam::Location
Location.
Definition: Webcam.idl:49
webcam::Format_2_0_0::height
int height
image height
Definition: Webcam.idl:30
webcam::Settings_2_0_0::format
Format_2_0_0 format
currently selected image format
Definition: Webcam.idl:71
webcam
Webcam Management.
Definition: StorageManager.idl:10
webcam::Controls::brightness
int brightness
brightness
Definition: Webcam.idl:40
webcam::Settings_2_0_0::refreshInterval
int refreshInterval
in ms, toggle "video" and "static image" mode
Definition: Webcam.idl:75
webcam::ImageMetaData
Image meta data.
Definition: Webcam.idl:57
webcam::Information_3_0_0::supportedFormats
vector< Format_2_0_0 > supportedFormats
supported image formats
Definition: Webcam.idl:82
webcam::Controls::contrast
int contrast
contrast
Definition: Webcam.idl:41
webcam::JPEG
JPEG.
Definition: Webcam.idl:14
webcam::Controls::saturation
int saturation
saturation
Definition: Webcam.idl:42
webcam::ImageMetaData::format
Format_2_0_0 format
image format information
Definition: Webcam.idl:58