Legrand / Raritan / Server Technology Xerus™ JSON-RPC API

Loading...
Searching...
No Matches
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 */
9module 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 {
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 format; ///< image format information
59 long timestamp; ///< image timestamp
60 Location location; ///< source webcam location
61 };
62
63 /** Image */
64 structure Image {
65 ImageMetaData meta; ///< image meta data
66 string data; ///< base64 encoded image data
67 };
68
69 /** Webcam settings */
70 structure Settings {
71 Format 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 {
80 string id; ///< port and camera specific ID string
81 string model; ///< camera model
82 vector<Format> supportedFormats; ///< supported image formats
83 };
84
85 /** The webcam interface */
86 interface Webcam {
87 /**
88 * Error codes
89 */
90 constant int NO_ERROR = 0; ///< Operation successful, no error
91 constant int ERR_INVALID_PARAM = 1; ///< Invalid parameter for an operation
92
93 /**
94 * This event is emitted after the settings of a webcam were changed
95 */
96 valueobject SettingsChangedEvent extends event.UserEvent {
97 Settings oldSettings; ///< the old settings
98 Settings newSettings; ///< the new settings
99 };
100
101 /**
102 * Retrieve information of a specific webcam.
103 *
104 * @return Information
105 */
106 Information getInformation();
107
108 /**
109 * Retrieve settings of a specific webcam.
110 *
111 * @return Settings
112 */
113 Settings getSettings();
114
115 /**
116 * Change settings of a specific webcam.
117 *
118 * @param settings New webcam settings
119 *
120 * @return 0 if success
121 * @return 1 if any parameter is invalid
122 */
123 int setSettings(in Settings settings);
124
125 /**
126 * Apply webcam control settings without storing them
127 *
128 * @param controls Control settings
129 *
130 * @return 0 if success
131 * @return 1 if any parameter is invalid
132 */
133 int setControls(in Controls controls);
134
135 /**
136 * Retrieve the default value of the controls.
137 *
138 * @return Controls
139 */
140 Controls getControlDefaults();
141 };
142}
webcam::Webcam
The webcam interface.
Definition Webcam.idl:86
webcam::Webcam::setSettings
int setSettings(in Settings settings)
Change settings of a specific webcam.
webcam::Webcam::getInformation
Information getInformation()
Retrieve information of a specific webcam.
webcam::Webcam::getSettings
Settings getSettings()
Retrieve settings of a specific webcam.
webcam::Webcam::getControlDefaults
Controls getControlDefaults()
Retrieve the default value of the controls.
webcam::Webcam::setControls
int setControls(in Controls controls)
Apply webcam control settings without storing them.
webcam
Webcam Management.
Definition StorageManager.idl:10
webcam::PowerLineFrequency
PowerLineFrequency
PowerLineFrequency.
Definition Webcam.idl:20
webcam::PixelFormat
PixelFormat
PixelFormat.
Definition Webcam.idl:12
webcam::JPEG
@ JPEG
JPEG.
Definition Webcam.idl:14
webcam::MJPEG
@ MJPEG
Motion JPEG.
Definition Webcam.idl:13
webcam::RGB
@ RGB
RGB encoded.
Definition Webcam.idl:15
webcam::YUV
@ YUV
YUV encoded.
Definition Webcam.idl:16
webcam::Controls
Controls.
Definition Webcam.idl:39
webcam::Controls::contrast
int contrast
contrast
Definition Webcam.idl:41
webcam::Controls::powerLineFrequency
PowerLineFrequency powerLineFrequency
power line frequency (50Hz, 60Hz or disabled)
Definition Webcam.idl:45
webcam::Controls::saturation
int saturation
saturation
Definition Webcam.idl:42
webcam::Controls::brightness
int brightness
brightness
Definition Webcam.idl:40
webcam::Controls::gain
int gain
gain
Definition Webcam.idl:43
webcam::Controls::gamma
int gamma
gamma
Definition Webcam.idl:44
webcam::Format
Format.
Definition Webcam.idl:28
webcam::Format::width
int width
image width
Definition Webcam.idl:29
webcam::Format::height
int height
image height
Definition Webcam.idl:30
webcam::Format::pixelFormat
PixelFormat pixelFormat
pixel format
Definition Webcam.idl:31
webcam::ImageMetaData
Image meta data.
Definition Webcam.idl:57
webcam::ImageMetaData::timestamp
long timestamp
image timestamp
Definition Webcam.idl:59
webcam::ImageMetaData::format
Format format
image format information
Definition Webcam.idl:58
webcam::ImageMetaData::location
Location location
source webcam location
Definition Webcam.idl:60
webcam::Image
Image.
Definition Webcam.idl:64
webcam::Image::meta
ImageMetaData meta
image meta data
Definition Webcam.idl:65
webcam::Image::data
string data
base64 encoded image data
Definition Webcam.idl:66
webcam::Information
Webcam information.
Definition Webcam.idl:79
webcam::Information::supportedFormats
vector< Format > supportedFormats
supported image formats
Definition Webcam.idl:82
webcam::Information::model
string model
camera model
Definition Webcam.idl:81
webcam::Information::id
string id
port and camera specific ID string
Definition Webcam.idl:80
webcam::Location
Location.
Definition Webcam.idl:49
webcam::Location::y
string y
y
Definition Webcam.idl:52
webcam::Location::name
string name
location name
Definition Webcam.idl:50
webcam::Location::z
string z
z
Definition Webcam.idl:53
webcam::Location::x
string x
x
Definition Webcam.idl:51
webcam::Settings
Webcam settings.
Definition Webcam.idl:70
webcam::Settings::controls
Controls controls
image settings like brightness, contrast, gain, ...
Definition Webcam.idl:72
webcam::Settings::refreshInterval
int refreshInterval
in ms, toggle "video" and "static image" mode
Definition Webcam.idl:75
webcam::Settings::format
Format format
currently selected image format
Definition Webcam.idl:71
webcam::Settings::name
string name
webcam name
Definition Webcam.idl:73
webcam::Settings::location
Location location
webcam location
Definition Webcam.idl:74
webcam::Webcam::SettingsChangedEvent
This event is emitted after the settings of a webcam were changed.
Definition Webcam.idl:96
webcam::Webcam::SettingsChangedEvent::newSettings
Settings newSettings
the new settings
Definition Webcam.idl:98
webcam::Webcam::SettingsChangedEvent::oldSettings
Settings oldSettings
the old settings
Definition Webcam.idl:97