Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

CosLW_Log.idl

Go to the documentation of this file.
00001 00032 #ifndef MODULE_COS_LW_LOG_IDL 00033 #define MODULE_COS_LW_LOG_IDL 00034 00035 #pragma prefix "omg.org" 00036 00042 module CosLwLog { 00043 00087 typedef unsigned short LogLevel; 00088 00089 00095 const LogLevel SECURITY_ALARM = 1; 00096 00102 const LogLevel FAILURE_ALARM = 2; 00103 00108 const LogLevel DEGRADED_ALARM =3; 00109 00114 const LogLevel EXCEPTION_ERROR =4; 00115 00120 const LogLevel FLOW_CONTROL_ERROR =5; 00121 00126 const LogLevel RANGE_ERROR =6; 00127 00132 const LogLevel USAGE_ERROR = 7; 00133 00138 const LogLevel ADMINISTRATIVE_EVENT = 8; 00139 00144 const LogLevel STATISTIC_REPORT = 9; 00145 00146 00159 enum OperationalState {disabled, enabled}; 00160 00170 enum AdministrativeState {locked, unlocked}; 00171 00178 enum LogFullAction {WRAP, HALT}; 00179 00181 typedef unsigned long long RecordId; 00182 00187 struct LogTime { 00189 long seconds; 00191 long nanoseconds; 00192 }; 00193 00199 struct AvailabilityStatus { 00201 boolean off_duty; 00203 boolean log_full; 00204 }; 00205 00209 struct ProducerLogRecord { 00211 string producerId; 00213 string producerName; 00215 LogLevel level; 00217 string logData; 00218 00219 }; 00220 00224 struct LogRecord { 00226 RecordId id; 00228 LogTime time; 00230 ProducerLogRecord info; 00231 }; 00232 00234 typedef sequence<LogRecord> LogRecordSequence; 00236 typedef sequence<ProducerLogRecord> ProducerLogRecordSequence; 00238 typedef sequence<LogLevel> LogLevelSequence; 00240 typedef sequence<string> StringSeq; 00241 00243 exception InvalidParam { 00245 string details; 00246 }; 00247 00252 interface LogStatus { 00259 unsigned long long get_max_size(); 00266 unsigned long long get_current_size(); 00273 unsigned long long get_n_records(); 00283 LogFullAction get_log_full_action(); 00295 AvailabilityStatus get_availability_status(); 00302 AdministrativeState get_administrative_state(); 00310 OperationalState get_operational_state(); 00311 }; 00312 00317 interface LogConsumer : LogStatus { 00318 00331 RecordId get_record_id_from_time (in LogTime fromTime) 00332 raises(InvalidParam); 00358 LogRecordSequence retrieve_records( 00359 inout RecordId currentId, 00360 inout unsigned long howMany 00361 ) 00362 raises(InvalidParam); 00363 00391 LogRecordSequence retrieve_records_by_level( 00392 inout RecordId currentId, 00393 inout unsigned long howMany, 00394 in LogLevelSequence valueList 00395 ) 00396 raises(InvalidParam); 00397 00421 LogRecordSequence retrieve_records_by_producer_id( 00422 inout RecordId currentId, 00423 inout unsigned long howMany, 00424 in StringSeq valueList 00425 ) 00426 raises(InvalidParam); 00427 00451 LogRecordSequence retrieve_records_by_producer_name( 00452 inout RecordId currentId, 00453 inout unsigned long howMany, 00454 in StringSeq valueList 00455 ) 00456 raises(InvalidParam); 00457 }; 00458 00461 interface LogProducer : LogStatus { 00462 00469 oneway void write_records( 00470 in ProducerLogRecordSequence records 00471 ); 00479 oneway void write_record( 00480 in ProducerLogRecord record 00481 ); 00482 }; 00483 00486 interface LogAdministrator : LogStatus { 00487 00495 void set_max_size(in unsigned long long size) raises (InvalidParam); 00496 00503 void set_log_full_action(in LogFullAction action); 00504 00513 void set_administrative_state( in AdministrativeState state); 00514 00519 void clear_log(); 00520 00526 void destroy (); 00527 }; 00528 }; 00529 #endif // MODULE_COS_LW_LOG_IDL