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

Raritan PX2/PX3 JSON-RPC API

StorageManager.idl
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3 * Copyright 2011 Raritan Inc. All rights reserved.
4 */
5
6 #include <UserEvent.idl>
7 #include <Webcam.idl>
8
9 /** Webcam Management */
10 module webcam {
11
12 /** The storage manager interface */
13 interface StorageManager_1_0_2 {
14 /**
15 * Error codes
16 */
17 constant int NO_ERROR = 0; ///< Operation successful, no error
18 constant int ERR_INVALID_PARAM = 1; ///< Invalid parameter for an operation
19 constant int ERR_INIT_IN_PROGRESS = 2; ///< Storage information is going to be initialized
20 constant int ERR_ALREADY_RUNNING = 3; ///< The activity is already running
21 constant int ERR_TOO_LARGE = 4; ///< The requested result is too large
22 constant int ERR_OPERATION_NOT_SUPPORTED = 5; ///< The requested operation is not supported on the current storage type
23
24 /** StorageType */
25 enumeration StorageType {
26 LOCAL, ///< Local
27 FTP, ///< FTP
28 CIFS, ///< CIFS
29 NFS ///< NFS
30 };
31
32 /** Direction */
33 enumeration Direction {
34 ASCENDING, ///< ascending
35 DESCENDING ///< descending
36 };
37
38 /** StorageStatus */
39 enumeration StorageStatus {
40 INITIALIZING, ///< Initializing is in progress,
41 READY ///< Storage is ready for usage
42 };
43
44 /** Webcam Storage Info */
45 structure WebcamStorageInfo {
46 Webcam_2_0_1 webcam; ///< webcam object
47 long newestIndex; ///< newest know index
48 long oldestIndex; ///< oldest know index
49 int count; ///< nr of stored images from this webcam
50 };
51
52 /** Information */
53 structure StorageInformation {
54 StorageStatus status; ///< storage status
55 int capacity; ///< over-all nr of storable images
56 int used; ///< nr of stored images (local storage only)
57 vector<WebcamStorageInfo> webcamStorageInfo; ///< List of storage information for each webcam (local storage only)
58 };
59
60 /** Settings */
61 structure StorageSettings {
62 StorageType type; ///< storage type
63 int capacity; ///< maximum number of stored images; obsolete, no longer used
64 string server; ///< server ip, share and path (empty/ignored for LOCAL storage type)
65 string username; ///< username (empty/ignored for LOCAL storage type)
66 string password; ///< password (empty/ignored for LOCAL storage type)
67 };
68
69 /** StorageMetaData */
70 structure StorageMetaData {
71 long index; ///< current image index
72 Webcam_2_0_1 webcam; ///< source webcam
73 };
74
75 /** StorageMetaData */
76 structure ImageStorageMetaData {
77 ImageMetaData imageMeta; ///< image related meta data
78 int fileSize; ///< image file size in bytes
79 StorageMetaData storageMeta;///< store related meta data
80 };
81
82 /** StorageImage */
83 structure StorageImage {
84 Image_2_0_0 image; ///< image object
85 StorageMetaData metaData; ///< meta data
86 };
87
88 /** Activity */
89 structure Activity {
90 Webcam_2_0_1 webcam; ///< webcam object
91 int interval; ///< capture interval
92 int count; ///< nr of images to take
93 int done; ///< nr of images taken
94 };
95
96 /** Event: image upload to storage started */
97 valueobject ImageUploadStartedEvent extends event.UserEvent {
98 Webcam_2_0_1 webcam; ///< webcam object
99 string folderUrl; ///< URL under which the containing folder can be accessed
100 };
101
102 /**
103 * Get supported storage types
104 *
105 * @return a list of supported storage types
106 */
107 vector<StorageType> getSupportedStorageTypes();
108
109 /**
110 * get storage information
111 *
112 * @return StorageInformation
113 */
114 StorageInformation getInformation();
115
116 /**
117 * get storage settings
118 *
119 * @return StorageSettings
120 */
121 StorageSettings getSettings();
122
123 /**
124 * set storage settings
125 *
126 * @param settings settings structure
127 *
128 * @return NO_ERROR on success
129 * @return ERR_INVALID_PARAM invalid settings
130 */
131 int setSettings(in StorageSettings settings);
132
133 /**
134 * add an image to the storage
135 *
136 * @param webcam image source webcam
137 * @param image image
138 * @param index index of the added image
139 *
140 * @return NO_ERROR on success
141 */
142 int addImage(in Webcam_2_0_1 webcam, in Image_2_0_0 image, out long index);
143
144 /**
145 * remove an image of the storage
146 *
147 * @note not supported for remote storage (CIFS and FTP)
148 *
149 * @param webcam image source webcam
150 * @param start start index
151 * @param count number of images
152 * @param direction index counting direction
153 *
154 * @return NO_ERROR on success
155 */
156 int removeImages(in Webcam_2_0_1 webcam, in long start, in int count, in Direction direction);
157
158 /**
159 * get meta data of images from storage
160 *
161 * @note not supported for remote storage (CIFS and FTP)
162 *
163 * @param webcam image source webcam
164 * @param start start index
165 * @param count number of images
166 * @param direction index counting direction
167 * @param meta result: list of storage meta data
168 *
169 * @return NO_ERROR on success
170 * @return ERR_TOO_LARGE too many information requested
171 */
172 int getMetaData(in Webcam_2_0_1 webcam, in long start, in int count,
173 in Direction direction, out vector<ImageStorageMetaData> meta);
174
175 /**
176 * retrieve images from the storage
177 *
178 * @note not supported for remote storage (CIFS and FTP)
179 *
180 * @param webcam image source webcam
181 * @param start start index
182 * @param count number of images
183 * @param direction index counting direction
184 * @param image result: list of storage images
185 *
186 * @return NO_ERROR on success
187 * @return ERR_TOO_LARGE too many images requested
188 */
189 int getImages(in Webcam_2_0_1 webcam, in long start, in int count,
190 in Direction direction, out vector<StorageImage> image);
191
192 /**
193 * get all running activities
194 *
195 * @return list of running activities
196 */
197 vector<Activity> getActivities();
198
199 /**
200 * start a capture activity
201 *
202 * @param webcam webcam
203 * @param count number of images to store, zero is interpreted as infinite
204 * @param interval interval in ms
205 *
206 * @return NO_ERROR on success
207 * @return ERR_INVALID_PARAM webcam not found
208 */
209 int startActivity(in Webcam_2_0_1 webcam, in int count, in int interval);
210
211 /**
212 * Start a capture activity, storing the images to a specific storage folder
213 *
214 * @param webcam webcam
215 * @param count number of images to store, zero is interpreted as infinite
216 * @param interval interval in ms
217 * @param folder folder path to store the images into
218 *
219 * @return NO_ERROR on success
220 * @return ERR_INVALID_PARAM webcam not found
221 */
222 int startActivityWithFolder(in Webcam_2_0_1 webcam, in int count, in int interval, in string folder);
223
224 /**
225 * stop a capture activity
226 *
227 * @param webcam webcam
228 *
229 * @return NO_ERROR on success
230 * @return ERR_INVALID_PARAM no matching activity found
231 */
232 int stopActivity(in Webcam_2_0_1 webcam);
233 };
234 }
webcam::StorageManager_1_0_2::StorageInformation::webcamStorageInfo
vector< WebcamStorageInfo > webcamStorageInfo
List of storage information for each webcam (local storage only)
Definition: StorageManager.idl:57
webcam::StorageManager_1_0_2::StorageSettings
Settings.
Definition: StorageManager.idl:61
webcam::StorageManager_1_0_2::StorageSettings::password
string password
password (empty/ignored for LOCAL storage type)
Definition: StorageManager.idl:66
webcam::StorageManager_1_0_2::WebcamStorageInfo
Webcam Storage Info.
Definition: StorageManager.idl:45
webcam::StorageManager_1_0_2::INITIALIZING
Initializing is in progress,.
Definition: StorageManager.idl:40
webcam::StorageManager_1_0_2::StorageMetaData
StorageMetaData.
Definition: StorageManager.idl:70
webcam::StorageManager_1_0_2::ImageStorageMetaData::imageMeta
ImageMetaData imageMeta
image related meta data
Definition: StorageManager.idl:77
webcam::StorageManager_1_0_2::ImageStorageMetaData::storageMeta
StorageMetaData storageMeta
store related meta data
Definition: StorageManager.idl:79
webcam::StorageManager_1_0_2::StorageInformation::used
int used
nr of stored images (local storage only)
Definition: StorageManager.idl:56
webcam::Webcam_2_0_1
The webcam interface.
Definition: Webcam.idl:86
webcam::StorageManager_1_0_2::StorageType
StorageType
StorageType.
Definition: StorageManager.idl:25
webcam::StorageManager_1_0_2::StorageStatus
StorageStatus
StorageStatus.
Definition: StorageManager.idl:39
webcam::StorageManager_1_0_2::WebcamStorageInfo::webcam
Webcam_2_0_1 webcam
webcam object
Definition: StorageManager.idl:46
webcam::StorageManager_1_0_2::StorageImage::image
Image_2_0_0 image
image object
Definition: StorageManager.idl:84
webcam::StorageManager_1_0_2::StorageInformation
Information.
Definition: StorageManager.idl:53
webcam::StorageManager_1_0_2::StorageInformation::status
StorageStatus status
storage status
Definition: StorageManager.idl:54
webcam::StorageManager_1_0_2::folderUrl
string folderUrl
URL under which the containing folder can be accessed.
Definition: StorageManager.idl:99
webcam::StorageManager_1_0_2::Activity::done
int done
nr of images taken
Definition: StorageManager.idl:93
webcam::StorageManager_1_0_2::StorageSettings::server
string server
server ip, share and path (empty/ignored for LOCAL storage type)
Definition: StorageManager.idl:64
webcam::StorageManager_1_0_2::StorageMetaData::webcam
Webcam_2_0_1 webcam
source webcam
Definition: StorageManager.idl:72
webcam::StorageManager_1_0_2::StorageImage
StorageImage.
Definition: StorageManager.idl:83
webcam::StorageManager_1_0_2
The storage manager interface.
Definition: StorageManager.idl:13
webcam::StorageManager_1_0_2::StorageImage::metaData
StorageMetaData metaData
meta data
Definition: StorageManager.idl:85
webcam::StorageManager_1_0_2::FTP
FTP.
Definition: StorageManager.idl:27
webcam::StorageManager_1_0_2::ImageStorageMetaData
StorageMetaData.
Definition: StorageManager.idl:76
webcam::StorageManager_1_0_2::Activity::webcam
Webcam_2_0_1 webcam
webcam object
Definition: StorageManager.idl:90
webcam::StorageManager_1_0_2::LOCAL
Local.
Definition: StorageManager.idl:26
webcam::StorageManager_1_0_2::WebcamStorageInfo::count
int count
nr of stored images from this webcam
Definition: StorageManager.idl:49
webcam::StorageManager_1_0_2::ImageStorageMetaData::fileSize
int fileSize
image file size in bytes
Definition: StorageManager.idl:78
webcam::StorageManager_1_0_2::Activity::interval
int interval
capture interval
Definition: StorageManager.idl:91
webcam::StorageManager_1_0_2::StorageMetaData::index
long index
current image index
Definition: StorageManager.idl:71
webcam::StorageManager_1_0_2::CIFS
CIFS.
Definition: StorageManager.idl:28
webcam::StorageManager_1_0_2::WebcamStorageInfo::oldestIndex
long oldestIndex
oldest know index
Definition: StorageManager.idl:48
webcam::Image_2_0_0
Image.
Definition: Webcam.idl:64
webcam::StorageManager_1_0_2::StorageInformation::capacity
int capacity
over-all nr of storable images
Definition: StorageManager.idl:55
webcam::StorageManager_1_0_2::StorageSettings::username
string username
username (empty/ignored for LOCAL storage type)
Definition: StorageManager.idl:65
webcam::StorageManager_1_0_2::WebcamStorageInfo::newestIndex
long newestIndex
newest know index
Definition: StorageManager.idl:47
webcam::StorageManager_1_0_2::Direction
Direction
Direction.
Definition: StorageManager.idl:33
webcam::StorageManager_1_0_2::Activity::count
int count
nr of images to take
Definition: StorageManager.idl:92
webcam
Webcam Management.
Definition: StorageManager.idl:10
webcam::StorageManager_1_0_2::Activity
Activity.
Definition: StorageManager.idl:89
webcam::ImageMetaData
Image meta data.
Definition: Webcam.idl:57
webcam::StorageManager_1_0_2::ASCENDING
ascending
Definition: StorageManager.idl:34
webcam::StorageManager_1_0_2::StorageSettings::capacity
int capacity
maximum number of stored images; obsolete, no longer used
Definition: StorageManager.idl:63
webcam::StorageManager_1_0_2::StorageSettings::type
StorageType type
storage type
Definition: StorageManager.idl:62