Issue 2663: Adopt current OMG style of using CONST (log_service-ftf) Source: (, ) Nature: Uncategorized Issue Severity: Summary: Summary: there are a few enums defined in the IDL. Perhaps it would be a good idea to adopt the current OMG style of using CONST declarations for these values as this allows easy extension of the values (which enums do not). It is also nice to define the const types as signed and to reserve all positive values for OMG use and leave the negative values for vendors. Resolution: The following are the enums defined in the Specification IDL and proposed changes: Revised Text: 1. DsLogAdmin.idl: enum LogFullAction { wrap, halt }; The LogFullAction could probably be defined as CONST values, so vendors or future extention can add more action items. InvalidLogFullAction exception and LogFullActionType type are defined for LogFullAction. module DsLogAdmin{ ... exception InvalidLogFullAction {}; typedef unsigned short LogFullActionType; const LogFullActionType wrap = 0; const LogFullActionType halt = 1; ... }; Modify the operations on the Log and LogMgr interfaces that used the old LogFullAction enum to use the new LogFullActionType and to raise the appropriate exception: module DsLogAdmin { ... interface Log { ... void set_log_full_action(in LogFullActionType action) raises(InvalidLogFullAction); ... }; interface LogMgr { ... BasicLog create(in LogFullActionType full_action, in unsigned long long max_size, out LogId id) raises(InvalidLogFullAction); BasicLog create_with_id(in LogId id, in LogFullActionType full_action, in unsigned long long max_size) raises(LogIdAlreadyExists, InvalidLogFullAction); ... }; }; 2. DsLogAdmin.idl: enum OperationalState { disabled, enabled }; This is left as is since the only possible values are 0 and 1. 3. DsLogAdmin.idl: enum AdministrativeState { locked, unlocked }; This is left as is since the only possible values are 0 and 1. 4. DsLogAdmin.idl: enum ForwardingState { on, off }; This is left as is since the only possible values are 0 and 1. 5. DsLogNotification.idl: enum PerceivedSeverity { critical, minor, cleared }; The PerceivedSeverity could be defined as CONST values for extention. This is only used within the context of notifications and never supplied as an argument to an operation. Therefore we only need to change it to a constant: module DsLogNotification { ... typedef unsigned short PerceivedSeverityType; const PerceivedSeverityType critical = 0; const PerceivedSeverityType minor = 1; const PerceivedSeverityType cleared = 2; struct ThresholdAlarm { Log logref; LogId id; TimeT time; Threshold crossed_value; Threshold observed_value; PerceivedSeverityType perceived_severity; }; ... }; Revised Text: Specification Text Section 3.2.4.5: Log Full Action Modify to use the LogFullActionType type and the InvalidLogFullAction exception. Section 3.3.3: Log Creation Modify to have create() and create_with_id() to use the LogFullActionType type and the InvalidLogFullAction exception Specification IDL module DsLogAdmin{ ... exception InvalidLogFullAction {}; typedef unsigned short LogFullActionType; const LogFullActionType wrap = 0; const LogFullActionType halt = 1; ... interface Log { ... void set_log_full_action(in LogFullActionType action) raises(InvalidLogFullAction); ... }; interface LogMgr { ... BasicLog create(in LogFullActionType full_action, in unsigned long long max_size, out LogId id) raises(InvalidLogFullAction); BasicLog create_with_id(in LogId id, in LogFullActionType full_action, in unsigned long long max_size) raises(LogIdAlreadyExists, InvalidLogFullAction); ... }; }; module DsLogNotification { ... typedef unsigned short PerceivedSeverityType; const PerceivedSeverityType critical = 0; const PerceivedSeverityType minor = 1; const PerceivedSeverityType cleared = 2; struct ThresholdAlarm { Log logref; LogId id; TimeT time; Threshold crossed_value; Threshold observed_value; PerceivedSeverityType perceived_severity; }; ... }; Actions taken: Completed. Actions taken: May 27, 1999: received issue July 27, 1999: closed issue Discussion: End of Annotations:===== Sender: spruce@ovdm40.cnd.hp.com Message-ID: <374B4B01.94936F4B@fc.hp.com> Date: Tue, 25 May 1999 19:14:41 -0600 From: Stephen Spruce Organization: Telecom Management Division X-Mailer: Mozilla 4.08 [en] (X11; I; HP-UX B.10.20 9000/777) MIME-Version: 1.0 To: juergen@omg.org Subject: Issues for Telecom Log Service Content-Type: multipart/mixed; boundary="------------5359345BE554D3D338D5D19C" X-UIDL: 30aaae3f45cba14fe2a8031cca11ac75 Hi Juergen, Attached is a list of issues that have been brought up against the Telecom Log Service (TLS) since it reached the Adopted Specification stage. I am not exactly clear on the content that is necessary for these issues, so let me know if you need more information about any or all of them. I have a few question regarding issues for the TLS: 1) Will the TLS get an entry in the "OMG Revision Issue" web page? 2) Once an issue is assigned, how can I update the information concerning the issue? 3) Can the FTF raise their own issues against the TLS submission? 4) When someone sends a question to the TLS email alias and they bring up a question which is a valid issue, how should those questions be moved to a formal issue? Should I do it on their behalf or should I have the person raising the issue file it themselves? 5) Issue 2348 was raised against the TLS submission before an FTF was formed. Can we make sure that it gets associated with the TLS FTF? regards, stephen -- Stephen H. Spruce Jr. Communication Management Division Hewlett-Packard Co. Ft. Collins, CO (970) 898-7497 spruce@fc.hp.comISSUE ----- (from Rob Brennan: brennanr@Teltec.DCU.IE) I notice that there are a few enums defined in the IDL. Perhaps it would be a good idea to adopt the current OMG style of using CONST declarations for these values as this allows easy extension of the values (which enums do not). It is also nice to define the const types as signed and to reserve all positive values for OMG