@openxiot/xiot-core-spec-ts 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/index.d.ts +315 -0
- package/dist/index.js +331 -0
- package/dist/xiot/core/spec/codec/app/ApplicationCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/app/ApplicationCodec.js +50 -0
- package/dist/xiot/core/spec/codec/app/authorization/AuthorizationCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/AuthorizationCodec.js +41 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationEventbusImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationEventbusImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationHttpImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationHttpImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationJwtImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/authorization/impl/AuthorizationJwtImplCodec.js +14 -0
- package/dist/xiot/core/spec/codec/app/event/EventReceiverCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/EventReceiverCodec.js +41 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverEventbusImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverEventbusImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverHttpImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverHttpImplCodec.js +15 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverKafkaImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/app/event/impl/EventReceiverKafkaImplCodec.js +18 -0
- package/dist/xiot/core/spec/codec/definition/ActionDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/ActionDefinitionCodec.js +43 -0
- package/dist/xiot/core/spec/codec/definition/ArgumentDefinitionCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/definition/ArgumentDefinitionCodec.js +48 -0
- package/dist/xiot/core/spec/codec/definition/CategoryDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/CategoryDefinitionCodec.js +32 -0
- package/dist/xiot/core/spec/codec/definition/DescriptionCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/definition/DescriptionCodec.js +32 -0
- package/dist/xiot/core/spec/codec/definition/DeviceDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/DeviceDefinitionCodec.js +38 -0
- package/dist/xiot/core/spec/codec/definition/EventDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/EventDefinitionCodec.js +39 -0
- package/dist/xiot/core/spec/codec/definition/FormatDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/FormatDefinitionCodec.js +34 -0
- package/dist/xiot/core/spec/codec/definition/NamespaceDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/NamespaceDefinitionCodec.js +32 -0
- package/dist/xiot/core/spec/codec/definition/PropertyDefinitionCodec.d.ts +9 -0
- package/dist/xiot/core/spec/codec/definition/PropertyDefinitionCodec.js +95 -0
- package/dist/xiot/core/spec/codec/definition/ServiceDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/ServiceDefinitionCodec.js +71 -0
- package/dist/xiot/core/spec/codec/definition/UnitDefinitionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/definition/UnitDefinitionCodec.js +34 -0
- package/dist/xiot/core/spec/codec/definition/ValueListCodec.d.ts +6 -0
- package/dist/xiot/core/spec/codec/definition/ValueListCodec.js +31 -0
- package/dist/xiot/core/spec/codec/definition/ValueRangeCodec.d.ts +6 -0
- package/dist/xiot/core/spec/codec/definition/ValueRangeCodec.js +13 -0
- package/dist/xiot/core/spec/codec/definition/type/ActionTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/ActionTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/EventTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/EventTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/GroupTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/GroupTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/PropertyTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/PropertyTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/definition/type/ServiceTypeCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/definition/type/ServiceTypeCodec.js +28 -0
- package/dist/xiot/core/spec/codec/device/DeviceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/device/DeviceCodec.js +51 -0
- package/dist/xiot/core/spec/codec/image/ActionImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/ActionImageCodec.js +25 -0
- package/dist/xiot/core/spec/codec/image/ArgumentImageCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/image/ArgumentImageCodec.js +44 -0
- package/dist/xiot/core/spec/codec/image/DeviceImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/DeviceImageCodec.js +17 -0
- package/dist/xiot/core/spec/codec/image/EventImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/EventImageCodec.js +27 -0
- package/dist/xiot/core/spec/codec/image/PropertyImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/PropertyImageCodec.js +18 -0
- package/dist/xiot/core/spec/codec/image/ServiceImageCodec.d.ts +4 -0
- package/dist/xiot/core/spec/codec/image/ServiceImageCodec.js +42 -0
- package/dist/xiot/core/spec/codec/instance/ActionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/ActionCodec.js +49 -0
- package/dist/xiot/core/spec/codec/instance/ArgumentCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/ArgumentCodec.js +44 -0
- package/dist/xiot/core/spec/codec/instance/DeviceInstanceCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/instance/DeviceInstanceCodec.js +25 -0
- package/dist/xiot/core/spec/codec/instance/EventCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/EventCodec.js +45 -0
- package/dist/xiot/core/spec/codec/instance/PropertyCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/PropertyCodec.js +98 -0
- package/dist/xiot/core/spec/codec/instance/ServiceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/instance/ServiceCodec.js +55 -0
- package/dist/xiot/core/spec/codec/jwt/JwtCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/JwtCodec.js +41 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtEsImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtEsImplCodec.js +26 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtRsaImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtRsaImplCodec.js +26 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtSecretsImplCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/jwt/impl/JwtSecretsImplCodec.js +24 -0
- package/dist/xiot/core/spec/codec/key/AccessKeyCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/key/AccessKeyCodec.js +18 -0
- package/dist/xiot/core/spec/codec/key/DeviceCertCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/key/DeviceCertCodec.js +36 -0
- package/dist/xiot/core/spec/codec/key/DeviceKeyCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/key/DeviceKeyCodec.js +24 -0
- package/dist/xiot/core/spec/codec/lifecycle/app/ApplicationWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/app/ApplicationWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ActionDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ActionDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/DeviceDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/DeviceDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/EventDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/EventDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/FormatDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/FormatDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/PropertyDefinitionWithLifecycleCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/PropertyDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ServiceDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/ServiceDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/UnitDefinitionWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/definition/UnitDefinitionWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/instance/DeviceInstanceWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/instance/DeviceInstanceWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/product/VersionWithLifecycleCodec.d.ts +10 -0
- package/dist/xiot/core/spec/codec/lifecycle/product/VersionWithLifecycleCodec.js +42 -0
- package/dist/xiot/core/spec/codec/lifecycle/template/DeviceTemplateWithLifecycleCodec.d.ts +11 -0
- package/dist/xiot/core/spec/codec/lifecycle/template/DeviceTemplateWithLifecycleCodec.js +38 -0
- package/dist/xiot/core/spec/codec/lifecycle/type/DeviceTypeWithLifecycleCodec.d.ts +12 -0
- package/dist/xiot/core/spec/codec/lifecycle/type/DeviceTypeWithLifecycleCodec.js +36 -0
- package/dist/xiot/core/spec/codec/notice/DeviceNoticeCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/notice/DeviceNoticeCodec.js +122 -0
- package/dist/xiot/core/spec/codec/notice/OwnerNoticeCodec.d.ts +8 -0
- package/dist/xiot/core/spec/codec/notice/OwnerNoticeCodec.js +220 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceAccessKeyChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceAccessKeyChangedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenAddedCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceChildrenRemovedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceEventOccurredCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceEventOccurredCodec.js +18 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertiesChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertiesChangedCodec.js +18 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertyChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DevicePropertyChangedCodec.js +18 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootActiveCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootActiveCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootInactiveCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceRootInactiveCodec.js +16 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceSummaryChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/device/DeviceSummaryChangedCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceAddedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceRemovedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSomewhereChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSomewhereChangedCodec.js +26 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSummaryChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerDeviceSummaryChangedCodec.js +26 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerEventOccurredCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerEventOccurredCodec.js +20 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerPropertiesChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerPropertiesChangedCodec.js +21 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleAddedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleChangedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleExecutedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleExecutedCodec.js +47 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleRemovedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleTriggeredCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnerRuleTriggeredCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipDisclaimedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipDisclaimedCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipTakenCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/OwnershipTakenCodec.js +19 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeAddedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeChangedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/home/OwnerHomeRemovedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceAddedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceAddedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceChangedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceChangedCodec.js +24 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceRemovedCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/notice/owner/space/OwnerSpaceRemovedCodec.js +23 -0
- package/dist/xiot/core/spec/codec/oauth2/Oauth2ConfigurationCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/oauth2/Oauth2ConfigurationCodec.js +49 -0
- package/dist/xiot/core/spec/codec/operation/AbstractOperationCodec.d.ts +10 -0
- package/dist/xiot/core/spec/codec/operation/AbstractOperationCodec.js +27 -0
- package/dist/xiot/core/spec/codec/operation/ActionOperationCodec.d.ts +14 -0
- package/dist/xiot/core/spec/codec/operation/ActionOperationCodec.js +84 -0
- package/dist/xiot/core/spec/codec/operation/ArgumentOperationCodec.d.ts +10 -0
- package/dist/xiot/core/spec/codec/operation/ArgumentOperationCodec.js +65 -0
- package/dist/xiot/core/spec/codec/operation/CombinationValueCodec.d.ts +6 -0
- package/dist/xiot/core/spec/codec/operation/CombinationValueCodec.js +70 -0
- package/dist/xiot/core/spec/codec/operation/EventOperationCodec.d.ts +14 -0
- package/dist/xiot/core/spec/codec/operation/EventOperationCodec.js +63 -0
- package/dist/xiot/core/spec/codec/operation/PropertyOperationCodec.d.ts +31 -0
- package/dist/xiot/core/spec/codec/operation/PropertyOperationCodec.js +151 -0
- package/dist/xiot/core/spec/codec/operation/RuleOperationCodec.d.ts +14 -0
- package/dist/xiot/core/spec/codec/operation/RuleOperationCodec.js +43 -0
- package/dist/xiot/core/spec/codec/ownership/DeviceOwnerCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/ownership/DeviceOwnerCodec.js +37 -0
- package/dist/xiot/core/spec/codec/ownership/OwnershipCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/ownership/OwnershipCodec.js +62 -0
- package/dist/xiot/core/spec/codec/product/ProductCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/ProductCodec.js +76 -0
- package/dist/xiot/core/spec/codec/product/ProductVersionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/ProductVersionCodec.js +69 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceCodec.js +45 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceVersionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/resource/ProductResourceVersionCodec.js +69 -0
- package/dist/xiot/core/spec/codec/product/resource/ResourceVersionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/product/resource/ResourceVersionCodec.js +65 -0
- package/dist/xiot/core/spec/codec/rbac/PermissionCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/PermissionCodec.js +35 -0
- package/dist/xiot/core/spec/codec/rbac/RoleCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/RoleCodec.js +34 -0
- package/dist/xiot/core/spec/codec/rbac/account/AccountCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/account/AccountCodec.js +38 -0
- package/dist/xiot/core/spec/codec/rbac/organization/MemberCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/organization/MemberCodec.js +34 -0
- package/dist/xiot/core/spec/codec/rbac/organization/OrganizationCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rbac/organization/OrganizationCodec.js +33 -0
- package/dist/xiot/core/spec/codec/rule/RuleCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/rule/RuleCodec.js +74 -0
- package/dist/xiot/core/spec/codec/shadow/DeviceShadowCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/shadow/DeviceShadowCodec.js +38 -0
- package/dist/xiot/core/spec/codec/shadow/ShadowCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/shadow/ShadowCodec.js +51 -0
- package/dist/xiot/core/spec/codec/somewhere/SomewhereCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/somewhere/SomewhereCodec.js +50 -0
- package/dist/xiot/core/spec/codec/space/SpaceCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/space/SpaceCodec.js +45 -0
- package/dist/xiot/core/spec/codec/summary/SummaryCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/summary/SummaryCodec.js +82 -0
- package/dist/xiot/core/spec/codec/template/ActionTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/ActionTemplateCodec.js +55 -0
- package/dist/xiot/core/spec/codec/template/DeviceTemplateCodec.d.ts +5 -0
- package/dist/xiot/core/spec/codec/template/DeviceTemplateCodec.js +24 -0
- package/dist/xiot/core/spec/codec/template/EventTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/EventTemplateCodec.js +51 -0
- package/dist/xiot/core/spec/codec/template/PropertyTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/PropertyTemplateCodec.js +78 -0
- package/dist/xiot/core/spec/codec/template/ServiceTemplateCodec.d.ts +7 -0
- package/dist/xiot/core/spec/codec/template/ServiceTemplateCodec.js +67 -0
- package/dist/xiot/core/spec/typedef/app/Application.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/app/Application.js +13 -0
- package/dist/xiot/core/spec/typedef/app/authorization/Authorization.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/authorization/Authorization.js +9 -0
- package/dist/xiot/core/spec/typedef/app/authorization/AuthorizationType.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/app/authorization/AuthorizationType.js +25 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationEventbusImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationEventbusImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationHttpImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationHttpImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationJwtImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/app/authorization/impl/AuthorizationJwtImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiver.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiver.js +9 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiverType.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/app/event/EventReceiverType.js +25 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverEventbusImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverEventbusImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverHttpImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverHttpImpl.js +12 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverKafkaImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/app/event/impl/EventReceiverKafkaImpl.js +13 -0
- package/dist/xiot/core/spec/typedef/constant/Spec.d.ts +48 -0
- package/dist/xiot/core/spec/typedef/constant/Spec.js +52 -0
- package/dist/xiot/core/spec/typedef/definition/ActionDefinition.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/definition/ActionDefinition.js +21 -0
- package/dist/xiot/core/spec/typedef/definition/ArgumentDefinition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/ArgumentDefinition.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/CategoryDefinition.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/CategoryDefinition.js +12 -0
- package/dist/xiot/core/spec/typedef/definition/DeviceDefinition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/DeviceDefinition.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/EventDefinition.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/definition/EventDefinition.js +17 -0
- package/dist/xiot/core/spec/typedef/definition/FormatDefinition.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/definition/FormatDefinition.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/NamespaceDefinition.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/NamespaceDefinition.js +12 -0
- package/dist/xiot/core/spec/typedef/definition/PropertyDefinition.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/definition/PropertyDefinition.js +71 -0
- package/dist/xiot/core/spec/typedef/definition/ServiceDefinition.d.ts +15 -0
- package/dist/xiot/core/spec/typedef/definition/ServiceDefinition.js +37 -0
- package/dist/xiot/core/spec/typedef/definition/UnitDefinition.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/definition/UnitDefinition.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/Access.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/Access.js +87 -0
- package/dist/xiot/core/spec/typedef/definition/property/ConstraintValue.d.ts +4 -0
- package/dist/xiot/core/spec/typedef/definition/property/ConstraintValue.js +2 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueDefinition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueDefinition.js +12 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueList.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueList.js +21 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueRange.d.ts +18 -0
- package/dist/xiot/core/spec/typedef/definition/property/ValueRange.js +103 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataFormat.d.ts +23 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataFormat.js +96 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValue.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValue.js +2 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValueFactory.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/DataValueFactory.js +115 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vbool.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vbool.js +53 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vcombination.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vcombination.js +33 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vfloat.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vfloat.js +67 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vhex.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vhex.js +80 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint16.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint16.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint32.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint32.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint64.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint64.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint8.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vint8.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vstring.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vstring.js +36 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vtlv8.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vtlv8.js +39 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint16.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint16.js +71 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint32.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint32.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint8.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/definition/property/data/value/Vuint8.js +65 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ActionType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ActionType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/DeviceType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/DeviceType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/EventType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/EventType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Extendable.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Extendable.js +18 -0
- package/dist/xiot/core/spec/typedef/definition/urn/FormatType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/FormatType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/GroupType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/GroupType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/PropertyType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/PropertyType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ServiceType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/ServiceType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UnitType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UnitType.js +14 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Urn.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/definition/urn/Urn.js +146 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnStyle.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnStyle.js +11 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnType.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/definition/urn/UrnType.js +30 -0
- package/dist/xiot/core/spec/typedef/device/Device.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/device/Device.js +9 -0
- package/dist/xiot/core/spec/typedef/error/IotError.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/error/IotError.js +13 -0
- package/dist/xiot/core/spec/typedef/image/ActionImage.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/image/ActionImage.js +76 -0
- package/dist/xiot/core/spec/typedef/image/ArgumentImage.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/image/ArgumentImage.js +30 -0
- package/dist/xiot/core/spec/typedef/image/DeviceImage.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/image/DeviceImage.js +283 -0
- package/dist/xiot/core/spec/typedef/image/EventImage.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/image/EventImage.js +48 -0
- package/dist/xiot/core/spec/typedef/image/PropertyImage.d.ts +22 -0
- package/dist/xiot/core/spec/typedef/image/PropertyImage.js +73 -0
- package/dist/xiot/core/spec/typedef/image/ServiceImage.d.ts +21 -0
- package/dist/xiot/core/spec/typedef/image/ServiceImage.js +172 -0
- package/dist/xiot/core/spec/typedef/instance/Action.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/instance/Action.js +33 -0
- package/dist/xiot/core/spec/typedef/instance/Argument.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/instance/Argument.js +18 -0
- package/dist/xiot/core/spec/typedef/instance/DeviceInstance.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/instance/DeviceInstance.js +17 -0
- package/dist/xiot/core/spec/typedef/instance/Event.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/instance/Event.js +23 -0
- package/dist/xiot/core/spec/typedef/instance/Property.d.ts +56 -0
- package/dist/xiot/core/spec/typedef/instance/Property.js +244 -0
- package/dist/xiot/core/spec/typedef/instance/PropertyValue.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/instance/PropertyValue.js +81 -0
- package/dist/xiot/core/spec/typedef/instance/Service.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/instance/Service.js +48 -0
- package/dist/xiot/core/spec/typedef/jwt/Jwt.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/jwt/Jwt.js +16 -0
- package/dist/xiot/core/spec/typedef/jwt/JwtType.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/jwt/JwtType.js +25 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtEsImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtEsImpl.js +15 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtRsaImpl.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtRsaImpl.js +15 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtSecretsImpl.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/jwt/impl/JwtSecretsImpl.js +13 -0
- package/dist/xiot/core/spec/typedef/key/AccessKey.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/key/AccessKey.js +10 -0
- package/dist/xiot/core/spec/typedef/key/DeviceCert.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/key/DeviceCert.js +12 -0
- package/dist/xiot/core/spec/typedef/key/DeviceKey.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/key/DeviceKey.js +13 -0
- package/dist/xiot/core/spec/typedef/lifecycle/Lifecycle.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/lifecycle/Lifecycle.js +25 -0
- package/dist/xiot/core/spec/typedef/lifecycle/ObjectWithLifecycle.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/lifecycle/ObjectWithLifecycle.js +10 -0
- package/dist/xiot/core/spec/typedef/notice/Notice.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/Notice.js +9 -0
- package/dist/xiot/core/spec/typedef/notice/NoticeCodec.d.ts +27 -0
- package/dist/xiot/core/spec/typedef/notice/NoticeCodec.js +6 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNotice.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNotice.js +13 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNoticeType.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/notice/device/DeviceNoticeType.js +31 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceAccessKeyChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceAccessKeyChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenAdded.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenAdded.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenRemoved.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceChildrenRemoved.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceEventOccurred.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceEventOccurred.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertiesChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertiesChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertyChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DevicePropertyChanged.js +17 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootActive.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootActive.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootInactive.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceRootInactive.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceSummaryChanged.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/device/impl/DeviceSummaryChanged.js +17 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNotice.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNotice.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNoticeType.d.ts +42 -0
- package/dist/xiot/core/spec/typedef/notice/owner/OwnerNoticeType.js +59 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceAdded.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceAdded.js +17 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSomewhereChanged.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSomewhereChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSummaryChanged.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerDeviceSummaryChanged.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerEventOccurred.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerEventOccurred.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerPropertiesChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerPropertiesChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleAdded.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleAdded.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleExecuted.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleExecuted.js +16 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleTriggered.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnerRuleTriggered.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipDisclaimed.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipDisclaimed.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipTaken.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/OwnershipTaken.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeAdded.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeAdded.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/home/OwnerHomeRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceAdded.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceAdded.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceChanged.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceChanged.js +15 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceRemoved.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/notice/owner/impl/space/OwnerSpaceRemoved.js +15 -0
- package/dist/xiot/core/spec/typedef/oauth2/Oauth2Configuration.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/oauth2/Oauth2Configuration.js +19 -0
- package/dist/xiot/core/spec/typedef/operation/AbstractOperation.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/operation/AbstractOperation.js +21 -0
- package/dist/xiot/core/spec/typedef/operation/ActionOperation.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/operation/ActionOperation.js +50 -0
- package/dist/xiot/core/spec/typedef/operation/ArgumentOperation.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/operation/ArgumentOperation.js +52 -0
- package/dist/xiot/core/spec/typedef/operation/EventOperation.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/operation/EventOperation.js +58 -0
- package/dist/xiot/core/spec/typedef/operation/PropertyOperation.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/operation/PropertyOperation.js +53 -0
- package/dist/xiot/core/spec/typedef/operation/RemindOperation.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/operation/RemindOperation.js +25 -0
- package/dist/xiot/core/spec/typedef/operation/RuleOperation.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/operation/RuleOperation.js +25 -0
- package/dist/xiot/core/spec/typedef/operation/SleepOperation.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/operation/SleepOperation.js +25 -0
- package/dist/xiot/core/spec/typedef/operation/value/AnyValue.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/operation/value/AnyValue.js +9 -0
- package/dist/xiot/core/spec/typedef/operation/value/AutoscalingValue.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/operation/value/AutoscalingValue.js +9 -0
- package/dist/xiot/core/spec/typedef/operation/value/ReverseValue.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/operation/value/ReverseValue.js +9 -0
- package/dist/xiot/core/spec/typedef/ownership/DeviceOwner.d.ts +4 -0
- package/dist/xiot/core/spec/typedef/ownership/DeviceOwner.js +10 -0
- package/dist/xiot/core/spec/typedef/ownership/Ownership.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/ownership/Ownership.js +26 -0
- package/dist/xiot/core/spec/typedef/product/Product.d.ts +22 -0
- package/dist/xiot/core/spec/typedef/product/Product.js +25 -0
- package/dist/xiot/core/spec/typedef/product/ProductVersion.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/product/ProductVersion.js +24 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResource.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResource.js +13 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResourceVersion.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/product/resource/ProductResourceVersion.js +12 -0
- package/dist/xiot/core/spec/typedef/product/resource/ResourceVersion.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/product/resource/ResourceVersion.js +30 -0
- package/dist/xiot/core/spec/typedef/rbac/Permission.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/rbac/Permission.js +13 -0
- package/dist/xiot/core/spec/typedef/rbac/Role.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/rbac/Role.js +12 -0
- package/dist/xiot/core/spec/typedef/rbac/account/Account.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/rbac/account/Account.js +16 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Member.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Member.js +22 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Organization.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/rbac/organization/Organization.js +12 -0
- package/dist/xiot/core/spec/typedef/registry/DeviceRegistry.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/registry/DeviceRegistry.js +7 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPoint.d.ts +4 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPoint.js +10 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPointType.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/AccessPointType.js +24 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointEventbus.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointEventbus.js +12 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointHttp.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/registry/accesspoint/impl/AccessPointHttp.js +13 -0
- package/dist/xiot/core/spec/typedef/rule/Rule.d.ts +44 -0
- package/dist/xiot/core/spec/typedef/rule/Rule.js +174 -0
- package/dist/xiot/core/spec/typedef/rule/RuleContent.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/rule/RuleContent.js +56 -0
- package/dist/xiot/core/spec/typedef/rule/RuleType.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/rule/RuleType.js +11 -0
- package/dist/xiot/core/spec/typedef/rule/condition/AbstractCondition.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/rule/condition/AbstractCondition.js +12 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ComplexCondition.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ComplexCondition.js +57 -0
- package/dist/xiot/core/spec/typedef/rule/condition/EventCondition.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/rule/condition/EventCondition.js +59 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalCondition.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalCondition.js +43 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalType.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/rule/condition/ExternalType.js +9 -0
- package/dist/xiot/core/spec/typedef/rule/condition/NowCondition.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/rule/condition/NowCondition.js +15 -0
- package/dist/xiot/core/spec/typedef/rule/condition/PropertyCondition.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/rule/condition/PropertyCondition.js +48 -0
- package/dist/xiot/core/spec/typedef/rule/condition/TimeCondition.d.ts +14 -0
- package/dist/xiot/core/spec/typedef/rule/condition/TimeCondition.js +85 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/ComparisonOperator.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/ComparisonOperator.js +32 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/LogicalOperator.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/LogicalOperator.js +22 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Comparator.d.ts +2 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Comparator.js +20 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Compare.d.ts +21 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/compare/Compare.js +67 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logic.d.ts +2 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logic.js +16 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logical.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/rule/condition/operator/logical/Logical.js +15 -0
- package/dist/xiot/core/spec/typedef/rule/cron/CronExp.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/rule/cron/CronExp.js +102 -0
- package/dist/xiot/core/spec/typedef/rule/listener/RuleExecutionListener.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/rule/listener/RuleExecutionListener.js +2 -0
- package/dist/xiot/core/spec/typedef/rule/parser/RuleContentParser.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/rule/parser/RuleContentParser.js +70 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/ConditionParser.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/ConditionParser.js +72 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser0/Parser0.d.ts +28 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser0/Parser0.js +148 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser1/Parser1.d.ts +16 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser1/Parser1.js +90 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Parser2.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Parser2.js +289 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/ParserState2.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/ParserState2.js +17 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Token2.d.ts +22 -0
- package/dist/xiot/core/spec/typedef/rule/parser/condition/parser2/Token2.js +68 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationParser.d.ts +31 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationParser.js +331 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationState.d.ts +19 -0
- package/dist/xiot/core/spec/typedef/rule/parser/operation/OperationState.js +23 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Token.d.ts +91 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Token.js +269 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Tokenizer.d.ts +29 -0
- package/dist/xiot/core/spec/typedef/rule/parser/token/Tokenizer.js +483 -0
- package/dist/xiot/core/spec/typedef/shadow/DeviceShadow.d.ts +5 -0
- package/dist/xiot/core/spec/typedef/shadow/DeviceShadow.js +10 -0
- package/dist/xiot/core/spec/typedef/shadow/Shadow.d.ts +7 -0
- package/dist/xiot/core/spec/typedef/shadow/Shadow.js +13 -0
- package/dist/xiot/core/spec/typedef/somewhere/Somewhere.d.ts +11 -0
- package/dist/xiot/core/spec/typedef/somewhere/Somewhere.js +45 -0
- package/dist/xiot/core/spec/typedef/somewhere/Where.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/somewhere/Where.js +26 -0
- package/dist/xiot/core/spec/typedef/space/Space.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/space/Space.js +20 -0
- package/dist/xiot/core/spec/typedef/status/AbstractStatus.d.ts +8 -0
- package/dist/xiot/core/spec/typedef/status/AbstractStatus.js +23 -0
- package/dist/xiot/core/spec/typedef/status/Status.d.ts +50 -0
- package/dist/xiot/core/spec/typedef/status/Status.js +54 -0
- package/dist/xiot/core/spec/typedef/summary/Summary.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/summary/Summary.js +120 -0
- package/dist/xiot/core/spec/typedef/template/ActionTemplate.d.ts +17 -0
- package/dist/xiot/core/spec/typedef/template/ActionTemplate.js +33 -0
- package/dist/xiot/core/spec/typedef/template/DeviceTemplate.d.ts +12 -0
- package/dist/xiot/core/spec/typedef/template/DeviceTemplate.js +23 -0
- package/dist/xiot/core/spec/typedef/template/EventTemplate.d.ts +15 -0
- package/dist/xiot/core/spec/typedef/template/EventTemplate.js +26 -0
- package/dist/xiot/core/spec/typedef/template/PropertyTemplate.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/template/PropertyTemplate.js +16 -0
- package/dist/xiot/core/spec/typedef/template/ServiceTemplate.d.ts +24 -0
- package/dist/xiot/core/spec/typedef/template/ServiceTemplate.js +46 -0
- package/dist/xiot/core/spec/typedef/utils/Stack.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/utils/Stack.js +35 -0
- package/dist/xiot/core/spec/typedef/utils/StringUtils.d.ts +3 -0
- package/dist/xiot/core/spec/typedef/utils/StringUtils.js +14 -0
- package/dist/xiot/core/spec/typedef/utils/TemplateHelper.d.ts +30 -0
- package/dist/xiot/core/spec/typedef/utils/TemplateHelper.js +285 -0
- package/dist/xiot/core/spec/typedef/version/Version.d.ts +9 -0
- package/dist/xiot/core/spec/typedef/version/Version.js +40 -0
- package/dist/xiot/core/spec/typedef/xid/ActionID.d.ts +13 -0
- package/dist/xiot/core/spec/typedef/xid/ActionID.js +27 -0
- package/dist/xiot/core/spec/typedef/xid/EventID.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/xid/EventID.js +20 -0
- package/dist/xiot/core/spec/typedef/xid/PropertyID.d.ts +6 -0
- package/dist/xiot/core/spec/typedef/xid/PropertyID.js +20 -0
- package/dist/xiot/core/spec/typedef/xid/XID3.d.ts +10 -0
- package/dist/xiot/core/spec/typedef/xid/XID3.js +41 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ActionControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ActionControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/DeviceControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/DeviceControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/EventControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/EventControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/PropertyControlledCodec.d.ts +3 -0
- package/dist/xiot/core/support/codegen/codec/controlled/PropertyControlledCodec.js +8 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ServiceControlledCodec.d.ts +2 -0
- package/dist/xiot/core/support/codegen/codec/controlled/ServiceControlledCodec.js +6 -0
- package/dist/xiot/core/support/codegen/codec/controller/ActionControllerCodec.d.ts +6 -0
- package/dist/xiot/core/support/codegen/codec/controller/ActionControllerCodec.js +30 -0
- package/dist/xiot/core/support/codegen/codec/controller/DeviceControllerCodec.d.ts +5 -0
- package/dist/xiot/core/support/codegen/codec/controller/DeviceControllerCodec.js +20 -0
- package/dist/xiot/core/support/codegen/codec/controller/EventControllerCodec.d.ts +6 -0
- package/dist/xiot/core/support/codegen/codec/controller/EventControllerCodec.js +29 -0
- package/dist/xiot/core/support/codegen/codec/controller/PropertyControllerCodec.d.ts +7 -0
- package/dist/xiot/core/support/codegen/codec/controller/PropertyControllerCodec.js +25 -0
- package/dist/xiot/core/support/codegen/codec/controller/ServiceControllerCodec.d.ts +5 -0
- package/dist/xiot/core/support/codegen/codec/controller/ServiceControllerCodec.js +31 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ActionControlled.d.ts +9 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ActionControlled.js +25 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/DeviceControlled.d.ts +3 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/DeviceControlled.js +7 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/EventControlled.d.ts +12 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/EventControlled.js +20 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/PropertyControlled.d.ts +18 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/PropertyControlled.js +122 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ServiceControlled.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/controlled/ServiceControlled.js +10 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ActionController.d.ts +10 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ActionController.js +15 -0
- package/dist/xiot/core/support/codegen/typedef/controller/DeviceController.d.ts +23 -0
- package/dist/xiot/core/support/codegen/typedef/controller/DeviceController.js +86 -0
- package/dist/xiot/core/support/codegen/typedef/controller/EventController.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/controller/EventController.js +12 -0
- package/dist/xiot/core/support/codegen/typedef/controller/PropertyController.d.ts +27 -0
- package/dist/xiot/core/support/codegen/typedef/controller/PropertyController.js +144 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ServiceController.d.ts +15 -0
- package/dist/xiot/core/support/codegen/typedef/controller/ServiceController.js +70 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SomewhereController.d.ts +7 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SomewhereController.js +32 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SummaryController.d.ts +7 -0
- package/dist/xiot/core/support/codegen/typedef/controller/SummaryController.js +55 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/ActionInvokerWrapper.d.ts +9 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/ActionInvokerWrapper.js +27 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/PropertySetterWrapper.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/controller/operator/PropertySetterWrapper.js +27 -0
- package/dist/xiot/core/support/codegen/typedef/result/Result.d.ts +9 -0
- package/dist/xiot/core/support/codegen/typedef/result/Result.js +15 -0
- package/dist/xiot/core/support/codegen/typedef/rule/RuleController.d.ts +7 -0
- package/dist/xiot/core/support/codegen/typedef/rule/RuleController.js +14 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/RuleStatus.d.ts +2 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/RuleStatus.js +2 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleExecuted.d.ts +8 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleExecuted.js +11 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleReady.d.ts +3 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleReady.js +6 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleTriggered.d.ts +6 -0
- package/dist/xiot/core/support/codegen/typedef/rule/status/impl/RuleTriggered.js +10 -0
- package/package.json +62 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action } from '../instance/Action';
|
|
2
|
+
import { ArgumentImage } from './ArgumentImage';
|
|
3
|
+
import { Property } from '../instance/Property';
|
|
4
|
+
import { ActionType } from '../definition/urn/ActionType';
|
|
5
|
+
import { ActionOperation } from '../operation/ActionOperation';
|
|
6
|
+
export declare class ActionImage extends Action {
|
|
7
|
+
static of(action: Action): ActionImage;
|
|
8
|
+
static addValues(argument: ArgumentImage, property: Property, values: any[]): void;
|
|
9
|
+
constructor(iid: number, type: ActionType, description: Map<string, string>, argumentsIn: ArgumentImage[], argumentsOut: ArgumentImage[]);
|
|
10
|
+
getArgumentsIn(): ArgumentImage[];
|
|
11
|
+
getArgumentsOut(): ArgumentImage[];
|
|
12
|
+
tryInvoke(o: ActionOperation, properties: Map<number, Property>): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActionImage = void 0;
|
|
4
|
+
const Action_1 = require("../instance/Action");
|
|
5
|
+
const ArgumentImage_1 = require("./ArgumentImage");
|
|
6
|
+
const Property_1 = require("../instance/Property");
|
|
7
|
+
const Status_1 = require("../status/Status");
|
|
8
|
+
const Argument_1 = require("../instance/Argument");
|
|
9
|
+
class ActionImage extends Action_1.Action {
|
|
10
|
+
static of(action) {
|
|
11
|
+
return new ActionImage(action.iid, action.type, action.description, action.getArgumentsIn().map(x => ArgumentImage_1.ArgumentImage.fromArgument(x)), action.getArgumentsOut().map(x => ArgumentImage_1.ArgumentImage.fromArgument(x)));
|
|
12
|
+
}
|
|
13
|
+
static addValues(argument, property, values) {
|
|
14
|
+
for (let i = 0; i < values.length; ++i) {
|
|
15
|
+
const newProperty = Property_1.Property.copy(property);
|
|
16
|
+
newProperty.iid = argument.piid;
|
|
17
|
+
newProperty.type._index = i;
|
|
18
|
+
newProperty.type._optional = false;
|
|
19
|
+
newProperty.setValue(values[i]);
|
|
20
|
+
argument.properties.push(newProperty);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
constructor(iid, type, description, argumentsIn, argumentsOut) {
|
|
24
|
+
super(iid, type, description, argumentsIn, argumentsOut);
|
|
25
|
+
}
|
|
26
|
+
getArgumentsIn() {
|
|
27
|
+
return super
|
|
28
|
+
.getArgumentsIn()
|
|
29
|
+
.filter(x => x instanceof ArgumentImage_1.ArgumentImage)
|
|
30
|
+
.map(x => x);
|
|
31
|
+
}
|
|
32
|
+
getArgumentsOut() {
|
|
33
|
+
return super
|
|
34
|
+
.getArgumentsOut()
|
|
35
|
+
.filter(x => x instanceof ArgumentImage_1.ArgumentImage)
|
|
36
|
+
.map(x => x);
|
|
37
|
+
}
|
|
38
|
+
tryInvoke(o, properties) {
|
|
39
|
+
console.log('tryInvoke');
|
|
40
|
+
o.status = Status_1.Status.COMPLETED;
|
|
41
|
+
for (const argument of this.getArgumentsIn()) {
|
|
42
|
+
const iid = argument.piid;
|
|
43
|
+
const v = o.in.get(iid);
|
|
44
|
+
if (v == null) {
|
|
45
|
+
if (argument.minRepeat > 0) {
|
|
46
|
+
o.status = Status_1.Status.ACTION_IN_ERROR;
|
|
47
|
+
o.description = `action argument in error, piid(${iid}) min repeat > 0`;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
const property = properties.get(iid);
|
|
53
|
+
if (property == null) {
|
|
54
|
+
o.status = Status_1.Status.ACTION_IN_VALUE_INVALID;
|
|
55
|
+
o.description = `action argument in error, piid(${iid}) value invalid`;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
if (!property.trySetValues(v.values)) {
|
|
59
|
+
o.status = Status_1.Status.ACTION_IN_VALUE_INVALID;
|
|
60
|
+
o.description = `action argument in error, piid(${iid}) set value failed`;
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
ActionImage.addValues(argument, property, v.values);
|
|
64
|
+
}
|
|
65
|
+
if (o.status !== Status_1.Status.COMPLETED) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const out = this.getArgumentsOut().map(x => {
|
|
69
|
+
const a = new Argument_1.Argument(x.piid);
|
|
70
|
+
a.values = x.properties.map(p => { var _a; return (_a = p.value.currentValue) === null || _a === void 0 ? void 0 : _a.rawValue(); });
|
|
71
|
+
return a;
|
|
72
|
+
});
|
|
73
|
+
o.setArgumentsOut(out);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.ActionImage = ActionImage;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Argument } from '../instance/Argument';
|
|
2
|
+
import { Property } from '../instance/Property';
|
|
3
|
+
export declare class ArgumentImage extends Argument {
|
|
4
|
+
properties: Property[];
|
|
5
|
+
static of(piid: number, minRepeat: number, maxRepeat: number): Argument;
|
|
6
|
+
static fromArgument(argument: Argument): ArgumentImage;
|
|
7
|
+
constructor(piid: number);
|
|
8
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArgumentImage = void 0;
|
|
4
|
+
const Argument_1 = require("../instance/Argument");
|
|
5
|
+
class ArgumentImage extends Argument_1.Argument {
|
|
6
|
+
// static of(argument: Argument): ArgumentImage {
|
|
7
|
+
// const a = new ArgumentImage(argument.piid);
|
|
8
|
+
// a.minRepeat = argument.minRepeat;
|
|
9
|
+
// a.maxRepeat = argument.maxRepeat;
|
|
10
|
+
// return a;
|
|
11
|
+
// }
|
|
12
|
+
// 适应 Argument 类的 of 方法签名
|
|
13
|
+
static of(piid, minRepeat, maxRepeat) {
|
|
14
|
+
const a = new ArgumentImage(piid);
|
|
15
|
+
a.minRepeat = minRepeat;
|
|
16
|
+
a.maxRepeat = maxRepeat;
|
|
17
|
+
return a;
|
|
18
|
+
}
|
|
19
|
+
static fromArgument(argument) {
|
|
20
|
+
const a = new ArgumentImage(argument.piid);
|
|
21
|
+
a.minRepeat = argument.minRepeat;
|
|
22
|
+
a.maxRepeat = argument.maxRepeat;
|
|
23
|
+
return a;
|
|
24
|
+
}
|
|
25
|
+
constructor(piid) {
|
|
26
|
+
super(piid);
|
|
27
|
+
this.properties = [];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.ArgumentImage = ArgumentImage;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DeviceInstance } from '../instance/DeviceInstance';
|
|
2
|
+
import { Summary } from '../summary/Summary';
|
|
3
|
+
import { DeviceType } from '../definition/urn/DeviceType';
|
|
4
|
+
import { ServiceImage } from './ServiceImage';
|
|
5
|
+
import { PropertyOperation } from '../operation/PropertyOperation';
|
|
6
|
+
import { ActionOperation } from '../operation/ActionOperation';
|
|
7
|
+
import { EventOperation } from '../operation/EventOperation';
|
|
8
|
+
export declare class DeviceImage extends DeviceInstance {
|
|
9
|
+
did: string;
|
|
10
|
+
summary: Summary | null;
|
|
11
|
+
children: Map<string, DeviceImage>;
|
|
12
|
+
parentFound: boolean;
|
|
13
|
+
static createTrees(nodes: DeviceImage[]): DeviceImage[];
|
|
14
|
+
static of(did: string, device: DeviceInstance): DeviceImage;
|
|
15
|
+
constructor(did: string, type: DeviceType, description: Map<string, string>, services: ServiceImage[]);
|
|
16
|
+
online(value: boolean): void;
|
|
17
|
+
tryRead(list: Array<PropertyOperation>): void;
|
|
18
|
+
tryWrite(list: Array<PropertyOperation>, save: boolean): void;
|
|
19
|
+
tryInvoke(list: Array<ActionOperation>): void;
|
|
20
|
+
tryEventOccurred(o: EventOperation): void;
|
|
21
|
+
private tryReadProperty;
|
|
22
|
+
private tryWriteProperty;
|
|
23
|
+
private tryInvokeAction;
|
|
24
|
+
add(nodes: DeviceImage[]): DeviceImage[];
|
|
25
|
+
private getAll;
|
|
26
|
+
addNode(node: DeviceImage): boolean;
|
|
27
|
+
removeNode(nodeId: string): DeviceImage | null;
|
|
28
|
+
getNode(did: string): DeviceImage | null;
|
|
29
|
+
private getParent;
|
|
30
|
+
getServices(): ServiceImage[];
|
|
31
|
+
}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceImage = void 0;
|
|
4
|
+
const DeviceInstance_1 = require("../instance/DeviceInstance");
|
|
5
|
+
const ServiceImage_1 = require("./ServiceImage");
|
|
6
|
+
const Status_1 = require("../status/Status");
|
|
7
|
+
class DeviceImage extends DeviceInstance_1.DeviceInstance {
|
|
8
|
+
static createTrees(nodes) {
|
|
9
|
+
const size = nodes.length;
|
|
10
|
+
for (let i = 0; i < size; ++i) {
|
|
11
|
+
for (let j = i + 1; j < size; ++j) {
|
|
12
|
+
const a = nodes[i];
|
|
13
|
+
const b = nodes[j];
|
|
14
|
+
if (a.did === b.did) {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
// A is B's parent
|
|
18
|
+
if (b.summary == null) {
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
if (a.did === b.summary.parentId) {
|
|
22
|
+
b.parentFound = true;
|
|
23
|
+
a.children.set(b.did, b);
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
// B is A's parent
|
|
27
|
+
if (a.summary == null) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (b.did === a.summary.parentId) {
|
|
31
|
+
a.parentFound = true;
|
|
32
|
+
b.children.set(a.did, a);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return nodes.filter(x => !x.parentFound);
|
|
37
|
+
}
|
|
38
|
+
static of(did, device) {
|
|
39
|
+
return new DeviceImage(did, device.type, device.description, device.getServices().map(x => ServiceImage_1.ServiceImage.of(x)));
|
|
40
|
+
}
|
|
41
|
+
constructor(did, type, description, services) {
|
|
42
|
+
super(type, description, services);
|
|
43
|
+
this.did = '';
|
|
44
|
+
this.summary = null;
|
|
45
|
+
this.children = new Map();
|
|
46
|
+
this.parentFound = false;
|
|
47
|
+
this.did = did;
|
|
48
|
+
}
|
|
49
|
+
online(value) {
|
|
50
|
+
if (this.summary != null) {
|
|
51
|
+
this.summary.online = value;
|
|
52
|
+
}
|
|
53
|
+
for (const child of this.children.values()) {
|
|
54
|
+
child.online(value);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
tryRead(list) {
|
|
58
|
+
for (const o of list) {
|
|
59
|
+
this.tryReadProperty(o);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
tryWrite(list, save) {
|
|
63
|
+
for (const o of list) {
|
|
64
|
+
this.tryWriteProperty(o, save);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
tryInvoke(list) {
|
|
68
|
+
for (const o of list) {
|
|
69
|
+
this.tryInvokeAction(o);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
tryEventOccurred(o) {
|
|
73
|
+
if (o.eid == null) {
|
|
74
|
+
o.status = Status_1.Status.EID_INVALID;
|
|
75
|
+
o.description = 'EventId INVALID';
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const device = this.getNode(o.eid.did);
|
|
79
|
+
if (device) {
|
|
80
|
+
const service = device.services.get(o.eid.siid);
|
|
81
|
+
if (service) {
|
|
82
|
+
if (service instanceof ServiceImage_1.ServiceImage) {
|
|
83
|
+
service.tryEventOccurred(o);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
o.status = Status_1.Status.INTERNAL_ERROR;
|
|
87
|
+
o.description = 'service is not ServiceImage';
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
o.status = Status_1.Status.SERVICE_NOT_FOUND;
|
|
92
|
+
o.description = 'service not found';
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
o.status = Status_1.Status.DEVICE_ID_NOT_EXIST;
|
|
97
|
+
o.description = `device not found, root: ${this.did}`;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
tryReadProperty(o) {
|
|
101
|
+
var _a;
|
|
102
|
+
if (o.pid == null) {
|
|
103
|
+
o.status = Status_1.Status.PID_INVALID;
|
|
104
|
+
o.description = 'PropertyID INVALID';
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const device = this.getNode((_a = o.pid) === null || _a === void 0 ? void 0 : _a.did);
|
|
108
|
+
if (device != null) {
|
|
109
|
+
const service = device.services.get(o.pid.siid);
|
|
110
|
+
if (service != null) {
|
|
111
|
+
if (service instanceof ServiceImage_1.ServiceImage) {
|
|
112
|
+
service.tryRead(o);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
o.status = Status_1.Status.INTERNAL_ERROR;
|
|
116
|
+
o.description = 'service is not ServiceImage';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
o.status = Status_1.Status.SERVICE_NOT_FOUND;
|
|
121
|
+
o.description = 'service not found';
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
o.status = Status_1.Status.DEVICE_ID_NOT_EXIST;
|
|
126
|
+
o.description = `device not found, root: ${this.did}`;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
tryWriteProperty(o, save) {
|
|
130
|
+
if (o.pid == null) {
|
|
131
|
+
o.status = Status_1.Status.PID_INVALID;
|
|
132
|
+
o.description = 'PropertyID INVALID';
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const device = this.getNode(o.pid.did);
|
|
136
|
+
if (device != null) {
|
|
137
|
+
const service = device.services.get(o.pid.siid);
|
|
138
|
+
if (service != null) {
|
|
139
|
+
if (service instanceof ServiceImage_1.ServiceImage) {
|
|
140
|
+
service.tryWrite(o, save);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
o.status = Status_1.Status.INTERNAL_ERROR;
|
|
144
|
+
o.description = 'service is not ServiceImage';
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
o.status = Status_1.Status.SERVICE_NOT_FOUND;
|
|
149
|
+
o.description = 'service not found';
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
o.status = Status_1.Status.DEVICE_ID_NOT_EXIST;
|
|
154
|
+
o.description = `device not found, root: ${this.did}`;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
tryInvokeAction(o) {
|
|
158
|
+
if (o.aid == null) {
|
|
159
|
+
o.status = Status_1.Status.PID_INVALID;
|
|
160
|
+
o.description = 'ActionID INVALID';
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const device = this.getNode(o.aid.did);
|
|
164
|
+
if (device != null) {
|
|
165
|
+
const service = device.services.get(o.aid.siid);
|
|
166
|
+
if (service != null) {
|
|
167
|
+
if (service instanceof ServiceImage_1.ServiceImage) {
|
|
168
|
+
service.tryInvoke(o);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
o.status = Status_1.Status.INTERNAL_ERROR;
|
|
172
|
+
o.description = 'service is not ServiceImage';
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
o.status = Status_1.Status.SERVICE_NOT_FOUND;
|
|
177
|
+
o.description = 'service not found';
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
o.status = Status_1.Status.DEVICE_ID_NOT_EXIST;
|
|
182
|
+
o.description = `device not found, root: ${this.did}`;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
add(nodes) {
|
|
186
|
+
const trees = DeviceImage.createTrees(nodes);
|
|
187
|
+
for (const tree of trees) {
|
|
188
|
+
if (tree.summary != null) {
|
|
189
|
+
if (tree.summary.parentId === this.did) {
|
|
190
|
+
tree.parentFound = true;
|
|
191
|
+
this.children.set(tree.did, tree);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
const result = [];
|
|
196
|
+
for (const tree of trees) {
|
|
197
|
+
if (tree.parentFound) {
|
|
198
|
+
const all = tree.getAll();
|
|
199
|
+
for (const item of all) {
|
|
200
|
+
result.push(item);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return result;
|
|
205
|
+
}
|
|
206
|
+
getAll() {
|
|
207
|
+
const list = [];
|
|
208
|
+
list.push(this);
|
|
209
|
+
for (const value of this.children.values()) {
|
|
210
|
+
list.push(...value.getAll());
|
|
211
|
+
}
|
|
212
|
+
return list;
|
|
213
|
+
}
|
|
214
|
+
addNode(node) {
|
|
215
|
+
const parent = this.getParent(node);
|
|
216
|
+
if (parent != null) {
|
|
217
|
+
parent.children.set(node.did, node);
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
removeNode(nodeId) {
|
|
223
|
+
const node = this.children.get(nodeId);
|
|
224
|
+
if (node != null) {
|
|
225
|
+
this.children.delete(nodeId);
|
|
226
|
+
return node;
|
|
227
|
+
}
|
|
228
|
+
for (const child of this.children.values()) {
|
|
229
|
+
const removed = child.removeNode(nodeId);
|
|
230
|
+
if (removed != null) {
|
|
231
|
+
return removed;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
getNode(did) {
|
|
237
|
+
if (did == null) {
|
|
238
|
+
return null;
|
|
239
|
+
}
|
|
240
|
+
if (this.did === did) {
|
|
241
|
+
return this;
|
|
242
|
+
}
|
|
243
|
+
const child = this.children.get(did);
|
|
244
|
+
if (child != null) {
|
|
245
|
+
return child;
|
|
246
|
+
}
|
|
247
|
+
for (const device of this.children.values()) {
|
|
248
|
+
const node = device.getNode(did);
|
|
249
|
+
if (node != null) {
|
|
250
|
+
return node;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
getParent(node) {
|
|
256
|
+
if (node.did == null) {
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
if (node.did.length === 0) {
|
|
260
|
+
return null;
|
|
261
|
+
}
|
|
262
|
+
if (node.summary == null) {
|
|
263
|
+
return null;
|
|
264
|
+
}
|
|
265
|
+
if (node.summary.parentId == null) {
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
if (node.summary.parentId.length === 0) {
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
if (node.did === node.summary.parentId) {
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
return this.getNode(node.summary.parentId);
|
|
275
|
+
}
|
|
276
|
+
getServices() {
|
|
277
|
+
return super
|
|
278
|
+
.getServices()
|
|
279
|
+
.filter(x => x instanceof ServiceImage_1.ServiceImage)
|
|
280
|
+
.map(x => x);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
exports.DeviceImage = DeviceImage;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Event } from '../instance/Event';
|
|
2
|
+
import { EventType } from '../definition/urn/EventType';
|
|
3
|
+
import { EventOperation } from '../operation/EventOperation';
|
|
4
|
+
import { ArgumentImage } from './ArgumentImage';
|
|
5
|
+
import { Property } from '../instance/Property';
|
|
6
|
+
export declare class EventImage extends Event {
|
|
7
|
+
static of(event: Event): EventImage;
|
|
8
|
+
constructor(iid: number, type: EventType, description: Map<string, string>, list: ArgumentImage[]);
|
|
9
|
+
tryEventOccurred(o: EventOperation, properties: Map<number, Property>): void;
|
|
10
|
+
getArguments(): ArgumentImage[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventImage = void 0;
|
|
4
|
+
const Event_1 = require("../instance/Event");
|
|
5
|
+
const ArgumentImage_1 = require("./ArgumentImage");
|
|
6
|
+
const Status_1 = require("../status/Status");
|
|
7
|
+
class EventImage extends Event_1.Event {
|
|
8
|
+
static of(event) {
|
|
9
|
+
return new EventImage(event.iid, event.type, event.description, event.getArguments().map(x => ArgumentImage_1.ArgumentImage.fromArgument(x)));
|
|
10
|
+
}
|
|
11
|
+
constructor(iid, type, description, list) {
|
|
12
|
+
super(iid, type, description, list);
|
|
13
|
+
}
|
|
14
|
+
tryEventOccurred(o, properties) {
|
|
15
|
+
o.status = Status_1.Status.COMPLETED;
|
|
16
|
+
for (const spec of this.getArguments()) {
|
|
17
|
+
const v = o.arguments.get(spec.piid);
|
|
18
|
+
if (v == null) {
|
|
19
|
+
o.status = Status_1.Status.EVENT_ARGUMENTS_ERROR;
|
|
20
|
+
o.description = 'event argument error';
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
if (spec.minRepeat > 0) {
|
|
24
|
+
o.status = Status_1.Status.EVENT_ARGUMENTS_ERROR;
|
|
25
|
+
o.description = 'event argument error, min repeat > 0';
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
const property = properties.get(spec.piid);
|
|
29
|
+
if (property == null) {
|
|
30
|
+
o.status = Status_1.Status.EVENT_ARGUMENTS_ERROR;
|
|
31
|
+
o.description = 'event argument error, value invalid';
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
if (!property.trySetValues(v.values)) {
|
|
35
|
+
o.status = Status_1.Status.EVENT_ARGUMENTS_ERROR;
|
|
36
|
+
o.description = 'event argument error, set value failed';
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
getArguments() {
|
|
42
|
+
return super
|
|
43
|
+
.getArguments()
|
|
44
|
+
.filter(x => x instanceof ArgumentImage_1.ArgumentImage)
|
|
45
|
+
.map(x => x);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.EventImage = EventImage;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Property } from '../instance/Property';
|
|
2
|
+
import { PropertyOperation } from '../operation/PropertyOperation';
|
|
3
|
+
import { PropertyType } from "../definition/urn/PropertyType";
|
|
4
|
+
import { DataFormat } from "../definition/property/data/DataFormat";
|
|
5
|
+
import { Access } from "../definition/property/Access";
|
|
6
|
+
import { ConstraintValue } from "../definition/property/ConstraintValue";
|
|
7
|
+
export declare class PropertyImage extends Property {
|
|
8
|
+
iid: number;
|
|
9
|
+
type: PropertyType;
|
|
10
|
+
description: Map<string, string>;
|
|
11
|
+
format: DataFormat;
|
|
12
|
+
access: Access;
|
|
13
|
+
constraintValue: ConstraintValue | null;
|
|
14
|
+
unit: string | null;
|
|
15
|
+
members: Array<number>;
|
|
16
|
+
static copy(other: Property): PropertyImage;
|
|
17
|
+
constructor(iid: number | undefined, type: PropertyType, description: Map<string, string>, format: DataFormat, access: Access, constraintValue?: ConstraintValue | null, unit?: string | null, members?: Array<number>);
|
|
18
|
+
tryRead(o: PropertyOperation): void;
|
|
19
|
+
tryWrite(o: PropertyOperation, save: boolean): void;
|
|
20
|
+
update(o: PropertyOperation): void;
|
|
21
|
+
onPropertiesChanged(o: PropertyOperation): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PropertyImage = void 0;
|
|
4
|
+
const Property_1 = require("../instance/Property");
|
|
5
|
+
const Status_1 = require("../status/Status");
|
|
6
|
+
class PropertyImage extends Property_1.Property {
|
|
7
|
+
static copy(other) {
|
|
8
|
+
return new PropertyImage(other.iid, other.type, other.description, other.format, other.access, other.constraintValue, other.unit, other.members);
|
|
9
|
+
}
|
|
10
|
+
constructor(iid = 0, type, description, format, access, constraintValue = null, unit = null, members = []) {
|
|
11
|
+
super(iid, type, description, format, access, constraintValue, unit, members);
|
|
12
|
+
this.iid = iid;
|
|
13
|
+
this.type = type;
|
|
14
|
+
this.description = description;
|
|
15
|
+
this.format = format;
|
|
16
|
+
this.access = access;
|
|
17
|
+
this.constraintValue = constraintValue;
|
|
18
|
+
this.unit = unit;
|
|
19
|
+
this.members = members;
|
|
20
|
+
}
|
|
21
|
+
tryRead(o) {
|
|
22
|
+
var _a;
|
|
23
|
+
if (this.value == null) {
|
|
24
|
+
o.status = Status_1.Status.INTERNAL_ERROR;
|
|
25
|
+
o.description = 'property value is null';
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (this.access.isReadable) {
|
|
29
|
+
o.value = (_a = this.value.currentValue) === null || _a === void 0 ? void 0 : _a.rawValue();
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
o.status = Status_1.Status.PROPERTY_CANNOT_READ;
|
|
33
|
+
o.description = 'property cannot read';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
tryWrite(o, save) {
|
|
37
|
+
if (this.access.isWritable) {
|
|
38
|
+
if (save) {
|
|
39
|
+
this.update(o);
|
|
40
|
+
}
|
|
41
|
+
else if (super.trySetValue(o.value)) {
|
|
42
|
+
o.status = Status_1.Status.COMPLETED;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
o.status = Status_1.Status.PROPERTY_VALUE_INVALID;
|
|
46
|
+
o.description = 'property value invalid';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
o.status = Status_1.Status.PROPERTY_CANNOT_WRITE;
|
|
51
|
+
o.description = 'property cannot write';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
update(o) {
|
|
55
|
+
if (this.setValue(o.value)) {
|
|
56
|
+
o.status = Status_1.Status.COMPLETED;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
o.status = Status_1.Status.PROPERTY_VALUE_INVALID;
|
|
60
|
+
o.description = 'property value invalid';
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
onPropertiesChanged(o) {
|
|
64
|
+
if (this.access.isNotifiable) {
|
|
65
|
+
this.update(o);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
o.status = Status_1.Status.PROPERTY_CANNOT_NOTIFY;
|
|
69
|
+
o.description = 'property cannot notify';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.PropertyImage = PropertyImage;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Service } from '../instance/Service';
|
|
2
|
+
import { ServiceType } from '../definition/urn/ServiceType';
|
|
3
|
+
import { PropertyImage } from './PropertyImage';
|
|
4
|
+
import { ActionImage } from './ActionImage';
|
|
5
|
+
import { EventImage } from './EventImage';
|
|
6
|
+
import { PropertyOperation } from '../operation/PropertyOperation';
|
|
7
|
+
import { ActionOperation } from '../operation/ActionOperation';
|
|
8
|
+
import { EventOperation } from '../operation/EventOperation';
|
|
9
|
+
export declare class ServiceImage extends Service {
|
|
10
|
+
static of(s: Service): ServiceImage;
|
|
11
|
+
constructor(iid: number, type: ServiceType, description: Map<string, string>, properties: PropertyImage[], actions: ActionImage[], events: EventImage[]);
|
|
12
|
+
getProperties(): PropertyImage[];
|
|
13
|
+
getActions(): ActionImage[];
|
|
14
|
+
getEvents(): EventImage[];
|
|
15
|
+
tryRead(o: PropertyOperation): void;
|
|
16
|
+
tryWrite(o: PropertyOperation, save: boolean): void;
|
|
17
|
+
tryInvoke(o: ActionOperation): void;
|
|
18
|
+
tryEventOccurred(o: EventOperation): void;
|
|
19
|
+
update(o: PropertyOperation): void;
|
|
20
|
+
onPropertiesChanged(o: PropertyOperation): void;
|
|
21
|
+
}
|