OpcomChannel.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //
  2. // OpcomChannel.h
  3. //
  4. // $Id: //poco/1.4/Foundation/include/Poco/OpcomChannel.h#1 $
  5. //
  6. // Library: Foundation
  7. // Package: Logging
  8. // Module: OpcomChannel
  9. //
  10. // Definition of the OpcomChannel class specific to OpenVMS.
  11. //
  12. // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
  13. // and Contributors.
  14. //
  15. // SPDX-License-Identifier: BSL-1.0
  16. //
  17. #ifndef Foundation_OpcomChannel_INCLUDED
  18. #define Foundation_OpcomChannel_INCLUDED
  19. #include "Poco/Foundation.h"
  20. #include "Poco/Channel.h"
  21. namespace Poco {
  22. class Foundation_API OpcomChannel: public Channel
  23. /// A OpenVMS-only channel that uses the OpenVMS OPCOM service.
  24. {
  25. public:
  26. OpcomChannel();
  27. /// Creates an OpcomChannel that uses the OPC$M_NM_CENTRL
  28. /// target.
  29. OpcomChannel(int target);
  30. /// Creates an OpcomChannel that uses the given target.
  31. /// Specify one of the OPC$M_NM_* values.
  32. /// See also setProperty().
  33. void log(const Message& msg);
  34. /// Logs the given message using the OpenVMS OPCOM service.
  35. void setProperty(const std::string& name, const std::string& value);
  36. /// Sets the property with the given name.
  37. ///
  38. /// The only supported property is "target", which must
  39. /// be set to one of the following values:
  40. ///
  41. /// * CARDS: Card device operator
  42. /// * CENTRL: Central operator
  43. /// * SECURITY: Security operator
  44. /// * CLUSTER: OpenVMS Cluster operator
  45. /// * DEVICE: Device status information
  46. /// * DISKS: Disks operator
  47. /// * NTWORK: Network operator
  48. /// * TAPES: Tapes operator
  49. /// * PRINT: Printer operator
  50. /// * OPER1 ..
  51. /// * OPER12: System-manager-defined operator functions
  52. std::string getProperty(const std::string& name) const;
  53. /// Returns the value of the property with the given name.
  54. /// See setProperty() for a description of the supported
  55. /// properties.
  56. static const std::string PROP_TARGET;
  57. protected:
  58. ~OpcomChannel();
  59. private:
  60. int _target;
  61. };
  62. } // namespace Poco
  63. #endif // Foundation_OpcomChannel_INCLUDED