Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / examples / Advanced / ch_8_and_10 / CCS.idl
blob5c2503fec4c93f1dd50adc0090c3b513d243bd3e
1 //=============================================================================
2 /**
3 * @file CCS.idl
5 * @author Source code used in TAO has been modified and adapted from the codeprovided in the book
6 * @author "Advanced CORBA Programming with C++" by MichiHenning and Steve Vinoski. Copyright 1999. Addison-Wesley
7 * @author Reading
8 * @author MA.Modified for TAO by Mike Moran <mm4@cs.wustl.edu>
9 */
10 //=============================================================================
15 #pragma prefix "acme.com"
17 module CCS {
18 typedef unsigned long AssetType;
19 typedef string ModelType;
20 typedef short TempType;
21 typedef string LocType;
23 interface Thermometer {
24 readonly attribute ModelType model;
25 readonly attribute AssetType asset_num;
26 readonly attribute TempType temperature;
27 attribute LocType location;
30 interface Thermostat : Thermometer {
31 struct BtData {
32 TempType requested;
33 TempType min_permitted;
34 TempType max_permitted;
35 string error_msg;
37 exception BadTemp { BtData details; };
39 TempType get_nominal();
40 TempType set_nominal(in TempType new_temp)
41 raises(BadTemp);
44 interface Controller {
45 typedef sequence<Thermometer> ThermometerSeq;
46 typedef sequence<Thermostat> ThermostatSeq;
48 enum SearchCriterion { ASSET, LOCATION, MODEL };
50 union KeyType switch(SearchCriterion) {
51 case ASSET:
52 AssetType asset_num;
53 case LOCATION:
54 LocType loc;
55 case MODEL:
56 ModelType model_desc;
59 struct SearchType {
60 KeyType key;
61 Thermometer device;
63 typedef sequence<SearchType> SearchSeq;
65 struct ErrorDetails {
66 Thermostat tmstat_ref;
67 Thermostat::BtData info;
69 typedef sequence<ErrorDetails> ErrSeq;
71 exception EChange {
72 ErrSeq errors;
75 ThermometerSeq list();
76 void find(inout SearchSeq slist);
77 void change(
78 in ThermostatSeq tlist, in short delta
79 ) raises(EChange);