first commit
commit
0fb4083d38
@ -0,0 +1,24 @@
|
||||
\#*
|
||||
.\#*
|
||||
*~
|
||||
target/
|
||||
bin/
|
||||
build/
|
||||
tmp/
|
||||
*.class
|
||||
.gradle/
|
||||
.svn/
|
||||
.settings/
|
||||
.project
|
||||
.classpath
|
||||
.metadata/
|
||||
.externalToolBuilders/
|
||||
gradle.properties
|
||||
doc/userguide/*.html
|
||||
doc/userguide/*.pdf
|
||||
*.hprof
|
||||
gradle-app.setting
|
||||
.factorypath
|
||||
.apt_generated/
|
||||
#created by openiec61850 clientgui:
|
||||
lastconnection.properties
|
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm ../../src/main/java-gen/org/openmuc/josistack/internal/acse/asn1/*
|
||||
|
||||
jasn1-compiler -o "../../src/main/java-gen/" -p "org.openmuc.josistack.internal.acse" -f iso-acse-layer.asn
|
@ -0,0 +1,272 @@
|
||||
-- Module ACSE_1 (X.227:04/1995)
|
||||
ASN1 {joint_iso_itu_t association_control(2) modules(0) apdus(0) version1(1)}
|
||||
-- ACSE_1 refers to ACSE version 1
|
||||
DEFINITIONS ::=
|
||||
BEGIN
|
||||
|
||||
EXPORTS
|
||||
acse_as_id, ACSE_apdu, aCSE_id, Application_context_name, AP_title,
|
||||
AE_qualifier, AE_title, AP_invocation_identifier, AE_invocation_identifier,
|
||||
Mechanism_name, Authentication_value, ACSE_requirements, ObjectSet;
|
||||
|
||||
|
||||
-- The data types Name and RelativeDistinguishedName are imported from ISO/IEC 9594_2.
|
||||
-- object identifier assignments
|
||||
acse_as_id OBJECT IDENTIFIER ::=
|
||||
{joint-iso-itu-t association-control(2) abstract-syntax(1) apdus(0)
|
||||
version1(1)}
|
||||
|
||||
-- may be used to reference the abstract syntax of the ACSE APDUs
|
||||
aCSE_id OBJECT IDENTIFIER ::=
|
||||
{joint-iso-itu-t association-control(2) ase-id(3) acse-ase(1) version(1)}
|
||||
|
||||
-- may be used to identify the Association Control ASE.
|
||||
-- top level CHOICE
|
||||
ACSE_apdu ::= CHOICE {
|
||||
aarq AARQ_apdu,
|
||||
aare AARE_apdu,
|
||||
rlrq RLRQ_apdu,
|
||||
rlre RLRE_apdu
|
||||
}
|
||||
|
||||
AARQ_apdu ::= [APPLICATION 0] IMPLICIT SEQUENCE {
|
||||
protocol_version [0] IMPLICIT BIT STRING OPTIONAL,
|
||||
application_context_name [1] EXPLICIT OBJECT IDENTIFIER,
|
||||
called_AP_title [2] AP_title OPTIONAL,
|
||||
called_AE_qualifier [3] AE_qualifier OPTIONAL,
|
||||
called_AP_invocation_identifier [4] EXPLICIT AP_invocation_identifier OPTIONAL,
|
||||
called_AE_invocation_identifier [5] EXPLICIT AE_invocation_identifier OPTIONAL,
|
||||
calling_AP_title [6] AP_title OPTIONAL,
|
||||
calling_AE_qualifier [7] AE_qualifier OPTIONAL,
|
||||
calling_AP_invocation_identifier [8] AP_invocation_identifier OPTIONAL,
|
||||
calling_AE_invocation_identifier [9] AE_invocation_identifier OPTIONAL,
|
||||
-- The following field shall not be present if only the Kernel is used.
|
||||
sender_acse_requirements [10] IMPLICIT ACSE_requirements OPTIONAL,
|
||||
-- The following field shall only be present if the Authentication functional unit is selected.
|
||||
mechanism_name [11] IMPLICIT Mechanism_name OPTIONAL,
|
||||
-- The following field shall only be present if the Authentication functional unit is selected.
|
||||
calling_authentication_value [12] EXPLICIT Authentication_value OPTIONAL,
|
||||
application_context_name_list
|
||||
[13] IMPLICIT Application_context_name_list OPTIONAL,
|
||||
-- The above field shall only be present if the Application Context Negotiation functional unit is selected
|
||||
implementation_information [29] IMPLICIT Implementation_data OPTIONAL,
|
||||
user_information [30] IMPLICIT Association_information OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
AARE_apdu ::= [APPLICATION 1] IMPLICIT SEQUENCE {
|
||||
--changed by Stefan Feuerhahn
|
||||
protocol_version [0] IMPLICIT BIT STRING OPTIONAL,
|
||||
application_context_name [1] EXPLICIT OBJECT IDENTIFIER,
|
||||
result [2] EXPLICIT Associate_result,
|
||||
result_source_diagnostic [3] EXPLICIT Associate_source_diagnostic,
|
||||
responding_AP_title [4] EXPLICIT AP_title OPTIONAL,
|
||||
responding_AE_qualifier [5] EXPLICIT AE_qualifier OPTIONAL,
|
||||
responding_AP_invocation_identifier [6] EXPLICIT AP_invocation_identifier OPTIONAL,
|
||||
responding_AE_invocation_identifier [7] EXPLICIT AE_invocation_identifier OPTIONAL,
|
||||
-- The following field shall not be present if only the Kernel is used.
|
||||
responder_acse_requirements [8] IMPLICIT ACSE_requirements OPTIONAL,
|
||||
-- The following field shall only be present if the Authentication functional unit is selected.
|
||||
mechanism_name [9] IMPLICIT Mechanism_name OPTIONAL,
|
||||
-- This following field shall only be present if the Authentication functional unit is selected.
|
||||
responding_authentication_value [10] EXPLICIT Authentication_value OPTIONAL,
|
||||
application_context_name_list
|
||||
[11] IMPLICIT Application_context_name_list OPTIONAL,
|
||||
-- The above field shall only be present if the Application Context Negotiation functional unit is selected
|
||||
implementation_information
|
||||
[29] IMPLICIT Implementation_data OPTIONAL,
|
||||
user_information [30] IMPLICIT Association_information OPTIONAL
|
||||
}
|
||||
|
||||
RLRQ_apdu ::= [APPLICATION 2] IMPLICIT SEQUENCE {
|
||||
reason [0] IMPLICIT Release_request_reason OPTIONAL,
|
||||
user_information [30] IMPLICIT Association_information OPTIONAL
|
||||
}
|
||||
|
||||
RLRE_apdu ::= [APPLICATION 3] IMPLICIT SEQUENCE {
|
||||
reason [0] IMPLICIT Release_response_reason OPTIONAL,
|
||||
user_information [30] IMPLICIT Association_information OPTIONAL
|
||||
}
|
||||
|
||||
-- ABRT_apdu ::= [APPLICATION 4] IMPLICIT SEQUENCE {
|
||||
-- abort_source [0] IMPLICIT ABRT_source,
|
||||
-- abort_diagnostic [1] IMPLICIT ABRT_diagnostic OPTIONAL,
|
||||
-- This field shall not be present if only the Kernel is used.
|
||||
-- user_information [30] IMPLICIT Association_information OPTIONAL
|
||||
--}
|
||||
|
||||
-- ABRT_diagnostic ::= ENUMERATED {
|
||||
-- no_reason_given(1), protocol_error(2),
|
||||
-- authentication_mechanism_name_not_recognized(3),
|
||||
-- authentication_mechanism_name_required(4), authentication_failure(5),
|
||||
-- authentication_required(6)
|
||||
-- }
|
||||
|
||||
-- ABRT_source ::= INTEGER {acse_service_user(0), acse_service_provider(1)}
|
||||
|
||||
|
||||
ACSE_requirements ::= BIT STRING {
|
||||
authentication(0), application_context_negotiation(1)
|
||||
}
|
||||
|
||||
Application_context_name_list ::= SEQUENCE OF Application_context_name
|
||||
|
||||
-- Application_context_name ::= CHOICE {
|
||||
-- application_context_name OBJECT IDENTIFIER
|
||||
-- }
|
||||
|
||||
Application_context_name ::= OBJECT IDENTIFIER
|
||||
|
||||
-- Application_entity title productions follow (not in alphabetical order)
|
||||
AP_title ::= CHOICE {
|
||||
-- ap_title_form1 AP_title_form1,
|
||||
ap_title_form2 AP_title_form2
|
||||
}
|
||||
|
||||
AE_qualifier ::= CHOICE {
|
||||
-- ae_qualifier_form1 AE_qualifier_form1,
|
||||
ae_qualifier_form2 AE_qualifier_form2
|
||||
}
|
||||
|
||||
-- When both AP_title and AE_qualifier data values are present in an AARQ or AARE APDU, both must
|
||||
-- have the same form to allow the construction of an AE_title as discussed in CCITT Rec. X.665 |
|
||||
-- ISO/IEC 9834_6.
|
||||
-- AP_title_form1 ::=
|
||||
-- Name
|
||||
|
||||
-- The value assigned to AP_title_form1 is The Directory Name of an application_process title.
|
||||
-- AE_qualifier_form1 ::=
|
||||
-- RelativeDistinguishedName
|
||||
|
||||
-- The value assigned to AE_qualifier_form1 is the relative distinguished name of a particular
|
||||
-- application_entity of the application_process identified by AP_title_form1.
|
||||
AP_title_form2 ::= OBJECT IDENTIFIER
|
||||
|
||||
AE_qualifier_form2 ::= INTEGER
|
||||
|
||||
AE_title ::= CHOICE {
|
||||
-- ae_title_form1 AE_title_form1,
|
||||
ae_title_form2 AE_title_form2
|
||||
}
|
||||
|
||||
-- As defined in CCITT Rec. X.650 | ISO 7498_3, an application_entity title is composed of an application-
|
||||
-- process title and an application_entity qualifier. The ACSE protocol provides for the transfer of an
|
||||
-- application_entity title value by the transfer of its component values. However, the following data type
|
||||
-- is provided for International Standards that reference a single syntactic structure for AE titles.
|
||||
-- AE_title_form1 ::=
|
||||
-- Name
|
||||
|
||||
-- For access to The Directory (ITU_T Rec. X.500_Series | ISO/IEC 9594), an AE title has AE_title_form1.
|
||||
-- This value can be constructed from AP_title_form1 and AE_qualifier_form1 values contained in an
|
||||
-- AARQ or AARE APDU. A discussion of forming an AE_title_form1 from AP_title_form1 and AE_qualifier-
|
||||
-- form1 may be found in CCITT Rec. X.665 | ISO/IEC 9834_6.
|
||||
AE_title_form2 ::= OBJECT IDENTIFIER
|
||||
|
||||
-- A discussion of forming an AE_title_form2 from AP_title_form2 and AE_qualifier_form2 may be
|
||||
-- found in CCITT Rec. X.665 | ISO/IEC 9834_6.
|
||||
AE_invocation_identifier ::= INTEGER
|
||||
|
||||
AP_invocation_identifier ::= INTEGER
|
||||
|
||||
-- End of Application_entity title productions
|
||||
Associate_result ::= INTEGER {
|
||||
accepted(0), rejected_permanent(1), rejected_transient(2)}
|
||||
|
||||
Associate_source_diagnostic ::= CHOICE {
|
||||
acse_service_user
|
||||
[1] EXPLICIT INTEGER {null(0), no_reason_given(1),
|
||||
application_context_name_not_supported(2),
|
||||
calling_AP_title_not_recognized(3),
|
||||
calling_AP_invocation_identifier_not_recognized(4),
|
||||
calling_AE_qualifier_not_recognized(5),
|
||||
calling_AE_invocation_identifier_not_recognized(6),
|
||||
called_AP_title_not_recognized(7),
|
||||
called_AP_invocation_identifier_not_recognized(8),
|
||||
called_AE_qualifier_not_recognized(9),
|
||||
called_AE_invocation_identifier_not_recognized(10),
|
||||
authentication_mechanism_name_not_recognized(11),
|
||||
authentication_mechanism_name_required(12),
|
||||
authentication_failure(13), authentication_required(14)},
|
||||
acse_service_provider
|
||||
[2] EXPLICIT INTEGER {null(0), no_reason_given(1), no_common_acse_version(2)}
|
||||
}
|
||||
|
||||
-- Association_information ::= SEQUENCE OF Association_information_item
|
||||
Association_information ::= SEQUENCE OF Myexternal
|
||||
|
||||
Myexternal ::= [UNIVERSAL 8] IMPLICIT SEQUENCE
|
||||
{
|
||||
direct_reference OBJECT IDENTIFIER OPTIONAL,
|
||||
indirect_reference INTEGER OPTIONAL,
|
||||
encoding CHOICE
|
||||
{ single_ASN1_type [0] EXPLICIT ANY,
|
||||
octet_aligned [1] IMPLICIT OCTET STRING,
|
||||
arbitrary [2] IMPLICIT BIT STRING }
|
||||
}
|
||||
|
||||
Myexternal2 ::= [UNIVERSAL 8] IMPLICIT SEQUENCE
|
||||
{
|
||||
direct_reference OBJECT IDENTIFIER OPTIONAL,
|
||||
indirect_reference INTEGER OPTIONAL,
|
||||
encoding CHOICE
|
||||
{ single_ASN1_type [0] EXPLICIT ANY,
|
||||
octet_aligned [1] IMPLICIT OCTET STRING,
|
||||
arbitrary [2] IMPLICIT BIT STRING }
|
||||
}
|
||||
|
||||
|
||||
--Association_information_item ::= [UNIVERSAL 8] IMPLICIT SEQUENCE {
|
||||
-- direct_reference OBJECT IDENTIFIER OPTIONAL,
|
||||
-- indirect_reference INTEGER OPTIONAL,
|
||||
-- encoding CHOICE
|
||||
-- {
|
||||
-- single_ASN1_type [0] CHOICE {
|
||||
-- single_ASN1_type ANY
|
||||
-- },
|
||||
-- octet_aligned [1] IMPLICIT OCTET STRING,
|
||||
-- arbitrary [2] IMPLICIT BIT STRING
|
||||
-- }
|
||||
-- }
|
||||
|
||||
--is optional:
|
||||
Authentication_value ::= CHOICE {
|
||||
charstring [0] IMPLICIT GraphicString,
|
||||
bitstring [1] IMPLICIT BIT STRING,
|
||||
external [2] IMPLICIT Myexternal2
|
||||
-- other
|
||||
-- [3] IMPLICIT SEQUENCE {other_mechanism_name
|
||||
-- MECHANISM_NAME.&id({ObjectSet}),
|
||||
-- other_mechanism_value
|
||||
-- MECHANISM_NAME.&Type
|
||||
-- ({ObjectSet}{@.other_mechanism_name})}
|
||||
}
|
||||
|
||||
-- The abstract syntax of (calling/responding) authentication_value is determined by the authentication
|
||||
-- mechanism used during association establishment. The authentication mechanism is either explicitly
|
||||
-- denoted by the &id field (of type OBJECT IDENTIFIER) for a mechanism belonging to the class
|
||||
-- MECHANISM_NAME, or it is known implicitly by
|
||||
-- prior agreement between the communicating partners. If the "other" component is chosen, then
|
||||
-- the "mechanism_name" component must be present in accordance with
|
||||
-- ITU_T Rec. X.680 | ISO/IEC 8824. If the value "mechanism_name" occurs in the AARQ_apdu or the
|
||||
-- AARE_apdu, then that value must be the same as the value for "other_mechanism_name"
|
||||
Implementation_data ::= GraphicString
|
||||
|
||||
Mechanism_name ::= OBJECT IDENTIFIER
|
||||
|
||||
Release_request_reason ::= INTEGER {
|
||||
normal (0),
|
||||
urgent (1),
|
||||
user_defined (30)
|
||||
}
|
||||
|
||||
Release_response_reason ::= INTEGER {
|
||||
normal (0),
|
||||
not_finished (1),
|
||||
user_defined (30)
|
||||
}
|
||||
|
||||
|
||||
|
||||
END
|
||||
|
||||
-- Generated by Asnp, the ASN.1 pretty_printer of France Telecom R&D
|
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm ../../src/main/java-gen/org/openmuc/josistack/internal/presentation/asn1/*.java
|
||||
|
||||
jasn1-compiler -o ../../src/main/java-gen/ -p org.openmuc.josistack.internal.presentation -f iso-presentation-layer.asn
|
@ -0,0 +1,143 @@
|
||||
ASN1 DEFINITIONS ::=
|
||||
BEGIN
|
||||
|
||||
|
||||
CP_type ::= SET {
|
||||
mode_selector [0] IMPLICIT Mode_selector,
|
||||
--x410_mode_parameters [1] IMPLICIT SET {
|
||||
-- COMPONENTS OF Reliable_Transfer_APDUs.RTORQapdu
|
||||
--} OPTIONAL,
|
||||
--- Shall be used for X.410 mode only. Shall be bitwise
|
||||
--- compatible with CCITT Recommendation X.410_1984.
|
||||
--- This shall be the User data parameter of the CP PPDU1)
|
||||
normal_mode_parameters [2] IMPLICIT SEQUENCE {
|
||||
protocol_version [0] IMPLICIT Protocol_version DEFAULT {version_1},
|
||||
calling_presentation_selector [1] IMPLICIT Calling_presentation_selector OPTIONAL,
|
||||
called_presentation_selector [2] IMPLICIT Called_presentation_selector OPTIONAL,
|
||||
presentation_context_definition_list [4] IMPLICIT Presentation_context_definition_list OPTIONAL,
|
||||
default_context_name [6] IMPLICIT Default_context_name OPTIONAL,
|
||||
presentation_requirements [8] IMPLICIT Presentation_requirements OPTIONAL,
|
||||
user_session_requirements [9] IMPLICIT User_session_requirements OPTIONAL
|
||||
-- shall not be present if equal to the Revised session
|
||||
-- requirements parameter -- ,
|
||||
user_data User_data OPTIONAL
|
||||
} OPTIONAL
|
||||
-- Shall be used for normal mode only.
|
||||
-- Shall be the parameters of the CP PPDU.
|
||||
}
|
||||
|
||||
CPA_PPDU ::= SET {
|
||||
mode_selector [0] IMPLICIT Mode_selector,
|
||||
--x410_mode_parameters [1] IMPLICIT SET {
|
||||
-- COMPONENTS OF Reliable_Transfer_APDUs.RTOACapdu
|
||||
--} OPTIONAL,
|
||||
--- Shall be used for X.410 mode only. Shall be bitwise
|
||||
--- compatible with CCITT Recommendation X.410_1984.
|
||||
--- This shall be the User data parameter of the CPA PPDU1)
|
||||
normal_mode_parameters [2] IMPLICIT SEQUENCE {
|
||||
protocol_version [0] IMPLICIT Protocol_version DEFAULT {version_1},
|
||||
responding_presentation_selector [3] IMPLICIT Responding_presentation_selector OPTIONAL,
|
||||
presentation_context_definition_result_list [5] IMPLICIT Presentation_context_definition_result_list OPTIONAL,
|
||||
presentation_requirements [8] IMPLICIT Presentation_requirements OPTIONAL,
|
||||
user_session_requirements [9] IMPLICIT User_session_requirements OPTIONAL,
|
||||
-- shall not be present if equal to the Revised session
|
||||
-- requirements parameter --
|
||||
user_data User_data OPTIONAL
|
||||
} OPTIONAL
|
||||
-- Shall be used for normal mode only.
|
||||
}
|
||||
|
||||
Responding_presentation_selector ::= Presentation_selector
|
||||
Presentation_context_definition_result_list ::= Result_list
|
||||
|
||||
Result_list ::= SEQUENCE OF SEQUENCE {
|
||||
result [0] IMPLICIT Result,
|
||||
transfer_syntax_name [1] IMPLICIT Transfer_syntax_name OPTIONAL,
|
||||
provider_reason [2] IMPLICIT INTEGER {
|
||||
reason_not_specified (0),
|
||||
abstract_syntax_not_supported (1),
|
||||
proposed_transfer_syntaxes_not_supported (2),
|
||||
local_limit_on_DCS_exceeded (3)
|
||||
} OPTIONAL
|
||||
}
|
||||
|
||||
Result ::= INTEGER {
|
||||
acceptance (0),
|
||||
user_rejection (1),
|
||||
provider_rejection (2)
|
||||
}
|
||||
|
||||
Mode_selector ::= SET {
|
||||
mode_value [0] IMPLICIT INTEGER { x410_1984_mode (0), normal_mode (1) }
|
||||
}
|
||||
|
||||
|
||||
User_data ::= CHOICE {
|
||||
simply_encoded_data [APPLICATION 0] IMPLICIT Simply_encoded_data,
|
||||
fully_encoded_data [APPLICATION 1] IMPLICIT Fully_encoded_data
|
||||
}
|
||||
-- Subclause 8.4 defines when each of the two alternatives shall be used.
|
||||
|
||||
Simply_encoded_data ::= OCTET STRING
|
||||
-- See 8.4.1.
|
||||
|
||||
Fully_encoded_data ::= SEQUENCE OF PDV_list
|
||||
-- contains one or more PDV_list values.
|
||||
-- See 8.4.2.
|
||||
|
||||
PDV_list ::= SEQUENCE {
|
||||
transfer_syntax_name Transfer_syntax_name OPTIONAL,
|
||||
presentation_context_identifier Presentation_context_identifier,
|
||||
presentation_data_values CHOICE {
|
||||
single_ASN1_type [0] ANY,
|
||||
-- Type corresponding to presentation context identifier
|
||||
octet_aligned [1] IMPLICIT OCTET STRING,
|
||||
arbitrary [2] IMPLICIT BIT STRING
|
||||
}
|
||||
-- Contains one or more presentation data values from the same
|
||||
-- presentation context.
|
||||
-- See 8.4.2.
|
||||
}
|
||||
|
||||
|
||||
Presentation_context_definition_list ::= Context_list
|
||||
|
||||
Context_list ::= SEQUENCE OF SEQUENCE {
|
||||
presentation_context_identifier Presentation_context_identifier,
|
||||
abstract_syntax_name Abstract_syntax_name,
|
||||
transfer_syntax_name_list SEQUENCE OF Transfer_syntax_name
|
||||
}
|
||||
|
||||
Presentation_context_identifier ::= INTEGER
|
||||
Abstract_syntax_name ::= OBJECT IDENTIFIER
|
||||
Transfer_syntax_name ::= OBJECT IDENTIFIER
|
||||
Protocol_version ::= BIT STRING { version_1 (0) }
|
||||
Calling_presentation_selector ::= Presentation_selector
|
||||
Called_presentation_selector ::= Presentation_selector
|
||||
Presentation_selector ::= OCTET STRING
|
||||
|
||||
|
||||
Default_context_name ::= SEQUENCE {
|
||||
abstract_syntax_name [0] IMPLICIT Abstract_syntax_name,
|
||||
transfer_syntax_name [1] IMPLICIT Transfer_syntax_name
|
||||
}
|
||||
|
||||
Presentation_requirements ::= BIT STRING { context_management (0), restoration (1) }
|
||||
|
||||
User_session_requirements ::= BIT STRING {
|
||||
half_duplex (0),
|
||||
duplex (1),
|
||||
expedited_data (2),
|
||||
minor_synchronize (3),
|
||||
major_synchronize (4),
|
||||
resynchronize (5),
|
||||
activity_management (6),
|
||||
negotiated_release (7),
|
||||
capability_data (8),
|
||||
exceptions (9),
|
||||
typed_data (10),
|
||||
symmetric_synchronize (11),
|
||||
data_separation (12)
|
||||
}
|
||||
|
||||
END
|
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm -r ../../src/main/java-gen/*
|
||||
|
||||
jasn1-compiler -o "../../src/main/java-gen" -p "org.openmuc.openiec61850.internal.mms" -f mms.asn
|
@ -0,0 +1,723 @@
|
||||
--
|
||||
-- Part of the ASN.1-Specification for MMS
|
||||
-- tries to include only those parts relevant for IEC 61850
|
||||
-- source: http://www.nettedautomation.com/standardization/iso/tc184/sc5/wg2/mms_syntax/Version1999/mms_syntax.html
|
||||
|
||||
ASN1 { iso standard 9506 part(2) mms-general-module-version(2) } DEFINITIONS ::= BEGIN
|
||||
|
||||
MMSpdu ::= CHOICE {
|
||||
confirmed-RequestPDU [0] IMPLICIT Confirmed-RequestPDU,
|
||||
confirmed-ResponsePDU [1] IMPLICIT Confirmed-ResponsePDU,
|
||||
confirmed-ErrorPDU [2] IMPLICIT Confirmed-ErrorPDU,
|
||||
unconfirmed-PDU [3] IMPLICIT Unconfirmed-PDU,
|
||||
rejectPDU [4] IMPLICIT RejectPDU,
|
||||
initiate-RequestPDU [8] IMPLICIT Initiate-RequestPDU,
|
||||
initiate-ResponsePDU [9] IMPLICIT Initiate-ResponsePDU,
|
||||
initiate-ErrorPDU [10] IMPLICIT Initiate-ErrorPDU,
|
||||
conclude-RequestPDU [11] IMPLICIT Conclude-RequestPDU
|
||||
}
|
||||
|
||||
Confirmed-RequestPDU ::= SEQUENCE {
|
||||
invokeID Unsigned32,
|
||||
service ConfirmedServiceRequest
|
||||
}
|
||||
|
||||
ConfirmedServiceRequest ::= CHOICE {
|
||||
getNameList [1] IMPLICIT GetNameList-Request,
|
||||
read [4] IMPLICIT Read-Request,
|
||||
write [5] IMPLICIT Write-Request,
|
||||
getVariableAccessAttributes [6] GetVariableAccessAttributes-Request,
|
||||
defineNamedVariableList [11] IMPLICIT DefineNamedVariableList-Request,
|
||||
getNamedVariableListAttributes [12] GetNamedVariableListAttributes-Request,
|
||||
deleteNamedVariableList [13] IMPLICIT DeleteNamedVariableList-Request
|
||||
}
|
||||
|
||||
Unconfirmed-PDU ::= SEQUENCE {
|
||||
service UnconfirmedService
|
||||
}
|
||||
|
||||
UnconfirmedService ::= CHOICE {
|
||||
informationReport [0] IMPLICIT InformationReport
|
||||
}
|
||||
|
||||
Confirmed-ResponsePDU ::= SEQUENCE {
|
||||
invokeID Unsigned32,
|
||||
service ConfirmedServiceResponse
|
||||
}
|
||||
|
||||
ConfirmedServiceResponse ::= CHOICE {
|
||||
getNameList [1] IMPLICIT GetNameList-Response,
|
||||
read [4] IMPLICIT Read-Response,
|
||||
write [5] IMPLICIT Write-Response,
|
||||
getVariableAccessAttributes [6] IMPLICIT GetVariableAccessAttributes-Response,
|
||||
defineNamedVariableList [11] IMPLICIT DefineNamedVariableList-Response,
|
||||
getNamedVariableListAttributes [12] IMPLICIT GetNamedVariableListAttributes-Response,
|
||||
deleteNamedVariableList [13] IMPLICIT DeleteNamedVariableList-Response
|
||||
}
|
||||
|
||||
|
||||
Confirmed-ErrorPDU ::= SEQUENCE {
|
||||
invokeID [0] IMPLICIT Unsigned32,
|
||||
modifierPosition [1] IMPLICIT Unsigned32 OPTIONAL,
|
||||
serviceError [2] IMPLICIT ServiceError
|
||||
}
|
||||
|
||||
|
||||
ServiceError ::= SEQUENCE {
|
||||
errorClass [0] CHOICE {
|
||||
vmd_state [0] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- vmd-state-conflict (1),
|
||||
-- vmd-operational-problem (2),
|
||||
-- domain-transfer-problem (3),
|
||||
-- state-machine-id-invalid (4)
|
||||
-- },
|
||||
application_reference [1] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- aplication-unreachable (1),
|
||||
-- connection-lost (2),
|
||||
-- application-reference-invalid (3),
|
||||
-- context-unsupported (4)
|
||||
-- },
|
||||
definition [2] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- object-undefined (1),
|
||||
-- invalid-address (2),
|
||||
-- type-unsupported (3),
|
||||
-- type-inconsistent (4),
|
||||
-- object-exists (5),
|
||||
-- object-attribute-inconsistent (6)
|
||||
-- },
|
||||
resource [3] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- memory-unavailable (1),
|
||||
-- processor-resource-unavailable (2),
|
||||
-- mass-storage-unavailable (3),
|
||||
-- capability-unavailable (4),
|
||||
-- capability-unknown (5)
|
||||
-- },
|
||||
service [4] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- primitives-out-of-sequence (1),
|
||||
-- object-state-conflict (2),
|
||||
-- pdu-size (3),
|
||||
-- continuation-invalid (4),
|
||||
-- object-constraint-conflict (5)
|
||||
-- },
|
||||
service_preempt [5] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- timeout (1),
|
||||
-- deadlock (2),
|
||||
-- cancel (3)
|
||||
-- },
|
||||
time_resolution [6] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- unsupportable-time-resolution (1)
|
||||
-- },
|
||||
access [7] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- object-access-unsupported (1),
|
||||
-- object-non-existent (2),
|
||||
-- object-access-denied (3),
|
||||
-- object-invalidated (4)
|
||||
-- },
|
||||
initiate [8] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- version-incompatible (1),
|
||||
-- max-segment-insufficient (2),
|
||||
-- max-services-outstanding-calling-insufficient (3),
|
||||
-- max-services-outstanding-called-insufficient (4),
|
||||
-- service-CBB-insufficient (5),
|
||||
-- parameter-CBB-insufficient (6),
|
||||
-- nesting-level-insufficient (7)
|
||||
-- },
|
||||
conclude [9] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- further-communication-required (1)
|
||||
-- },
|
||||
cancel [10] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invoke-id-unknown (1),
|
||||
-- cancel-not-possible (2)
|
||||
-- },
|
||||
file [11] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- filename-ambiguous (1),
|
||||
-- file-busy (2),
|
||||
-- filename-syntax_Error (3),
|
||||
-- content-type-invalid (4),
|
||||
-- position-invalid (5),
|
||||
-- file-acces-denied (6),
|
||||
-- file-non-existent (7),
|
||||
-- duplicate-filename (8),
|
||||
-- insufficient-space-in-filestore (9)
|
||||
-- },
|
||||
others [12] IMPLICIT INTEGER
|
||||
},
|
||||
additionalCode [1] IMPLICIT INTEGER OPTIONAL,
|
||||
additionalDescription [2] IMPLICIT VisibleString OPTIONAL
|
||||
-- serviceSpecificInformation [3] CHOICE
|
||||
-- {
|
||||
-- obtainFile [0] IMPLICIT ObtainFile_Error,
|
||||
-- start [1] IMPLICIT Start_Error,
|
||||
-- stop [2] IMPLICIT Stop_Error,
|
||||
-- resume [3] IMPLICIT Resume_Error,
|
||||
-- reset [4] IMPLICIT Reset_Error,
|
||||
-- deleteVariableAccess [5] IMPLICIT DeleteVariableAccess_Error,
|
||||
-- deleteNamedVariableList [6] IMPLICIT DeleteNamedVariableList_Error,
|
||||
-- deleteNamedType [7] IMPLICIT DeleteNamedType_Error,
|
||||
-- defineEventEnrollment_Error [8] DefineEventEnrollment_Error,
|
||||
-- fileRename [9] IMPLICIT FileRename_Error
|
||||
-- this one is neither in this ASN nor in the IMPORTS
|
||||
-- additionalService [10] AdditionalServiceError
|
||||
-- } OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
TimeOfDay ::= OCTET STRING (SIZE(4|6))
|
||||
|
||||
BasicIdentifier ::= VisibleString ( FROM
|
||||
("A"|"a"|"B"|"b"|"C"|"c"|"D"|"d"|"E"|"e"|"F"|"f"|
|
||||
"G"|"g"|"H"|"h"|"I"|"i"|"J"|"j"|"K"|"k"|"L"|"l"|
|
||||
"M"|"m"|"N"|"n"|"O"|"o"|"P"|"p"|"Q"|"q"|"R"|"r"|
|
||||
"S"|"s"|"T"|"t"|"U"|"u"|"V"|"v"|"W"|"w"|"X"|"x"|
|
||||
"Y"|"y"|"Z"|"z"|"$"|"_"|"0"|"1"|"2"|"3"|"4"|"5"|
|
||||
"6"|"7"|"8"|"9") ) (SIZE(1..32))
|
||||
|
||||
|
||||
Identifier ::= VisibleString
|
||||
|
||||
Integer8 ::= INTEGER(-128..127)
|
||||
Integer16 ::= INTEGER(-32768..32767)
|
||||
Integer32 ::= INTEGER(-2147483648..2147483647)
|
||||
|
||||
Unsigned8 ::= INTEGER(0..255)
|
||||
Unsigned16 ::= INTEGER(0..65535)
|
||||
Unsigned32 ::= INTEGER(0..4294967295)
|
||||
|
||||
ObjectName ::= CHOICE {
|
||||
vmd-specific [0] IMPLICIT Identifier,
|
||||
domain-specific [1] IMPLICIT SEQUENCE {
|
||||
domainID Identifier,
|
||||
itemID Identifier
|
||||
},
|
||||
aa-specific [2] IMPLICIT Identifier
|
||||
}
|
||||
|
||||
|
||||
ObjectClass ::= CHOICE {
|
||||
basicObjectClass [0] IMPLICIT INTEGER
|
||||
-- {
|
||||
-- namedVariable (0),
|
||||
-- scatteredAccess (1),
|
||||
-- namedVariableList (2),
|
||||
-- namedType (3),
|
||||
-- semaphore (4),
|
||||
-- eventCondition (5),
|
||||
-- eventAction (6),
|
||||
-- eventEnrollment (7),
|
||||
-- journal (8),
|
||||
-- domain (9),
|
||||
-- programInvocation (10),
|
||||
-- operatorStation (11),
|
||||
-- dataExchange (12), ---- Shall not appear in minor version 1
|
||||
-- accessControlList (13) ---- Shall not appear in minor version 1 or 2
|
||||
-- }
|
||||
}
|
||||
|
||||
MMSString ::= VisibleString
|
||||
|
||||
|
||||
Initiate-RequestPDU ::= SEQUENCE {
|
||||
localDetailCalling [0] IMPLICIT Integer32 OPTIONAL,
|
||||
proposedMaxServOutstandingCalling [1] IMPLICIT Integer16,
|
||||
proposedMaxServOutstandingCalled [2] IMPLICIT Integer16,
|
||||
proposedDataStructureNestingLevel [3] IMPLICIT Integer8 OPTIONAL,
|
||||
initRequestDetail [4] IMPLICIT SEQUENCE {
|
||||
proposedVersionNumber [0] IMPLICIT Integer16,
|
||||
proposedParameterCBB [1] IMPLICIT ParameterSupportOptions,
|
||||
servicesSupportedCalling [2] IMPLICIT ServiceSupportOptions
|
||||
}
|
||||
}
|
||||
|
||||
Initiate-ResponsePDU ::= SEQUENCE {
|
||||
localDetailCalled [0] IMPLICIT Integer32 OPTIONAL,
|
||||
negotiatedMaxServOutstandingCalling [1] IMPLICIT Integer16,
|
||||
negotiatedMaxServOutstandingCalled [2] IMPLICIT Integer16,
|
||||
negotiatedDataStructureNestingLevel [3] IMPLICIT Integer8 OPTIONAL,
|
||||
initResponseDetail [4] IMPLICIT SEQUENCE {
|
||||
negotiatedVersionNumber [0] IMPLICIT Integer16,
|
||||
negotiatedParameterCBB [1] IMPLICIT ParameterSupportOptions,
|
||||
servicesSupportedCalled [2] IMPLICIT ServiceSupportOptions
|
||||
}
|
||||
}
|
||||
|
||||
Initiate-ErrorPDU ::= ServiceError
|
||||
|
||||
Conclude-RequestPDU ::= NULL
|
||||
|
||||
|
||||
RejectPDU ::= SEQUENCE
|
||||
{
|
||||
originalInvokeID [0] IMPLICIT Unsigned32 OPTIONAL,
|
||||
rejectReason CHOICE
|
||||
{
|
||||
confirmed-requestPDU [1] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- unrecognized-service (1),
|
||||
-- unrecognized-modifier (2),
|
||||
-- invalid-invokeID (3),
|
||||
-- invalid-argument (4),
|
||||
-- invalid-modifier (5),
|
||||
-- max-serv-outstanding-exceeded (6),
|
||||
-- max-recursion-exceeded (8),
|
||||
-- value-out-of-range (9)
|
||||
-- },
|
||||
|
||||
confirmed-responsePDU [2] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- unrecognized-service (1),
|
||||
-- invalid-invokeID (2),
|
||||
-- invalid-result (3),
|
||||
-- max-recursion-exceeded (5),
|
||||
-- value-out-of-range (6)
|
||||
-- },
|
||||
|
||||
confirmed-errorPDU [3] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- unrecognized-service (1),
|
||||
-- invalid-invokeID (2),
|
||||
-- invalid-serviceError (3),
|
||||
-- value-out-of-range (4)
|
||||
-- } ,
|
||||
|
||||
unconfirmedPDU [4] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- unrecognized-service (1),
|
||||
-- invalid-argument (2),
|
||||
-- max-recursion-exceeded (3),
|
||||
-- value-out-of-range (4)
|
||||
-- },
|
||||
|
||||
pdu-error [5] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- unknown-pdu-type (0),
|
||||
-- invalid-pdu (1),
|
||||
-- illegal-acse-mapping (2)
|
||||
-- },
|
||||
|
||||
cancel-requestPDU [6] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invalid-invokeID (1)
|
||||
-- },
|
||||
|
||||
cancel-responsePDU [7] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invalid-invokeID (1)
|
||||
-- },
|
||||
|
||||
cancel-errorPDU [8] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invalid-invokeID (1),
|
||||
-- invalid-serviceError (2),
|
||||
-- value-out-of-range (3)
|
||||
-- },
|
||||
|
||||
conclude-requestPDU [9] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invalid-argument (1)
|
||||
-- },
|
||||
|
||||
conclude-responsePDU [10] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invalid-result (1)
|
||||
-- },
|
||||
|
||||
conclude-errorPDU [11] IMPLICIT INTEGER
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invalid-serviceError (1),
|
||||
-- value-out-of-range (2)
|
||||
-- }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GetNameList-Request ::= SEQUENCE {
|
||||
objectClass [0] ObjectClass,
|
||||
objectScope [1] CHOICE {
|
||||
vmdSpecific [0] IMPLICIT NULL,
|
||||
domainSpecific [1] IMPLICIT Identifier,
|
||||
aaSpecific [2] IMPLICIT NULL
|
||||
},
|
||||
continueAfter [2] IMPLICIT Identifier OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
GetNameList-Response ::= SEQUENCE {
|
||||
listOfIdentifier [0] IMPLICIT SEQUENCE OF Identifier,
|
||||
moreFollows [1] IMPLICIT BOOLEAN DEFAULT TRUE
|
||||
}
|
||||
|
||||
|
||||
TypeSpecification ::= CHOICE {
|
||||
-- typeName [0] ObjectName,
|
||||
typeDescription TypeDescription
|
||||
}
|
||||
|
||||
AlternateAccess ::= SEQUENCE OF CHOICE {
|
||||
unnamed AlternateAccessSelection
|
||||
-- named [5] IMPLICIT SEQUENCE {
|
||||
-- componentName [0] CHOICE {
|
||||
-- basic BasicIdentifier,
|
||||
-- extended ExtendedIdentifier
|
||||
-- },
|
||||
-- access AlternateAccessSelection
|
||||
-- }
|
||||
}
|
||||
|
||||
AlternateAccessSelection ::= CHOICE {
|
||||
|
||||
selectAlternateAccess [0] IMPLICIT SEQUENCE {
|
||||
accessSelection CHOICE {
|
||||
component [0] CHOICE {
|
||||
basic BasicIdentifier --,
|
||||
--extended ExtendedIdentifier
|
||||
}, -- component
|
||||
index [1] IMPLICIT Unsigned32, -- 1 array element
|
||||
indexRange [2] IMPLICIT SEQUENCE { -- array elements
|
||||
lowIndex [0] IMPLICIT Unsigned32,
|
||||
numberOfElements [1] IMPLICIT Unsigned32
|
||||
},
|
||||
allElements [3] IMPLICIT NULL -- all array elements
|
||||
},
|
||||
alternateAccess AlternateAccess
|
||||
},
|
||||
selectAccess CHOICE {
|
||||
component [1] CHOICE {
|
||||
basic BasicIdentifier --,
|
||||
--extended ExtendedIdentifier
|
||||
}, -- component
|
||||
index [2] IMPLICIT Unsigned32, -- 1 array element
|
||||
indexRange [3] IMPLICIT SEQUENCE { -- array elements
|
||||
lowIndex [0] IMPLICIT Unsigned32,
|
||||
numberOfElements [1] IMPLICIT Unsigned32
|
||||
},
|
||||
allElements [4] IMPLICIT NULL -- all array elements
|
||||
}
|
||||
}
|
||||
|
||||
AccessResult ::= CHOICE {
|
||||
failure [0] IMPLICIT DataAccessError,
|
||||
success Data
|
||||
}
|
||||
|
||||
|
||||
Data ::= CHOICE {
|
||||
-- context tag 0 is reserved for AccessResult
|
||||
array [1] IMPLICIT SEQUENCE OF Data,
|
||||
structure [2] IMPLICIT SEQUENCE OF Data,
|
||||
--boolean [3] IMPLICIT BOOLEAN,
|
||||
bool [3] IMPLICIT BOOLEAN,
|
||||
bit-string [4] IMPLICIT BIT STRING,
|
||||
integer [5] IMPLICIT INTEGER,
|
||||
unsigned [6] IMPLICIT INTEGER, -- shall not be negative
|
||||
floating-point [7] IMPLICIT FloatingPoint,
|
||||
-- [8] is reserved
|
||||
octet-string [9] IMPLICIT OCTET STRING,
|
||||
visible-string [10] IMPLICIT VisibleString,
|
||||
--generalized-time [11] IMPLICIT GeneralizedTime,
|
||||
binary-time [12] IMPLICIT TimeOfDay,
|
||||
--bcd [13] IMPLICIT INTEGER, ---- shall not be negative
|
||||
--booleanArray [14] IMPLICIT BIT STRING,
|
||||
--objId [15] IMPLICIT OBJECT IDENTIFIER,
|
||||
--...,
|
||||
mMSString [16] IMPLICIT MMSString,
|
||||
utc-time [17] IMPLICIT UtcTime -- added by IEC61850 8.1 G3
|
||||
}
|
||||
|
||||
|
||||
FloatingPoint ::= OCTET STRING
|
||||
|
||||
DataAccessError ::= INTEGER
|
||||
--{
|
||||
-- object-invalidated (0),
|
||||
-- hardware-fault (1),
|
||||
-- temporarily-unavailable (2),
|
||||
-- object-access-denied (3),
|
||||
-- object-undefined (4),
|
||||
-- invalid-address (5),
|
||||
-- type-unsupported (6),
|
||||
-- type-inconsistent (7),
|
||||
-- object-attribute-inconsistent (8),
|
||||
-- object-access-unsupported (9),
|
||||
-- object-non-existent (10),
|
||||
-- object-value-invalid (11)
|
||||
--}
|
||||
|
||||
|
||||
VariableAccessSpecification ::= CHOICE {
|
||||
listOfVariable [0] IMPLICIT VariableDefs,
|
||||
variableListName [1] ObjectName
|
||||
}
|
||||
|
||||
VariableDefs ::= SEQUENCE OF SEQUENCE {
|
||||
variableSpecification VariableSpecification,
|
||||
alternateAccess [5] IMPLICIT AlternateAccess OPTIONAL
|
||||
}
|
||||
|
||||
VariableSpecification ::= CHOICE {
|
||||
name [0] ObjectName
|
||||
-- address [1] Address,
|
||||
-- variableDescription [2] IMPLICIT SEQUENCE {
|
||||
-- address Address,
|
||||
-- typeSpecificationTypeSpecification
|
||||
-- },
|
||||
|
||||
-- the following element is present only to support the services
|
||||
-- defined in annex E
|
||||
-- scatteredAccessDescription [3] IMPLICIT ScatteredAccessDescription,
|
||||
-- invalidated [4] IMPLICIT NULL
|
||||
}
|
||||
|
||||
Read-Request ::= SEQUENCE {
|
||||
specificationWithResult [0] IMPLICIT BOOLEAN DEFAULT FALSE,
|
||||
variableAccessSpecification [1] VariableAccessSpecification
|
||||
}
|
||||
|
||||
Read-Response ::= SEQUENCE {
|
||||
variableAccessSpecification [0] VariableAccessSpecification OPTIONAL,
|
||||
listOfAccessResult [1] IMPLICIT SEQUENCE OF AccessResult
|
||||
}
|
||||
|
||||
Write-Request ::= SEQUENCE {
|
||||
variableAccessSpecification VariableAccessSpecification,
|
||||
listOfData [0] IMPLICIT SEQUENCE OF Data
|
||||
}
|
||||
|
||||
Write-Response ::= SEQUENCE OF CHOICE {
|
||||
failure [0] IMPLICIT DataAccessError,
|
||||
success [1] IMPLICIT NULL
|
||||
}
|
||||
|
||||
InformationReport ::= SEQUENCE {
|
||||
variableAccessSpecification VariableAccessSpecification,
|
||||
listOfAccessResult [0] IMPLICIT SEQUENCE OF AccessResult
|
||||
}
|
||||
|
||||
GetVariableAccessAttributes-Request ::= CHOICE {
|
||||
name [0] ObjectName
|
||||
-- address [1] Address
|
||||
}
|
||||
|
||||
GetVariableAccessAttributes-Response ::= SEQUENCE {
|
||||
mmsDeletable [0] IMPLICIT BOOLEAN,
|
||||
-- address [1] Address OPTIONAL,
|
||||
typeDescription [2] TypeDescription
|
||||
-- accessControlList [3] CHOICE {
|
||||
-- basic BasicIdentifier,
|
||||
-- extended ExtendedIdentifier
|
||||
-- } OPTIONAL,
|
||||
-- meaning [4] ObjectName OPTIONAL
|
||||
}
|
||||
|
||||
DefineNamedVariableList-Request ::= SEQUENCE {
|
||||
variableListName ObjectName,
|
||||
listOfVariable [0] IMPLICIT VariableDefs
|
||||
}
|
||||
|
||||
DefineNamedVariableList-Response ::= NULL
|
||||
|
||||
GetNamedVariableListAttributes-Request ::= ObjectName -- VariableListName
|
||||
|
||||
GetNamedVariableListAttributes-Response ::= SEQUENCE {
|
||||
mmsDeletable [0] IMPLICIT BOOLEAN,
|
||||
listOfVariable [1] IMPLICIT VariableDefs
|
||||
-- accessControlList [2] CHOICE {
|
||||
-- basic BasicIdentifier,
|
||||
-- extended ExtendedIdentifier
|
||||
-- } OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
DeleteNamedVariableList-Request ::= SEQUENCE {
|
||||
scopeOfDelete [0] IMPLICIT INTEGER DEFAULT 0,
|
||||
-- {
|
||||
-- specific (0),
|
||||
-- aa-specific (1),
|
||||
-- domain (2),
|
||||
-- vmd (3)
|
||||
-- } DEFAULT specific,
|
||||
listOfVariableListName [1] IMPLICIT SEQUENCE OF ObjectName OPTIONAL,
|
||||
domainName [2] CHOICE {
|
||||
basic BasicIdentifier --,
|
||||
--extended ExtendedIdentifier
|
||||
} OPTIONAL
|
||||
}
|
||||
|
||||
DeleteNamedVariableList-Response ::= SEQUENCE {
|
||||
numberMatched [0] IMPLICIT Unsigned32,
|
||||
numberDeleted [1] IMPLICIT Unsigned32
|
||||
}
|
||||
|
||||
TypeDescription ::= CHOICE {
|
||||
array [1] IMPLICIT SEQUENCE {
|
||||
packed [0] IMPLICIT BOOLEAN DEFAULT FALSE,
|
||||
numberOfElements [1] IMPLICIT Unsigned32,
|
||||
elementType [2] TypeSpecification
|
||||
},
|
||||
structure [2] IMPLICIT SEQUENCE {
|
||||
packed [0] IMPLICIT BOOLEAN DEFAULT FALSE,
|
||||
components [1] IMPLICIT SEQUENCE OF SEQUENCE {
|
||||
componentName [0] IMPLICIT Identifier OPTIONAL,
|
||||
componentType [1] TypeSpecification
|
||||
}
|
||||
},
|
||||
|
||||
-- Simple Size Class
|
||||
--boolean [3] IMPLICIT NULL,
|
||||
bool [3] IMPLICIT NULL,
|
||||
bit-string [4] IMPLICIT Integer32, -- BIT-STRING
|
||||
integer [5] IMPLICIT Unsigned8, -- INTEGER
|
||||
unsigned [6] IMPLICIT Unsigned8, -- UNSIGNED
|
||||
floating-point [7] IMPLICIT SEQUENCE {
|
||||
format-width Unsigned8, -- number of bits of
|
||||
-- floating point value
|
||||
-- including sign, exponent,
|
||||
-- and fraction
|
||||
exponent-width Unsigned8 -- size of exponent in bits
|
||||
},
|
||||
|
||||
-- [8] is reserved
|
||||
octet-string [9] IMPLICIT Integer32, -- OCTET-STRING
|
||||
visible-string [10] IMPLICIT Integer32, -- VISIBLE-STRING
|
||||
-- generalized-time [11] IMPLICIT NULL, ---- GENERALIZED-TIME
|
||||
binary-time [12] IMPLICIT BOOLEAN, -- BINARY-TIME
|
||||
-- bcd [13] IMPLICIT Unsigned8, ---- BCD
|
||||
-- objId [15] IMPLICIT NULL,
|
||||
--...,
|
||||
mMSString [16] IMPLICIT Integer32, -- MMS String
|
||||
utc-time [17] IMPLICIT NULL -- from IEC61850 8.1 G.2
|
||||
}
|
||||
|
||||
UtcTime ::= OCTET STRING (SIZE (8))
|
||||
|
||||
|
||||
ParameterSupportOptions ::= BIT STRING
|
||||
--{
|
||||
-- str1 (0), str2 (1), vnam (2), valt (3), vadr (4), vsca (5), tpy (6), vlis (7), real (8), cei (10)
|
||||
--}
|
||||
|
||||
ServiceSupportOptions ::= BIT STRING
|
||||
-- {
|
||||
-- status (0),
|
||||
-- getNameList (1),
|
||||
-- identify (2),
|
||||
-- rename (3),
|
||||
-- read (4),
|
||||
-- write (5),
|
||||
-- getVariableAccessAttributes (6),
|
||||
-- defineNamedVariable (7),
|
||||
-- defineScatteredAccess (8),
|
||||
-- getScatteredAccessAttributes (9),
|
||||
-- deleteVariableAccess (10),
|
||||
-- defineNamedVariableList (11),
|
||||
-- getNamedVariableListAttributes (12),
|
||||
-- deleteNamedVariableList (13),
|
||||
-- defineNamedType (14),
|
||||
-- getNamedTypeAttributes (15),
|
||||
-- deleteNamedType (16),
|
||||
-- input (17),
|
||||
-- output (18),
|
||||
-- takeControl (19),
|
||||
-- relinquishControl (20),
|
||||
-- defineSemaphore (21),
|
||||
-- deleteSemaphore (22),
|
||||
-- reportSemaphoreStatus (23),
|
||||
-- reportPoolSemaphoreStatus (24),
|
||||
-- reportSemaphoreEntryStatus (25),
|
||||
-- initiateDownloadSequence (26),
|
||||
-- downloadSegment (27),
|
||||
-- terminateDownloadSequence (28),
|
||||
-- initiateUploadSequence (29),
|
||||
-- uploadSegment (30),
|
||||
-- terminateUploadSequence (31),
|
||||
-- requestDomainDownload (32),
|
||||
-- requestDomainUpload (33),
|
||||
-- loadDomainContent (34),
|
||||
-- storeDomainContent (35),
|
||||
-- deleteDomain (36),
|
||||
-- getDomainAttributes (37),
|
||||
-- createProgramInvocation (38),
|
||||
-- deleteProgramInvocation (39),
|
||||
-- start (40),
|
||||
-- stop (41),
|
||||
-- resume (42),
|
||||
-- reset (43),
|
||||
-- kill (44),
|
||||
-- getProgramInvocationAttributes (45),
|
||||
-- obtainFile (46),
|
||||
-- defineEventCondition (47),
|
||||
-- deleteEventCondition (48),
|
||||
-- getEventConditionAttributes (49),
|
||||
-- reportEventConditionStatus (50),
|
||||
-- alterEventConditionMonitoring (51),
|
||||
-- triggerEvent (52),
|
||||
-- defineEventAction (53),
|
||||
-- deleteEventAction (54),
|
||||
-- getEventActionAttributes (55),
|
||||
-- reportEventActionStatus (56),
|
||||
-- defineEventEnrollment (57),
|
||||
-- deleteEventEnrollment (58),
|
||||
-- alterEventEnrollment (59),
|
||||
-- reportEventEnrollmentStatus (60),
|
||||
-- getEventEnrollmentAttributes (61),
|
||||
-- acknowledgeEventNotification (62),
|
||||
-- getAlarmSummary (63),
|
||||
-- getAlarmEnrollmentSummary (64),
|
||||
-- readJournal (65),
|
||||
-- writeJournal (66),
|
||||
-- initializeJournal (67),
|
||||
-- reportJournalStatus (68),
|
||||
-- createJournal (69),
|
||||
-- deleteJournal (70),
|
||||
-- getCapabilityList (71),
|
||||
-- fileOpen (72),
|
||||
-- fileRead (73),
|
||||
-- fileClose (74),
|
||||
-- fileRename (75),
|
||||
-- fileDelete (76),
|
||||
-- fileDirectory (77),
|
||||
-- unsolicitedStatus (78),
|
||||
-- informationReport (79),
|
||||
-- eventNotification (80),
|
||||
-- attachToEventCondition (81),
|
||||
-- attachToSemaphore (82),
|
||||
-- conclude (83),
|
||||
-- cancel (84)
|
||||
-- }
|
||||
|
||||
|
||||
|
||||
END
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,318 @@
|
||||
MMSDEF DEFINITIONS::=
|
||||
BEGIN
|
||||
|
||||
MMSpdu ::= CHOICE {
|
||||
confirmed_RequestPDU [0] IMPLICIT Confirmed_RequestPDU,
|
||||
confirmed_ResponsePDU [1] IMPLICIT Confirmed_ResponsePDU,
|
||||
initiate_RequestPDU [8] IMPLICIT Initiate_RequestPDU,
|
||||
initiate_ResponsePDU [9] IMPLICIT Initiate_ResponsePDU
|
||||
}
|
||||
|
||||
Initiate_RequestPDU ::= SEQUENCE {
|
||||
localDetailCalling [0] IMPLICIT Integer32 OPTIONAL,
|
||||
proposedMaxServOutstandingCalling [1] IMPLICIT Integer16,
|
||||
proposedMaxServOutstandingCalled [2] IMPLICIT Integer16,
|
||||
proposedDataStructureNestingLevel [3] IMPLICIT Integer8 OPTIONAL,
|
||||
initRequestDetail [4] IMPLICIT SEQUENCE {
|
||||
proposedVersionNumber [0] IMPLICIT Integer16,
|
||||
proposedParameterCBB [1] IMPLICIT ParameterSupportOptions,
|
||||
servicesSupportedCalling [2] IMPLICIT ServiceSupportOptions
|
||||
}
|
||||
}
|
||||
|
||||
Initiate_ResponsePDU ::= SEQUENCE {
|
||||
localDetailCalled [0] IMPLICIT Integer32 OPTIONAL,
|
||||
negotiatedMaxServOutstandingCalling [1] IMPLICIT Integer16,
|
||||
negotiatedMaxServOutstandingCalled [2] IMPLICIT Integer16,
|
||||
negotiatedDataStructureNestingLevel [3] IMPLICIT Integer8 OPTIONAL,
|
||||
initResponseDetail [4] IMPLICIT SEQUENCE {
|
||||
negotiatedVersionNumber [0] IMPLICIT Integer16,
|
||||
negotiatedParameterCBB [1] IMPLICIT ParameterSupportOptions,
|
||||
servicesSupportedCalled [2] IMPLICIT ServiceSupportOptions
|
||||
}
|
||||
}
|
||||
|
||||
ParameterSupportOptions ::= BIT STRING {
|
||||
|
||||
str1 (0),
|
||||
str2 (1),
|
||||
vnam (2),
|
||||
valt (3),
|
||||
vadr (4),
|
||||
-- bit 5 is reserved
|
||||
vsca (5),
|
||||
tpy (6),
|
||||
vlis (7),
|
||||
-- bit 8 is reserved
|
||||
-- bit 9 is reserved
|
||||
cei (10),
|
||||
aco (11),
|
||||
sem (12),
|
||||
csr (13),
|
||||
csnc (14),
|
||||
csplc (15),
|
||||
cspi (16)
|
||||
}
|
||||
|
||||
ServiceSupportOptions ::= BIT STRING {
|
||||
status (0),
|
||||
getNameList (1),
|
||||
identify (2),
|
||||
rename (3),
|
||||
read (4),
|
||||
write (5),
|
||||
getVariableAccessAttributes (6),
|
||||
defineNamedVariable (7),
|
||||
-- bit 8 is reserved for use of a service defined in annex E
|
||||
defineScatteredAccess (8),
|
||||
-- bit 9 is reserved for use of a service defined in annex E
|
||||
getScatteredAccessAttributes (9),
|
||||
deleteVariableAccess (10),
|
||||
defineNamedVariableList (11),
|
||||
getNamedVariableListAttributes (12),
|
||||
deleteNamedVariableList (13),
|
||||
defineNamedType (14),
|
||||
getNamedTypeAttributes (15),
|
||||
deleteNamedType (16),
|
||||
input (17),
|
||||
output (18),
|
||||
takeControl (19),
|
||||
relinquishControl (20),
|
||||
defineSemaphore (21),
|
||||
deleteSemaphore (22),
|
||||
reportSemaphoreStatus (23),
|
||||
reportPoolSemaphoreStatus (24),
|
||||
reportSemaphoreEntryStatus (25),
|
||||
initiateDownloadSequence (26),
|
||||
downloadSegment (27),
|
||||
terminateDownloadSequence (28),
|
||||
initiateUploadSequence (29),
|
||||
uploadSegment (30),
|
||||
terminateUploadSequence (31),
|
||||
requestDomainDownload (32),
|
||||
requestDomainUpload (33),
|
||||
loadDomainContent (34),
|
||||
storeDomainContent (35),
|
||||
deleteDomain (36),
|
||||
getDomainAttributes (37),
|
||||
createProgramInvocation (38),
|
||||
deleteProgramInvocation (39),
|
||||
start (40),
|
||||
stop (41),
|
||||
resume (42),
|
||||
reset (43),
|
||||
kill (44),
|
||||
getProgramInvocationAttributes (45),
|
||||
obtainFile (46),
|
||||
defineEventCondition (47),
|
||||
deleteEventCondition (48),
|
||||
getEventConditionAttributes (49),
|
||||
reportEventConditionStatus (50),
|
||||
alterEventConditionMonitoring (51),
|
||||
triggerEvent (52),
|
||||
defineEventAction (53),
|
||||
deleteEventAction (54),
|
||||
getEventActionAttributes (55),
|
||||
reportEventActionStatus (56),
|
||||
defineEventEnrollment (57),
|
||||
deleteEventEnrollment (58),
|
||||
alterEventEnrollment (59),
|
||||
reportEventEnrollmentStatus (60),
|
||||
getEventEnrollmentAttributes (61),
|
||||
acknowledgeEventNotification (62),
|
||||
getAlarmSummary (63),
|
||||
getAlarmEnrollmentSummary (64),
|
||||
readJournal (65),
|
||||
writeJournal (66),
|
||||
initializeJournal (67),
|
||||
reportJournalStatus (68),
|
||||
createJournal (69),
|
||||
deleteJournal (70),
|
||||
getCapabilityList (71),
|
||||
-- bit 72 is reserved for use of a service defined in annex D
|
||||
fileOpen (72),
|
||||
-- bit 73 is reserved for use of a service defined in annex D
|
||||
fileRead (73),
|
||||
-- bit 74 is reserved for use of a service defined in annex D
|
||||
fileClose (74),
|
||||
-- bit 75 is reserved for use of a service defined in annex D
|
||||
fileRename (75),
|
||||
-- bit 76 is reserved for use of a service defined in annex D
|
||||
fileDelete (76),
|
||||
-- bit 77 is reserved for use of a service defined in annex D
|
||||
fileDirectory (77),
|
||||
unsolicitedStatus (78),
|
||||
informationReport (79),
|
||||
eventNotification (80),
|
||||
attachToEventCondition (81),
|
||||
attachToSemaphore (82),
|
||||
conclude (83),
|
||||
cancel (84),
|
||||
getDataExchangeAttributes (85),
|
||||
-- Shall not appear in minor version one
|
||||
exchangeData (86),
|
||||
-- Shall not appear in minor version one
|
||||
defineAccessControlList (87),
|
||||
-- Shall not appear in minor version one or two
|
||||
getAccessControlListAttributes (88),
|
||||
-- Shall not appear in minor version one or two
|
||||
reportAccessControlledObjects (89),
|
||||
-- Shall not appear in minor version one or two
|
||||
deleteAccessControlList (90),
|
||||
-- Shall not appear in minor version one or two
|
||||
alterAccessControl (91),
|
||||
-- Shall not appear in minor version one or two
|
||||
reconfigureProgramInvocation (92)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Confirmed_RequestPDU ::= SEQUENCE {
|
||||
invokeID Unsigned32,
|
||||
service ConfirmedServiceRequest
|
||||
}
|
||||
|
||||
Confirmed_ResponsePDU ::= SEQUENCE {
|
||||
invokeID Unsigned32,
|
||||
service ConfirmedServiceResponse
|
||||
}
|
||||
|
||||
GetNameList_Response ::= SEQUENCE {
|
||||
listOfIdentifier [0] IMPLICIT SEQUENCE OF Identifier,
|
||||
moreFollows [1] IMPLICIT BOOLEAN DEFAULT TRUE
|
||||
}
|
||||
|
||||
|
||||
|
||||
Integer8 ::= INTEGER(-128..127) -- range -128 <= i <= 127
|
||||
Integer16 ::= INTEGER(-32768..32767) -- range -32,768 <= i <= 32,767
|
||||
Integer32 ::= INTEGER(-2147483648..2147483647) -- range -2**31 <= i < 2**31
|
||||
Unsigned8 ::= INTEGER
|
||||
|
||||
Unsigned16 ::= INTEGER(0..32767) -- range 0 <= i <= 32767
|
||||
|
||||
Unsigned32 ::= INTEGER(0..2147483647) -- range 0 <= i <= 2**31 - 1
|
||||
|
||||
ConfirmedServiceRequest ::= CHOICE {
|
||||
getNameList [1] IMPLICIT GetNameList_Request,
|
||||
getVariableAccessAttributes [6] GetVariableAccessAttributes_Request
|
||||
}
|
||||
|
||||
GetVariableAccessAttributes_Request ::= CHOICE
|
||||
{
|
||||
name [0] ObjectName,
|
||||
address [1] Address
|
||||
}
|
||||
|
||||
ObjectName ::= CHOICE
|
||||
{
|
||||
vmd_specific [0] IMPLICIT Identifier,
|
||||
domain_specific [1] IMPLICIT SEQUENCE
|
||||
{
|
||||
domainId Identifier,
|
||||
itemId Identifier
|
||||
},
|
||||
aa_specific [2] IMPLICIT Identifier
|
||||
}
|
||||
|
||||
Address ::= CHOICE
|
||||
{
|
||||
numericAddress [0] IMPLICIT Unsigned32,
|
||||
symbolicAddress [1] IMPLICIT VisibleString,
|
||||
unconstrainedAddress [2] IMPLICIT OCTET STRING
|
||||
}
|
||||
|
||||
|
||||
|
||||
ConfirmedServiceResponse ::= CHOICE {
|
||||
getNameList [1] IMPLICIT GetNameList_Response,
|
||||
getVariableAccessAttributes [6] IMPLICIT GetVariableAccessAttributes_Response
|
||||
}
|
||||
|
||||
GetVariableAccessAttributes_Response ::= SEQUENCE
|
||||
{
|
||||
mmsDeletable [0] IMPLICIT BOOLEAN,
|
||||
address [1] Address OPTIONAL,
|
||||
typeSpecification [2] TypeSpecification
|
||||
}
|
||||
|
||||
TypeSpecification ::= CHOICE
|
||||
{
|
||||
typeName [0] ObjectName,
|
||||
array [1] IMPLICIT SEQUENCE
|
||||
{
|
||||
packed [0] IMPLICIT BOOLEAN DEFAULT FALSE,
|
||||
numberOfElements [1] IMPLICIT Unsigned32,
|
||||
elementType [2] TypeSpecification
|
||||
},
|
||||
structure [2] IMPLICIT SEQUENCE
|
||||
{
|
||||
packed [0] IMPLICIT BOOLEAN DEFAULT FALSE,
|
||||
components [1] IMPLICIT SEQUENCE OF StructComponent
|
||||
},
|
||||
|
||||
-- Simple Type -------- Size ---------
|
||||
tboolean [3] IMPLICIT NULL,
|
||||
bit_string [4] IMPLICIT Integer32,
|
||||
integer [5] IMPLICIT Unsigned8,
|
||||
unsigned [6] IMPLICIT Unsigned8,
|
||||
floating_point [7] IMPLICIT SEQUENCE {
|
||||
|
||||
format_width Unsigned8, -- number of bits of
|
||||
-- floating point value
|
||||
-- including sign, exponent,
|
||||
-- and fraction
|
||||
exponent_width Unsigned8 -- size of exponent in bits
|
||||
},
|
||||
octet_string [9] IMPLICIT Integer32,
|
||||
visible_string [10] IMPLICIT Integer32,
|
||||
generalized_time [11] IMPLICIT NULL,
|
||||
binary_time [12] IMPLICIT BOOLEAN,
|
||||
bcd [13] IMPLICIT Unsigned8,
|
||||
objId [15] IMPLICIT NULL,
|
||||
mMSString [16] Integer32,
|
||||
-- added by stefan
|
||||
timestamp [17] IMPLICIT NULL
|
||||
}
|
||||
|
||||
StructComponent ::= SEQUENCE
|
||||
{
|
||||
componentName [0] IMPLICIT Identifier OPTIONAL,
|
||||
componentType [1] TypeSpecification
|
||||
}
|
||||
|
||||
|
||||
GetNameList_Request ::= SEQUENCE {
|
||||
objectClass [0] ObjectClass,
|
||||
objectScope [1] CHOICE {
|
||||
vmdSpecific [0] IMPLICIT NULL,
|
||||
domainSpecific [1] IMPLICIT Identifier
|
||||
},
|
||||
continueAfter [2] IMPLICIT Identifier OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
|
||||
Identifier ::= VisibleString
|
||||
|
||||
ObjectClass ::= CHOICE {
|
||||
|
||||
basicObjectClass [0] IMPLICIT INTEGER {
|
||||
namedVariable (0),
|
||||
scatteredAccess (1),
|
||||
namedVariableList (2),
|
||||
namedType (3),
|
||||
semaphore (4),
|
||||
eventCondition (5),
|
||||
eventAction (6),
|
||||
eventEnrollment (7),
|
||||
journal (8),
|
||||
domain (9),
|
||||
programInvocation (10),
|
||||
operatorStation (11),
|
||||
dataExchange (12), -- Shall not appear in minor version 1
|
||||
accessControlList (13) -- Shall not appear in minor version 1 or 2
|
||||
}
|
||||
}
|
||||
|
||||
END
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,297 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven {
|
||||
url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath "net.saliman:gradle-cobertura-plugin:2.2.8"
|
||||
classpath group: "org.asciidoctor", name: "asciidoctorj-pdf", version: "1.5.0-alpha.11"
|
||||
classpath "biz.aQute.bnd:biz.aQute.bnd.gradle:3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "org.sonarqube" version "1.0"
|
||||
id "org.asciidoctor.convert" version "1.5.3"
|
||||
}
|
||||
|
||||
apply plugin: "org.asciidoctor.convert"
|
||||
apply from: "configuration.gradle"
|
||||
|
||||
asciidoctor {
|
||||
backends = ["pdf", "html5"]
|
||||
attributes "stylesheet": "openmuc-asciidoc.css",
|
||||
"toc2": "left",
|
||||
"sampleSrc": file("src/sample/java"),
|
||||
"source-highlighter" : "coderay",
|
||||
"pdf-stylesdir": "./",
|
||||
"pdf-style": "pdf"
|
||||
|
||||
resources {
|
||||
from("$sourceDir") {
|
||||
include "images/**"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configure(allprojects) {
|
||||
version = cfgVersion
|
||||
}
|
||||
|
||||
configure(javaProjects) {
|
||||
|
||||
apply plugin: "java"
|
||||
apply plugin: "eclipse"
|
||||
apply plugin: "osgi"
|
||||
apply plugin: "maven"
|
||||
apply plugin: "signing"
|
||||
apply plugin: "net.saliman.cobertura"
|
||||
apply plugin: "biz.aQute.bnd.builder"
|
||||
|
||||
uploadArchives.enabled = false
|
||||
|
||||
group = cfgGroup
|
||||
|
||||
if (!project.properties.containsKey("cfgJavaVersion")) {
|
||||
project.ext {
|
||||
cfgJavaVersion = "1.7"
|
||||
}
|
||||
}
|
||||
|
||||
sourceCompatibility = cfgJavaVersion
|
||||
targetCompatibility = cfgJavaVersion
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
sample
|
||||
itest {
|
||||
compileClasspath += sourceSets.main.runtimeClasspath
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile group: "junit", name: "junit", version: "4.12"
|
||||
itestCompile group: "junit", name: "junit", version: "4.12"
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
version = project.version.replace("-",".");
|
||||
}
|
||||
}
|
||||
|
||||
cobertura {
|
||||
|
||||
dependencies {
|
||||
testCompile "org.slf4j:slf4j-simple:1.6.1"
|
||||
}
|
||||
coverageFormats = ["html", "xml"]
|
||||
coverageIgnoreTrivial = true
|
||||
coverageIgnores = ["org.slf4j.Logger.*"]
|
||||
coverageReportDir = new File("$buildDir/reports/cobertura")
|
||||
coverageTestTasks {
|
||||
project.tasks.withType(Test).matching {it.name == "test"}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sonarqube {
|
||||
properties {
|
||||
property "sonar.exclusions", "src/main/java-gen/**/*,**/app/**/*"
|
||||
property "sonar.java.coveragePlugin", "cobertura"
|
||||
property "sonar.cobertura.reportPath", "build/reports/cobertura/coverage.xml"
|
||||
}
|
||||
}
|
||||
|
||||
task jarAll(type: Copy) {
|
||||
dependsOn(configurations.default.getAllArtifacts().getBuildDependencies())
|
||||
|
||||
//only the jar file created:
|
||||
from configurations.default.getAllArtifacts().getFiles()
|
||||
|
||||
if (cfgCopyDependencies) {
|
||||
if (cfgCopyToRoot) {
|
||||
into rootDir.getPath() + "/build/libs-all"
|
||||
}
|
||||
else {
|
||||
into "build/libs-all"
|
||||
}
|
||||
//includes all the dependencies:
|
||||
from configurations.default
|
||||
}
|
||||
else {
|
||||
if (cfgCopyToRoot) {
|
||||
into rootDir.getPath() + "/build/libs-all"
|
||||
}
|
||||
else {
|
||||
into "build/libs-all"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn {asciidoctor}
|
||||
build.dependsOn {jarAll}
|
||||
|
||||
eclipse.pathVariables([GRADLE_USER_HOME:file(gradle.gradleUserHomeDir)])
|
||||
tasks.eclipse.dependsOn(cleanEclipse)
|
||||
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = "sources"
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = "javadoc"
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
}
|
||||
|
||||
javadoc {
|
||||
exclude "**/internal/**"
|
||||
exclude "**/java-gen/**"
|
||||
exclude "**/app/**"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
configure(repositoryProjects) {
|
||||
|
||||
uploadArchives.enabled = true
|
||||
|
||||
if (cfgSignPom) {
|
||||
signing {
|
||||
if ( project.hasProperty("signing.keyId") ) {
|
||||
sign configurations.archives
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
|
||||
if (cfgSignPom) {
|
||||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
||||
}
|
||||
|
||||
repository(url: cfgRepository) {
|
||||
authentication(userName: cfgRepositoryUser, password: cfgRepositoryPass)
|
||||
if (cfgRepository != null && System.getProperty("https.proxyHost") != null && ((System.getProperty("https.nonProxyHosts") == null) || !cfgRepository.contains(System.getProperty("https.nonProxyHosts")))) {
|
||||
proxy(host: System.getProperty("https.proxyHost"), port: Integer.parseInt(System.getProperty("https.proxyPort")), type: "https")
|
||||
}
|
||||
}
|
||||
snapshotRepository(url: cfgSnapshotRepository) {
|
||||
authentication(userName: cfgRepositoryUser, password: cfgRepositoryPass)
|
||||
if (cfgSnapshotRepository != null && System.getProperty("https.proxyHost") != null && ((System.getProperty("https.nonProxyHosts") == null) || !cfgSnapshotRepository.contains(System.getProperty("https.nonProxyHosts")))) {
|
||||
proxy(host: System.getProperty("https.proxyHost"), port: Integer.parseInt(System.getProperty("https.proxyPort")), type: "https")
|
||||
}
|
||||
}
|
||||
|
||||
pom.project {
|
||||
|
||||
//additional pom information can be found in subproject build.gradle files
|
||||
|
||||
packaging "jar"
|
||||
url "http://www.openmuc.org/"
|
||||
|
||||
scm {
|
||||
url "none"
|
||||
connection "none"
|
||||
}
|
||||
|
||||
developers {
|
||||
developer {
|
||||
id "openmuc"
|
||||
name "OpenMUC Team"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task javadocAll(type: Javadoc) {
|
||||
|
||||
source docProjects.collect {
|
||||
project -> project.sourceSets.main.allJava
|
||||
}
|
||||
|
||||
exclude "**/internal/**"
|
||||
exclude "**/java-gen/**"
|
||||
exclude "**/app/**"
|
||||
|
||||
destinationDir = new File(buildDir, "docs/javadoc-all")
|
||||
|
||||
classpath = files(distributionProjects.collect { project ->
|
||||
project.sourceSets.main.compileClasspath })
|
||||
|
||||
classpath += files(distributionProjects.collect { project ->
|
||||
project.sourceSets.main.output })
|
||||
}
|
||||
|
||||
|
||||
task writeSettings {
|
||||
doLast {
|
||||
Writer out = new OutputStreamWriter(new FileOutputStream("build/settings.gradle"));
|
||||
out.write("include ");
|
||||
boolean first = true;
|
||||
for (Project myproject: distributionProjects) {
|
||||
if (!myproject.getProjectDir().equals(getProjectDir())) {
|
||||
if (first == true) {
|
||||
first = false;
|
||||
}
|
||||
else {
|
||||
out.write ", ";
|
||||
}
|
||||
out.write '"' + myproject.name + '"'
|
||||
}
|
||||
}
|
||||
out .write "\n\n";
|
||||
|
||||
for (Project myproject: distributionProjects) {
|
||||
if (!myproject.getProjectDir().equals(getProjectDir())) {
|
||||
println myproject.name
|
||||
out.write 'project(":' + myproject.name + '").projectDir = file("' + myproject.getProjectDir().toString().substring((int)(getProjectDir().toString().size() + 1)) + '")\n';
|
||||
}
|
||||
}
|
||||
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
|
||||
task buildDistProjects {
|
||||
dependsOn(distributionProjects.build)
|
||||
}
|
||||
|
||||
tasks.withType(Tar) {
|
||||
|
||||
dependsOn(writeSettings)
|
||||
dependsOn(distributionProjects.build)
|
||||
dependsOn(javadocAll)
|
||||
dependsOn(asciidoctor)
|
||||
|
||||
compression = Compression.GZIP
|
||||
|
||||
destinationDir = file("build/distributions/")
|
||||
}
|
||||
|
||||
task (tar, type: Tar) {
|
||||
archiveName = project.name + "-" + project.version + ".tgz"
|
||||
}
|
||||
|
||||
task (tarFull, type: Tar) {
|
||||
dependsOn(tar)
|
||||
archiveName = project.name + "-" + project.version + "_full.tgz"
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
|
||||
project.ext {
|
||||
|
||||
cfgVersion = "1.4.1-SNAPSHOT"
|
||||
|
||||
cfgGroup = "org.openmuc"
|
||||
|
||||
cfgCopyDependencies = true
|
||||
|
||||
cfgCopyToRoot = false
|
||||
|
||||
cfgSignPom = true
|
||||
|
||||
cfgRepository = project.properties.sonatypeRepository
|
||||
|
||||
cfgSnapshotRepository = project.properties.sonatypeSnapshotRepository
|
||||
|
||||
cfgRepositoryUser = project.properties.sonatypeUser
|
||||
|
||||
cfgRepositoryPass = project.properties.sonatypePass
|
||||
|
||||
javaProjects = allprojects
|
||||
|
||||
distributionProjects = javaProjects
|
||||
|
||||
docProjects = javaProjects
|
||||
|
||||
repositoryProjects = javaProjects
|
||||
}
|
||||
|
||||
tasks.withType(Tar) {
|
||||
|
||||
into(project.name) {
|
||||
from("./") {
|
||||
include "build.gradle"
|
||||
include "configuration.gradle"
|
||||
include "license/**"
|
||||
include "doc/CHANGELOG.txt"
|
||||
include "run-scripts/**"
|
||||
include "gradle/wrapper/**"
|
||||
include "gradlew"
|
||||
include "gradlew.bat"
|
||||
include "build/libs-all/**"
|
||||
include "src/**"
|
||||
|
||||
include "asn1/**"
|
||||
}
|
||||
|
||||
if (name.equals("tar") ){
|
||||
exclude "**/dependencies/**/src"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
into(project.name + "/doc/user-guide/") {
|
||||
from("./build/asciidoc/html5/") {
|
||||
include "**"
|
||||
}
|
||||
from("./build/asciidoc/pdf/") {
|
||||
include "*.pdf"
|
||||
}
|
||||
}
|
||||
|
||||
into(project.name + "/doc/") {
|
||||
from("./build/docs/") {
|
||||
include "javadoc/**"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------------project specific configurations--------------------
|
||||
|
||||
apply plugin: "java"
|
||||
apply plugin: "eclipse"
|
||||
apply plugin: "osgi"
|
||||
apply plugin: "maven"
|
||||
apply plugin: "signing"
|
||||
|
||||
def projectName = 'OpenIEC61850'
|
||||
|
||||
dependencies {
|
||||
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
|
||||
compile group: 'org.openmuc', name: 'jasn1', version: '1.8.0'
|
||||
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
|
||||
compile group: 'com.toedter', name: 'jcalendar', version: '1.4'
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
name = projectName
|
||||
instruction 'Export-Package', '!*.internal.*,*'
|
||||
instruction 'Import-Package', 'org.openmuc.jasn1.*,javax.net,*;resolution:=optional'
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java.srcDirs = ['src/main/java', 'src/main/java-gen']
|
||||
}
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
pom.project {
|
||||
name projectName
|
||||
packaging 'jar'
|
||||
description 'OpenIEC61850 is a library implementing the IEC 61850 MMS communication standard (client and server).'
|
||||
url 'http://www.openmuc.org/'
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name 'Apache License, Version 2.0'
|
||||
url 'http://www.apache.org/licenses/LICENSE-2.0'
|
||||
distribution 'repo'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,242 @@
|
||||
v1.4.0 30-May-2017
|
||||
------------------
|
||||
|
||||
- extended toString() method of all model node classes to print its
|
||||
complete submodel tree.
|
||||
|
||||
- merged all projects openiec61850, jositransport, josistack,
|
||||
openiec61850-clientgui, and openiec61850-sample into a single
|
||||
project "openiec61850".
|
||||
|
||||
- removed all slf4j logging for client part. Thus if library is only
|
||||
used on client side slf4j is no longer needed.
|
||||
|
||||
- replaced sample client and server by console applications
|
||||
|
||||
- fixed setting functional constraint correctly for all BRCB
|
||||
elements. Thanks to Stefan Goldmann.
|
||||
|
||||
- fixed client side processing of reports when inclusion bit string is
|
||||
not padded with zeros, thanks to Thomas Schönle from Bachmann
|
||||
|
||||
- fixed ServerSAP.stop() to close timer threads correctly
|
||||
|
||||
- made several imports in OSGi MANIFEST file optional because they are
|
||||
not necessarily required
|
||||
|
||||
- library now depends on jASN1 1.8.0
|
||||
|
||||
|
||||
v1.3.3 09-Mar-2017
|
||||
------------------
|
||||
|
||||
- fixes bug introduced in 1.3.2: report control block instance names
|
||||
should start at 01 instead of 00
|
||||
|
||||
- library now depends on jASN1 1.7.1
|
||||
|
||||
v1.3.2 01-Mar-2017
|
||||
------------------
|
||||
|
||||
- fixes object reference of child attributes of array elements: old:
|
||||
LD/LN.DO.Array(1)child, new LD/LN.DO.Array(1).child
|
||||
|
||||
- fixes setting of RptEna DA in server to true when reports are enabled.
|
||||
|
||||
- fixes reading report control blocks with "max" attribute greater 1
|
||||
from SCL file
|
||||
|
||||
- added check whether received BitString has correct size before setting it
|
||||
in model
|
||||
|
||||
v1.3.1 24-Feb-2017
|
||||
------------------
|
||||
|
||||
- fixed TapCommand data attribute default value
|
||||
|
||||
- types based on BdaBitString now check in setValue(byte[] value)
|
||||
whether passed byte array has correct length
|
||||
|
||||
|
||||
v1.3.0 17-Jan-2017
|
||||
------------------
|
||||
|
||||
- fixed bug that urcb reservation was not canceled after connection
|
||||
was closed
|
||||
|
||||
- fixed support for reserving buffered report control blocks on the
|
||||
client side thanks to Bo Orsted Andresen
|
||||
|
||||
- fixed support for receiving buffered and unbuffered reports when the
|
||||
data set reference is not part of the report thanks to Bo Orsted
|
||||
Andresen
|
||||
|
||||
- fixed bug in parsing scl file, in some cases predefined values were
|
||||
not set, thanks to Wu Yongming
|
||||
|
||||
- added support for parsing ObjRef in SCL file
|
||||
|
||||
- added support for multiple report control block instances by
|
||||
specifying RptEnabled max attribute in SCL file
|
||||
|
||||
v1.2.0 20-Mar-2016
|
||||
------------------
|
||||
- changed license from LGPL to Apache 2.0
|
||||
- added methods to ServerModel class to retrieve BRCBs on the client
|
||||
side, thanks to Thomas Saabye from EURISCO
|
||||
- added support for parsing "Val" elements inside "DA" elements of SCL
|
||||
file
|
||||
- several minor bug fixes
|
||||
|
||||
v1.1.1 11-Dec-2014
|
||||
------------------
|
||||
- set default max TPDU size to 1024
|
||||
- fix: server stops sending reports when client closed association
|
||||
- fix in sample model to enable general interrogation
|
||||
|
||||
v1.1.0 17-Oct-2014
|
||||
------------------
|
||||
- fixed ServerSap.stop()
|
||||
- added possibility change more settings in ClientSap
|
||||
- setDataSetValues will now only call a single call back function of a
|
||||
server application. The syntax of the call back function had to be
|
||||
changed for that.
|
||||
- fixed doclint errors and warnings. doclint is used by Java8
|
||||
|
||||
v1.0 31-Jul-2014
|
||||
----------------
|
||||
- added support for reporting on server side.
|
||||
- minor bug fixes
|
||||
- improvements to logging messages
|
||||
- added maxtpdu size to all Transport Layer Connection Requests
|
||||
(thanks to Michael Volz)
|
||||
- client can now receive reports via callback method
|
||||
- improved documentation
|
||||
- fixed build file for newest gradle
|
||||
- improved documentation
|
||||
|
||||
v0.17.1 27-Jan-2014
|
||||
-------------------
|
||||
- extracted jOSIStack lib from openiec61850 lib so it can be used
|
||||
separately (e.g. for the TASE.2 protocol)
|
||||
- fixed bugs in client Report functionality
|
||||
- readded ClientReportingSample application
|
||||
- fixed copying of arrays
|
||||
- support for decoding authentication value, though the authentication
|
||||
value is NOT being checked at the moment
|
||||
- added full server side support for nonpersistent DataSets
|
||||
- fixed bug in runSampleServer.bat script
|
||||
- jars are now uploaded to the central maven repository
|
||||
|
||||
v0.16.0 03-Sep-2013
|
||||
-------------------
|
||||
- renamed many functions and classes
|
||||
- added Client GUI project to easily browse the device model of an IEC
|
||||
61850 IED.
|
||||
- openiec61850-client, -server, -common and jmms where combined into a
|
||||
single openiec61850 library. The split was of no real use and caused
|
||||
split package problems in OSGi environments.
|
||||
- client ACSI functions now throw two types of exceptions: IOException
|
||||
(fatal exception, client needs to reconnect to server) and
|
||||
ServiceError for Errors that did not affect the active
|
||||
assocition/connection.
|
||||
- The way the server library works was completely changed: DataSources
|
||||
no longer exist and there is no need for property files anymore. The
|
||||
readValue() callback method in the DataSource is no longer needed
|
||||
because GetDataValues requests are handled by the server library
|
||||
without consulting the server application. Instead the server
|
||||
application now has to fill the internal model of the server library
|
||||
with up to date values. This change was necessary in order to be
|
||||
able to efficiently implement reporting and controling services in
|
||||
the future.
|
||||
- Basic control services are now part of the library and no longer
|
||||
have to be handled by the server application.
|
||||
- Several bug fixes in the SCL-parser
|
||||
- fix so that FunctionalConstraints such as GS that are not supported
|
||||
by openIEC61850 yet do not cause a null pointer exception when they
|
||||
are part of a DataSet
|
||||
|
||||
v0.14.4 30-Oct-2012
|
||||
-------------------
|
||||
- fixed another bug when decoding Float64
|
||||
- getDataDefinition of all kinds of DataObjects and DataAttributes now
|
||||
possible
|
||||
- modified toString() function of most DataAttributes to print more
|
||||
valuable information
|
||||
|
||||
v0.14.3 18-Sep-2012
|
||||
-------------------
|
||||
- fixed decoding of Float32 and Float64
|
||||
- fixed getChildren(fc) Function in LogicalNode
|
||||
|
||||
v0.14.2 23-Aug-2012
|
||||
-------------------
|
||||
- major refactoring to make code more efficient and easier to
|
||||
maintain. Many classes have been renamed and/or relocated.
|
||||
- the ability to use different SCSM was completely removed because
|
||||
only one mapping existed so far: the MMS mapping. No other Mapping
|
||||
seems to have a chance against MMS simply because MMS is already in
|
||||
use and works.
|
||||
- note that the syntax of the properties file for the StandaloneServer
|
||||
changed a little, see the sampeServer for details
|
||||
|
||||
v0.12.0 31-Jul-2012
|
||||
-------------------
|
||||
- changed from LGPLv3 to LGPLv2.1
|
||||
- replaced OCTET_STRING64, OCTET_STRING8 and so on with a general
|
||||
OCTET_STRING class
|
||||
- the same was done for UNICODE_STRING and VISIBLE_STRING
|
||||
- client no longer hangs when receiving ApplError Reports
|
||||
|
||||
v0.11.0 02-Jul-2012
|
||||
-------------------
|
||||
- new jASN1 version that can decode empty Object Identifiers
|
||||
- added mms authentication capability
|
||||
- fixed multi thread issues in TSAPConnection of MMS mapping
|
||||
- added FLOAT64 from IEC61400-2
|
||||
- added SampleReportClient to demonstrate how to use reporting with the client
|
||||
- some improvements to client receiver thread
|
||||
- some other small bug fixes
|
||||
|
||||
v0.10.0 14-Mai-2012
|
||||
-------------------
|
||||
- restructuring: code moved to src folder
|
||||
- new jASN1 version which fixes bug in decoding empty bitstrings
|
||||
- receving "Check" data does not cause errors anymore
|
||||
- ASN.1 buffers are automatically resized in the client
|
||||
|
||||
v0.9.9 29-Mar-2012
|
||||
------------------
|
||||
- added DataSet Services for client and server
|
||||
- added getReport methods and processReport for the client -> they
|
||||
will get a report from the queue and return a report object with the
|
||||
updated data
|
||||
- fixed getDataValues for array structures
|
||||
- disabled sending SpecificationWithResult in read request because
|
||||
some clients cannot cope with it
|
||||
- fixed bug in RFC 1006 part
|
||||
- added receiver thread in client so that reports can be received at any time
|
||||
- added VisibleString65 to be compatible with some version1.0 servers
|
||||
- avoid srcRef == 0 because some servers cannot cope with it
|
||||
|
||||
v0.9.8 22-Feb-2012
|
||||
------------------
|
||||
- fixed path in runSampleServer.sh and runSampleClient.sh
|
||||
|
||||
0.9.7 21-Feb-2012
|
||||
-----------------
|
||||
- small bug fix in T-Sel encoding/decoding in TConnection.java -
|
||||
thanks to Johannes Schmidt from University of Leipzig
|
||||
|
||||
v0.9.6 20-Feb-2012
|
||||
------------------
|
||||
- when importing Eclipse projects: GRADLE_HOME was replaced by GRADLE_USER_HOME
|
||||
- removed duplicate entries from tar distribution file
|
||||
- Remote TSAPs can now be addressed using a T-Selector. The client can
|
||||
set the T-Selector like this:
|
||||
MmsScsmClientSAP clientSAP = new MmsScsmClientSAP();
|
||||
clientSAP.acseSAP.tSAP.tSelRemote = new byte[] { 0, 1 };
|
||||
|
||||
v0.9.5 06-Feb-2012
|
||||
------------------
|
||||
- first version
|
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
#Tue Apr 25 13:05:33 CEST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
|
@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save ( ) {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
@ -0,0 +1,84 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright 2011-17 Fraunhofer ISE, energy & meteo Systems GmbH and other contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
JARS_LOCATION="../../build/libs-all"
|
||||
MAIN_CLASS="org.openmuc.openiec61850.app.ConsoleClient"
|
||||
SYSPROPS=""
|
||||
PARAMS=""
|
||||
|
||||
SCRIPT_HOME=`dirname $0`
|
||||
|
||||
CLASSPATH=$(JARS=("$SCRIPT_HOME"/"$JARS_LOCATION"/*.jar); IFS=:; echo "${JARS[*]}")
|
||||
|
||||
for i in $@; do
|
||||
if [[ $i == -D* ]]; then
|
||||
SYSPROPS="$SYSPROPS $i";
|
||||
else
|
||||
PARAMS="$PARAMS $i";
|
||||
fi
|
||||
done
|
||||
|
||||
java $SYSPROPS -cp $CLASSPATH $MAIN_CLASS $PARAMS
|
@ -0,0 +1,6 @@
|
||||
::BATCH file for windows
|
||||
|
||||
set BATDIR=%~dp0
|
||||
set LIBDIR=%BATDIR%..\..\build\libs-all
|
||||
|
||||
java -Djava.ext.dirs=%LIBDIR% org.openmuc.openiec61850.app.ConsoleClient %*
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!-- encoders are assigned the type
|
||||
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="debug">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
JARS_LOCATION="../../build/libs-all"
|
||||
MAIN_CLASS="org.openmuc.openiec61850.app.ConsoleServer"
|
||||
SYSPROPS="-Dlogback.configurationFile=logback.xml"
|
||||
|
||||
# from gradle start script:
|
||||
# Attempt to set SCRIPT_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
SCRIPT_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
|
||||
CLASSPATH=$(JARS=("$SCRIPT_HOME"/"$JARS_LOCATION"/*.jar); IFS=:; echo "${JARS[*]}")
|
||||
|
||||
for i in $@; do
|
||||
if [[ $i == -D* ]]; then
|
||||
SYSPROPS="$SYSPROPS $i";
|
||||
else
|
||||
PARAMS="$PARAMS $i";
|
||||
fi
|
||||
done
|
||||
|
||||
java $SYSPROPS -cp $CLASSPATH $MAIN_CLASS $PARAMS
|
@ -0,0 +1,6 @@
|
||||
::BATCH file to windows
|
||||
|
||||
set BATDIR=%~dp0
|
||||
set LIBDIR=%BATDIR%..\..\build\libs-all
|
||||
|
||||
java -Dlogback.configurationFile=logback.xml -Djava.ext.dirs=%LIBDIR% org.openmuc.openiec61850.app.ConsoleServer %*
|
@ -0,0 +1,293 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--This file is generated using Kalkitech SCL Manager IEC61850 Configuration Tool (www.kalkitech.com)-->
|
||||
<SCL xmlns="http://www.iec.ch/61850/2003/SCL">
|
||||
<Header id="" version="4.0.2" revision="" toolID="Kalkitech SCL Manager" nameStructure="IEDName" />
|
||||
<Communication>
|
||||
<SubNetwork name="subnetwork1" type="8-MMS">
|
||||
<Text>Station bus</Text>
|
||||
<BitRate unit="b/s">10</BitRate>
|
||||
<ConnectedAP iedName="ied1" apName="accessPoint1">
|
||||
<Address>
|
||||
<P type="IP">10.0.0.3</P>
|
||||
<P type="IP-SUBNET">255.255.255.0</P>
|
||||
<P type="IP-GATEWAY">10.0.0.101</P>
|
||||
<P type="OSI-TSEL">0001</P>
|
||||
<P type="OSI-PSEL">00000001</P>
|
||||
<P type="OSI-SSEL">0001</P>
|
||||
</Address>
|
||||
</ConnectedAP>
|
||||
</SubNetwork>
|
||||
</Communication>
|
||||
<IED name="ied1">
|
||||
<Services>
|
||||
<DynAssociation />
|
||||
<GetDirectory />
|
||||
<GetDataObjectDefinition />
|
||||
<GetDataSetValue />
|
||||
<DataSetDirectory />
|
||||
<ReadWrite />
|
||||
<GetCBValues />
|
||||
<ConfLNs fixPrefix="true" fixLnInst="true" />
|
||||
<GOOSE max="5" />
|
||||
<GSSE max="5" />
|
||||
<FileHandling />
|
||||
<GSEDir />
|
||||
<TimerActivatedControl />
|
||||
</Services>
|
||||
<AccessPoint name="accessPoint1">
|
||||
<Server>
|
||||
<Authentication />
|
||||
<LDevice inst="lDevice1">
|
||||
<LN0 lnClass="LLN0" lnType="LLN01" inst="">
|
||||
<DataSet name="dataset1" desc="">
|
||||
<FCDA ldInst="lDevice1" lnClass="MMXU" fc="MX" lnInst="1" doName="TotW" />
|
||||
<FCDA ldInst="lDevice1" lnClass="MMXU" fc="MX" lnInst="1" doName="W.phsA" daName="cVal.mag.f" />
|
||||
</DataSet>
|
||||
<ReportControl name="urcb1" confRev="0" datSet="dataset1" rptID="urcb1" intgPd="5000" bufTime="0">
|
||||
<TrgOps dchg="true" qchg="true" dupd="true" period="true" gi="true" />
|
||||
<OptFields dataSet="true" bufOvfl="false" configRef="true" dataRef="false" entryID="true" reasonCode="true" timeStamp="true" seqNum="true"/>
|
||||
<RptEnabled max="3"/>
|
||||
</ReportControl>
|
||||
<ReportControl name="urcb2" confRev="0" datSet="dataset1" intgPd="0" bufTime="0">
|
||||
<TrgOps />
|
||||
<OptFields />
|
||||
</ReportControl>
|
||||
|
||||
<DOI name="Mod">
|
||||
<DAI name="ctlModel">
|
||||
<Val>status-only</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
</LN0>
|
||||
<LN lnClass="LPHD" lnType="LPHD1" inst="1" prefix="" />
|
||||
<LN lnClass="MMXU" lnType="MMXU1" inst="1" prefix="">
|
||||
<DOI name="Mod">
|
||||
<DAI name="ctlModel">
|
||||
<Val>status-only</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
</LN>
|
||||
<LN lnClass="CSWI" lnType="CSWI1" inst="1" prefix="">
|
||||
<DOI name="Mod">
|
||||
<DAI name="ctlModel">
|
||||
<Val>status-only</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="Pos">
|
||||
<DAI name="ctlModel">
|
||||
<Val>direct-with-normal-security</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="PosA">
|
||||
<DAI name="sboTimeout">
|
||||
<Val>1000</Val>
|
||||
</DAI>
|
||||
<DAI name="ctlModel">
|
||||
<Val>sbo-with-normal-security</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="PosB">
|
||||
<DAI name="ctlModel">
|
||||
<Val>direct-with-enhanced-security</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
<DOI name="PosC">
|
||||
<DAI name="ctlModel">
|
||||
<Val>sbo-with-enhanced-security</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
</LN>
|
||||
<LN lnClass="DSCH" lnType="DSCH1" inst="1" prefix="">
|
||||
<DOI name="Mod">
|
||||
<DAI name="ctlModel">
|
||||
<Val>status-only</Val>
|
||||
</DAI>
|
||||
</DOI>
|
||||
</LN>
|
||||
</LDevice>
|
||||
</Server>
|
||||
</AccessPoint>
|
||||
</IED>
|
||||
<DataTypeTemplates>
|
||||
<LNodeType id="LLN01" lnClass="LLN0">
|
||||
<DO name="Mod" type="INC_1_Mod" />
|
||||
<DO name="Beh" type="INS_1_Beh" />
|
||||
<DO name="Health" type="INS_1_Beh" />
|
||||
<DO name="NamPlt" type="LPL_1_NamPlt" />
|
||||
</LNodeType>
|
||||
<LNodeType id="LPHD1" lnClass="LPHD">
|
||||
<DO name="PhyNam" type="DPL_1_PhyNam" />
|
||||
<DO name="PhyHealth" type="INS_1_Beh" />
|
||||
<DO name="Proxy" type="SPS_1_Proxy" />
|
||||
</LNodeType>
|
||||
<LNodeType id="MMXU1" lnClass="MMXU">
|
||||
<DO name="Mod" type="INC_1_Mod" />
|
||||
<DO name="Beh" type="INS_1_Beh" />
|
||||
<DO name="Health" type="INS_1_Beh" />
|
||||
<DO name="NamPlt" type="LPL_2_NamPlt" />
|
||||
<DO name="TotW" type="MV_1_TotW" />
|
||||
<DO name="W" type="WYE_1_W" />
|
||||
</LNodeType>
|
||||
<LNodeType id="CSWI1" lnClass="CSWI" desc="Switch controller">
|
||||
<DO name="Mod" type="INC_1_Mod" />
|
||||
<DO name="Beh" type="INS_1_Beh" />
|
||||
<DO name="Health" type="INS_1_Beh" />
|
||||
<DO name="NamPlt" type="LPL_2_NamPlt" />
|
||||
<DO name="Pos" type="DPC_1_Pos" />
|
||||
<DO name="PosA" type="DPC_2_PosA" />
|
||||
<DO name="PosB" type="DPC_1_PosB" />
|
||||
<DO name="PosC" type="DPC_1_PosA" />
|
||||
</LNodeType>
|
||||
<LNodeType id="DSCH1" lnClass="DSCH" desc="DER energy and/or ancillary services schedule">
|
||||
<DO name="Mod" type="ENC_1_Mod" />
|
||||
<DO name="Beh" type="ENS_1_Beh" />
|
||||
<DO name="Health" type="ENS_1_Beh" />
|
||||
<DO name="NamPlt" type="LPL_2_NamPlt" />
|
||||
<DO name="SchdSt" type="INS_1_Beh" />
|
||||
<DO name="SchdId" type="ING_1_SchdId" />
|
||||
<DO name="SchdCat" type="ING_1_SchdId" />
|
||||
<DO name="SchdTyp" type="ING_1_SchdId" />
|
||||
<DO name="SchdAbsTm" type="SCA_1_SchdAbsTm" />
|
||||
</LNodeType>
|
||||
<DOType id="INC_1_Mod" cdc="INC">
|
||||
<DA name="q" bType="Quality" fc="ST" qchg="true" />
|
||||
<DA name="t" bType="Timestamp" fc="ST" />
|
||||
<DA name="ctlModel" type="CtlModels" bType="Enum" fc="CF" />
|
||||
</DOType>
|
||||
<DOType id="INS_1_Beh" cdc="INS">
|
||||
<DA name="stVal" bType="INT32" fc="ST" dchg="true" />
|
||||
<DA name="q" bType="Quality" fc="ST" qchg="true" />
|
||||
<DA name="t" bType="Timestamp" fc="ST" />
|
||||
</DOType>
|
||||
<DOType id="LPL_1_NamPlt" cdc="LPL">
|
||||
<DA name="vendor" bType="VisString255" fc="DC" />
|
||||
<DA name="swRev" bType="VisString255" fc="DC" />
|
||||
<DA name="d" bType="VisString255" fc="DC" />
|
||||
<DA name="configRev" bType="VisString255" fc="DC" />
|
||||
<DA name="ldNs" bType="VisString255" fc="EX" />
|
||||
</DOType>
|
||||
<DOType id="DPL_1_PhyNam" cdc="DPL">
|
||||
<DA name="vendor" bType="VisString255" fc="DC" />
|
||||
</DOType>
|
||||
<DOType id="SPS_1_Proxy" cdc="SPS">
|
||||
<DA name="stVal" bType="BOOLEAN" fc="ST" dchg="true" />
|
||||
<DA name="q" bType="Quality" fc="ST" qchg="true" />
|
||||
<DA name="t" bType="Timestamp" fc="ST" />
|
||||
</DOType>
|
||||
<DOType id="LPL_2_NamPlt" cdc="LPL">
|
||||
<DA name="vendor" bType="VisString255" fc="DC" />
|
||||
<DA name="swRev" bType="VisString255" fc="DC" />
|
||||
<DA name="d" bType="VisString255" fc="DC" />
|
||||
</DOType>
|
||||
<DOType id="MV_1_TotW" cdc="MV">
|
||||
<DA name="mag" type="AnalogueValue_1" bType="Struct" fc="MX" dchg="true" dupd="true" />
|
||||
<DA name="q" bType="Quality" fc="MX" qchg="true" />
|
||||
<DA name="t" bType="Timestamp" fc="MX" />
|
||||
</DOType>
|
||||
<DOType id="WYE_1_W" cdc="WYE">
|
||||
<SDO name="phsA" type="CMV_1_phsA" />
|
||||
<SDO name="phsB" type="CMV_1_phsA" />
|
||||
<SDO name="phsC" type="CMV_1_phsA" />
|
||||
</DOType>
|
||||
<DOType id="CMV_1_phsA" cdc="CMV">
|
||||
<DA name="cVal" type="Vector_1" bType="Struct" fc="MX" dchg="true" />
|
||||
<DA name="q" bType="Quality" fc="MX" qchg="true" />
|
||||
<DA name="t" bType="Timestamp" fc="MX" />
|
||||
</DOType>
|
||||
<DOType id="DPC_1_Pos" cdc="DPC">
|
||||
<DA name="Oper" type="DPCSelectWithValue_1" bType="Struct" fc="CO" />
|
||||
<DA name="q" bType="Quality" fc="ST" qchg="true" />
|
||||
<DA name="t" bType="Timestamp" fc="ST" />
|
||||
<DA name="ctlModel" type="CtlModels" bType="Enum" fc="CF" />
|
||||
</DOType>
|
||||
<DOType id="DPC_2_PosA" cdc="DPC">
|
||||
<DA name="q" bType="Quality" fc="ST" qchg="true" />
|
||||
<DA name="t" bType="Timestamp" fc="ST" />
|
||||
<DA name="ctlModel" type="CtlModels" bType="Enum" fc="CF" />
|
||||
<DA name="sboTimeout" bType="INT32U" fc="CF" />
|
||||
<DA name="SBO" bType="VisString64" fc="CO" />
|
||||
<DA name="Oper" type="DPCOperate_1" bType="Struct" fc="CO" />
|
||||
<DA name="Cancel" type="DPCCancel_1" bType="Struct" fc="CO" />
|
||||
</DOType>
|
||||
<DOType id="DPC_1_PosB" cdc="DPC">
|
||||
<DA name="q" bType="Quality" fc="ST" qchg="true" />
|
||||
<DA name="t" bType="Timestamp" fc="ST" />
|
||||
<DA name="ctlModel" type="CtlModels" bType="Enum" fc="CF" />
|
||||
<DA name="Oper" type="DPCOperate_1" bType="Struct" fc="CO" />
|
||||
<DA name="Cancel" type="DPCCancel_1" bType="Struct" fc="CO" />
|
||||
</DOType>
|
||||
<DOType id="DPC_1_PosA" cdc="DPC">
|
||||
<DA name="q" bType="Quality" fc="ST" qchg="true" />
|
||||
<DA name="t" bType="Timestamp" fc="ST" />
|
||||
<DA name="ctlModel" type="CtlModels" bType="Enum" fc="CF" />
|
||||
<DA name="SBOw" type="DPCSelectWithValue_1" bType="Struct" fc="CO" />
|
||||
<DA name="Oper" type="DPCOperate_1" bType="Struct" fc="CO" />
|
||||
<DA name="Cancel" type="DPCCancel_1" bType="Struct" fc="CO" />
|
||||
</DOType>
|
||||
<DOType id="ENC_1_Mod" cdc="ENC">
|
||||
<DA name="q" bType="Quality" fc="ST" qchg="true" />
|
||||
<DA name="t" bType="Timestamp" fc="ST" />
|
||||
<DA name="ctlModel" type="CtlModels" bType="Enum" fc="CF" />
|
||||
</DOType>
|
||||
<DOType id="ENS_1_Beh" cdc="ENS">
|
||||
<DA name="stVal" bType="INT32" fc="ST" dchg="true" />
|
||||
<DA name="q" bType="Quality" fc="ST" qchg="true" />
|
||||
<DA name="t" bType="Timestamp" fc="ST" />
|
||||
</DOType>
|
||||
<DOType id="ING_1_SchdId" cdc="ING" />
|
||||
<DOType id="SCA_1_SchdAbsTm" cdc="SCA">
|
||||
<DA name="val" bType="FLOAT32" count="24" fc="SP" dchg="true" />
|
||||
</DOType>
|
||||
<DAType id="AnalogueValue_1">
|
||||
<BDA name="f" bType="FLOAT32" />
|
||||
</DAType>
|
||||
<DAType id="Vector_1">
|
||||
<BDA name="mag" type="AnalogueValue_1" bType="Struct" />
|
||||
</DAType>
|
||||
<DAType id="DPCSelectWithValue_1">
|
||||
<BDA name="ctlVal" bType="BOOLEAN" />
|
||||
<BDA name="origin" type="Originator_1" bType="Struct" />
|
||||
<BDA name="ctlNum" bType="INT8U" />
|
||||
<BDA name="T" bType="Timestamp" />
|
||||
<BDA name="Test" bType="BOOLEAN" />
|
||||
<BDA name="Check" bType="Check" />
|
||||
</DAType>
|
||||
<DAType id="Originator_1">
|
||||
<BDA name="orCat" type="OrCat" bType="Enum" />
|
||||
<BDA name="orIdent" bType="Octet64" />
|
||||
</DAType>
|
||||
<DAType id="DPCOperate_1">
|
||||
<BDA name="ctlVal" bType="BOOLEAN" />
|
||||
<BDA name="origin" type="Originator_1" bType="Struct" />
|
||||
<BDA name="ctlNum" bType="INT8U" />
|
||||
<BDA name="T" bType="Timestamp" />
|
||||
<BDA name="Test" bType="BOOLEAN" />
|
||||
<BDA name="Check" bType="Check" />
|
||||
</DAType>
|
||||
<DAType id="DPCCancel_1">
|
||||
<BDA name="ctlVal" bType="BOOLEAN" />
|
||||
<BDA name="origin" type="Originator_1" bType="Struct" />
|
||||
<BDA name="ctlNum" bType="INT8U" />
|
||||
<BDA name="T" bType="Timestamp" />
|
||||
<BDA name="Test" bType="BOOLEAN" />
|
||||
</DAType>
|
||||
<EnumType id="CtlModels">
|
||||
<EnumVal ord="0">status-only</EnumVal>
|
||||
<EnumVal ord="1">direct-with-normal-security</EnumVal>
|
||||
<EnumVal ord="2">sbo-with-normal-security</EnumVal>
|
||||
<EnumVal ord="3">direct-with-enhanced-security</EnumVal>
|
||||
<EnumVal ord="4">sbo-with-enhanced-security</EnumVal>
|
||||
</EnumType>
|
||||
<EnumType id="OrCat">
|
||||
<EnumVal ord="0">not-supported</EnumVal>
|
||||
<EnumVal ord="1">bay-control</EnumVal>
|
||||
<EnumVal ord="2">station-control</EnumVal>
|
||||
<EnumVal ord="3">remote-control</EnumVal>
|
||||
<EnumVal ord="4">automatic-bay</EnumVal>
|
||||
<EnumVal ord="5">automatic-station</EnumVal>
|
||||
<EnumVal ord="6">automatic-remote</EnumVal>
|
||||
<EnumVal ord="7">maintenance</EnumVal>
|
||||
<EnumVal ord="8">process</EnumVal>
|
||||
</EnumType>
|
||||
</DataTypeTemplates>
|
||||
</SCL>
|
@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
JARS_LOCATION="../../build/libs-all"
|
||||
MAIN_CLASS="org.openmuc.openiec61850.clientgui.ClientGui"
|
||||
SYSPROPS=""
|
||||
PARAMS=""
|
||||
|
||||
# from gradle start script:
|
||||
# Attempt to set SCRIPT_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
SCRIPT_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
|
||||
CLASSPATH=$(JARS=("$SCRIPT_HOME"/"$JARS_LOCATION"/*.jar); IFS=:; echo "${JARS[*]}")
|
||||
|
||||
for i in $@; do
|
||||
if [[ $i == -D* ]]; then
|
||||
SYSPROPS="$SYSPROPS $i";
|
||||
else
|
||||
PARAMS="$PARAMS $i";
|
||||
fi
|
||||
done
|
||||
|
||||
java $SYSPROPS -cp $CLASSPATH $MAIN_CLASS $PARAMS
|
||||
|
@ -0,0 +1,6 @@
|
||||
::BATCH file to windows
|
||||
|
||||
set BATDIR=%~dp0
|
||||
set LIBDIR=%BATDIR%..\..\build\libs-all
|
||||
|
||||
java -Djava.ext.dirs=%LIBDIR% org.openmuc.openiec61850.clientgui.ClientGui %*
|
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm ../../src/main/java-gen/org/openmuc/josistack/internal/acse/asn1/*
|
||||
|
||||
jasn1-compiler -o "../../src/main/java-gen/" -p "org.openmuc.josistack.internal.acse" -f iso-acse-layer.asn
|
@ -0,0 +1,272 @@
|
||||
-- Module ACSE_1 (X.227:04/1995)
|
||||
ASN1 {joint_iso_itu_t association_control(2) modules(0) apdus(0) version1(1)}
|
||||
-- ACSE_1 refers to ACSE version 1
|
||||
DEFINITIONS ::=
|
||||
BEGIN
|
||||
|
||||
EXPORTS
|
||||
acse_as_id, ACSE_apdu, aCSE_id, Application_context_name, AP_title,
|
||||
AE_qualifier, AE_title, AP_invocation_identifier, AE_invocation_identifier,
|
||||
Mechanism_name, Authentication_value, ACSE_requirements, ObjectSet;
|
||||
|
||||
|
||||
-- The data types Name and RelativeDistinguishedName are imported from ISO/IEC 9594_2.
|
||||
-- object identifier assignments
|
||||
acse_as_id OBJECT IDENTIFIER ::=
|
||||
{joint-iso-itu-t association-control(2) abstract-syntax(1) apdus(0)
|
||||
version1(1)}
|
||||
|
||||
-- may be used to reference the abstract syntax of the ACSE APDUs
|
||||
aCSE_id OBJECT IDENTIFIER ::=
|
||||
{joint-iso-itu-t association-control(2) ase-id(3) acse-ase(1) version(1)}
|
||||
|
||||
-- may be used to identify the Association Control ASE.
|
||||
-- top level CHOICE
|
||||
ACSE_apdu ::= CHOICE {
|
||||
aarq AARQ_apdu,
|
||||
aare AARE_apdu,
|
||||
rlrq RLRQ_apdu,
|
||||
rlre RLRE_apdu
|
||||
}
|
||||
|
||||
AARQ_apdu ::= [APPLICATION 0] IMPLICIT SEQUENCE {
|
||||
protocol_version [0] IMPLICIT BIT STRING OPTIONAL,
|
||||
application_context_name [1] EXPLICIT OBJECT IDENTIFIER,
|
||||
called_AP_title [2] AP_title OPTIONAL,
|
||||
called_AE_qualifier [3] AE_qualifier OPTIONAL,
|
||||
called_AP_invocation_identifier [4] EXPLICIT AP_invocation_identifier OPTIONAL,
|
||||
called_AE_invocation_identifier [5] EXPLICIT AE_invocation_identifier OPTIONAL,
|
||||
calling_AP_title [6] AP_title OPTIONAL,
|
||||
calling_AE_qualifier [7] AE_qualifier OPTIONAL,
|
||||
calling_AP_invocation_identifier [8] AP_invocation_identifier OPTIONAL,
|
||||
calling_AE_invocation_identifier [9] AE_invocation_identifier OPTIONAL,
|
||||
-- The following field shall not be present if only the Kernel is used.
|
||||
sender_acse_requirements [10] IMPLICIT ACSE_requirements OPTIONAL,
|
||||
-- The following field shall only be present if the Authentication functional unit is selected.
|
||||
mechanism_name [11] IMPLICIT Mechanism_name OPTIONAL,
|
||||
-- The following field shall only be present if the Authentication functional unit is selected.
|
||||
calling_authentication_value [12] EXPLICIT Authentication_value OPTIONAL,
|
||||
application_context_name_list
|
||||
[13] IMPLICIT Application_context_name_list OPTIONAL,
|
||||
-- The above field shall only be present if the Application Context Negotiation functional unit is selected
|
||||
implementation_information [29] IMPLICIT Implementation_data OPTIONAL,
|
||||
user_information [30] IMPLICIT Association_information OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
AARE_apdu ::= [APPLICATION 1] IMPLICIT SEQUENCE {
|
||||
--changed by Stefan Feuerhahn
|
||||
protocol_version [0] IMPLICIT BIT STRING OPTIONAL,
|
||||
application_context_name [1] EXPLICIT OBJECT IDENTIFIER,
|
||||
result [2] EXPLICIT Associate_result,
|
||||
result_source_diagnostic [3] EXPLICIT Associate_source_diagnostic,
|
||||
responding_AP_title [4] EXPLICIT AP_title OPTIONAL,
|
||||
responding_AE_qualifier [5] EXPLICIT AE_qualifier OPTIONAL,
|
||||
responding_AP_invocation_identifier [6] EXPLICIT AP_invocation_identifier OPTIONAL,
|
||||
responding_AE_invocation_identifier [7] EXPLICIT AE_invocation_identifier OPTIONAL,
|
||||
-- The following field shall not be present if only the Kernel is used.
|
||||
responder_acse_requirements [8] IMPLICIT ACSE_requirements OPTIONAL,
|
||||
-- The following field shall only be present if the Authentication functional unit is selected.
|
||||
mechanism_name [9] IMPLICIT Mechanism_name OPTIONAL,
|
||||
-- This following field shall only be present if the Authentication functional unit is selected.
|
||||
responding_authentication_value [10] EXPLICIT Authentication_value OPTIONAL,
|
||||
application_context_name_list
|
||||
[11] IMPLICIT Application_context_name_list OPTIONAL,
|
||||
-- The above field shall only be present if the Application Context Negotiation functional unit is selected
|
||||
implementation_information
|
||||
[29] IMPLICIT Implementation_data OPTIONAL,
|
||||
user_information [30] IMPLICIT Association_information OPTIONAL
|
||||
}
|
||||
|
||||
RLRQ_apdu ::= [APPLICATION 2] IMPLICIT SEQUENCE {
|
||||
reason [0] IMPLICIT Release_request_reason OPTIONAL,
|
||||
user_information [30] IMPLICIT Association_information OPTIONAL
|
||||
}
|
||||
|
||||
RLRE_apdu ::= [APPLICATION 3] IMPLICIT SEQUENCE {
|
||||
reason [0] IMPLICIT Release_response_reason OPTIONAL,
|
||||
user_information [30] IMPLICIT Association_information OPTIONAL
|
||||
}
|
||||
|
||||
-- ABRT_apdu ::= [APPLICATION 4] IMPLICIT SEQUENCE {
|
||||
-- abort_source [0] IMPLICIT ABRT_source,
|
||||
-- abort_diagnostic [1] IMPLICIT ABRT_diagnostic OPTIONAL,
|
||||
-- This field shall not be present if only the Kernel is used.
|
||||
-- user_information [30] IMPLICIT Association_information OPTIONAL
|
||||
--}
|
||||
|
||||
-- ABRT_diagnostic ::= ENUMERATED {
|
||||
-- no_reason_given(1), protocol_error(2),
|
||||
-- authentication_mechanism_name_not_recognized(3),
|
||||
-- authentication_mechanism_name_required(4), authentication_failure(5),
|
||||
-- authentication_required(6)
|
||||
-- }
|
||||
|
||||
-- ABRT_source ::= INTEGER {acse_service_user(0), acse_service_provider(1)}
|
||||
|
||||
|
||||
ACSE_requirements ::= BIT STRING {
|
||||
authentication(0), application_context_negotiation(1)
|
||||
}
|
||||
|
||||
Application_context_name_list ::= SEQUENCE OF Application_context_name
|
||||
|
||||
-- Application_context_name ::= CHOICE {
|
||||
-- application_context_name OBJECT IDENTIFIER
|
||||
-- }
|
||||
|
||||
Application_context_name ::= OBJECT IDENTIFIER
|
||||
|
||||
-- Application_entity title productions follow (not in alphabetical order)
|
||||
AP_title ::= CHOICE {
|
||||
-- ap_title_form1 AP_title_form1,
|
||||
ap_title_form2 AP_title_form2
|
||||
}
|
||||
|
||||
AE_qualifier ::= CHOICE {
|
||||
-- ae_qualifier_form1 AE_qualifier_form1,
|
||||
ae_qualifier_form2 AE_qualifier_form2
|
||||
}
|
||||
|
||||
-- When both AP_title and AE_qualifier data values are present in an AARQ or AARE APDU, both must
|
||||
-- have the same form to allow the construction of an AE_title as discussed in CCITT Rec. X.665 |
|
||||
-- ISO/IEC 9834_6.
|
||||
-- AP_title_form1 ::=
|
||||
-- Name
|
||||
|
||||
-- The value assigned to AP_title_form1 is The Directory Name of an application_process title.
|
||||
-- AE_qualifier_form1 ::=
|
||||
-- RelativeDistinguishedName
|
||||
|
||||
-- The value assigned to AE_qualifier_form1 is the relative distinguished name of a particular
|
||||
-- application_entity of the application_process identified by AP_title_form1.
|
||||
AP_title_form2 ::= OBJECT IDENTIFIER
|
||||
|
||||
AE_qualifier_form2 ::= INTEGER
|
||||
|
||||
AE_title ::= CHOICE {
|
||||
-- ae_title_form1 AE_title_form1,
|
||||
ae_title_form2 AE_title_form2
|
||||
}
|
||||
|
||||
-- As defined in CCITT Rec. X.650 | ISO 7498_3, an application_entity title is composed of an application-
|
||||
-- process title and an application_entity qualifier. The ACSE protocol provides for the transfer of an
|
||||
-- application_entity title value by the transfer of its component values. However, the following data type
|
||||
-- is provided for International Standards that reference a single syntactic structure for AE titles.
|
||||
-- AE_title_form1 ::=
|
||||
-- Name
|
||||
|
||||
-- For access to The Directory (ITU_T Rec. X.500_Series | ISO/IEC 9594), an AE title has AE_title_form1.
|
||||
-- This value can be constructed from AP_title_form1 and AE_qualifier_form1 values contained in an
|
||||
-- AARQ or AARE APDU. A discussion of forming an AE_title_form1 from AP_title_form1 and AE_qualifier-
|
||||
-- form1 may be found in CCITT Rec. X.665 | ISO/IEC 9834_6.
|
||||
AE_title_form2 ::= OBJECT IDENTIFIER
|
||||
|
||||
-- A discussion of forming an AE_title_form2 from AP_title_form2 and AE_qualifier_form2 may be
|
||||
-- found in CCITT Rec. X.665 | ISO/IEC 9834_6.
|
||||
AE_invocation_identifier ::= INTEGER
|
||||
|
||||
AP_invocation_identifier ::= INTEGER
|
||||
|
||||
-- End of Application_entity title productions
|
||||
Associate_result ::= INTEGER {
|
||||
accepted(0), rejected_permanent(1), rejected_transient(2)}
|
||||
|
||||
Associate_source_diagnostic ::= CHOICE {
|
||||
acse_service_user
|
||||
[1] EXPLICIT INTEGER {null(0), no_reason_given(1),
|
||||
application_context_name_not_supported(2),
|
||||
calling_AP_title_not_recognized(3),
|
||||
calling_AP_invocation_identifier_not_recognized(4),
|
||||
calling_AE_qualifier_not_recognized(5),
|
||||
calling_AE_invocation_identifier_not_recognized(6),
|
||||
called_AP_title_not_recognized(7),
|
||||
called_AP_invocation_identifier_not_recognized(8),
|
||||
called_AE_qualifier_not_recognized(9),
|
||||
called_AE_invocation_identifier_not_recognized(10),
|
||||
authentication_mechanism_name_not_recognized(11),
|
||||
authentication_mechanism_name_required(12),
|
||||
authentication_failure(13), authentication_required(14)},
|
||||
acse_service_provider
|
||||
[2] EXPLICIT INTEGER {null(0), no_reason_given(1), no_common_acse_version(2)}
|
||||
}
|
||||
|
||||
-- Association_information ::= SEQUENCE OF Association_information_item
|
||||
Association_information ::= SEQUENCE OF Myexternal
|
||||
|
||||
Myexternal ::= [UNIVERSAL 8] IMPLICIT SEQUENCE
|
||||
{
|
||||
direct_reference OBJECT IDENTIFIER OPTIONAL,
|
||||
indirect_reference INTEGER OPTIONAL,
|
||||
encoding CHOICE
|
||||
{ single_ASN1_type [0] EXPLICIT ANY,
|
||||
octet_aligned [1] IMPLICIT OCTET STRING,
|
||||
arbitrary [2] IMPLICIT BIT STRING }
|
||||
}
|
||||
|
||||
Myexternal2 ::= [UNIVERSAL 8] IMPLICIT SEQUENCE
|
||||
{
|
||||
direct_reference OBJECT IDENTIFIER OPTIONAL,
|
||||
indirect_reference INTEGER OPTIONAL,
|
||||
encoding CHOICE
|
||||
{ single_ASN1_type [0] EXPLICIT ANY,
|
||||
octet_aligned [1] IMPLICIT OCTET STRING,
|
||||
arbitrary [2] IMPLICIT BIT STRING }
|
||||
}
|
||||
|
||||
|
||||
--Association_information_item ::= [UNIVERSAL 8] IMPLICIT SEQUENCE {
|
||||
-- direct_reference OBJECT IDENTIFIER OPTIONAL,
|
||||
-- indirect_reference INTEGER OPTIONAL,
|
||||
-- encoding CHOICE
|
||||
-- {
|
||||
-- single_ASN1_type [0] CHOICE {
|
||||
-- single_ASN1_type ANY
|
||||
-- },
|
||||
-- octet_aligned [1] IMPLICIT OCTET STRING,
|
||||
-- arbitrary [2] IMPLICIT BIT STRING
|
||||
-- }
|
||||
-- }
|
||||
|
||||
--is optional:
|
||||
Authentication_value ::= CHOICE {
|
||||
charstring [0] IMPLICIT GraphicString,
|
||||
bitstring [1] IMPLICIT BIT STRING,
|
||||
external [2] IMPLICIT Myexternal2
|
||||
-- other
|
||||
-- [3] IMPLICIT SEQUENCE {other_mechanism_name
|
||||
-- MECHANISM_NAME.&id({ObjectSet}),
|
||||
-- other_mechanism_value
|
||||
-- MECHANISM_NAME.&Type
|
||||
-- ({ObjectSet}{@.other_mechanism_name})}
|
||||
}
|
||||
|
||||
-- The abstract syntax of (calling/responding) authentication_value is determined by the authentication
|
||||
-- mechanism used during association establishment. The authentication mechanism is either explicitly
|
||||
-- denoted by the &id field (of type OBJECT IDENTIFIER) for a mechanism belonging to the class
|
||||
-- MECHANISM_NAME, or it is known implicitly by
|
||||
-- prior agreement between the communicating partners. If the "other" component is chosen, then
|
||||
-- the "mechanism_name" component must be present in accordance with
|
||||
-- ITU_T Rec. X.680 | ISO/IEC 8824. If the value "mechanism_name" occurs in the AARQ_apdu or the
|
||||
-- AARE_apdu, then that value must be the same as the value for "other_mechanism_name"
|
||||
Implementation_data ::= GraphicString
|
||||
|
||||
Mechanism_name ::= OBJECT IDENTIFIER
|
||||
|
||||
Release_request_reason ::= INTEGER {
|
||||
normal (0),
|
||||
urgent (1),
|
||||
user_defined (30)
|
||||
}
|
||||
|
||||
Release_response_reason ::= INTEGER {
|
||||
normal (0),
|
||||
not_finished (1),
|
||||
user_defined (30)
|
||||
}
|
||||
|
||||
|
||||
|
||||
END
|
||||
|
||||
-- Generated by Asnp, the ASN.1 pretty_printer of France Telecom R&D
|
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm ../../src/main/java-gen/org/openmuc/josistack/internal/presentation/asn1/*.java
|
||||
|
||||
jasn1-compiler -o ../../src/main/java-gen/ -p org.openmuc.josistack.internal.presentation -f iso-presentation-layer.asn
|
@ -0,0 +1,143 @@
|
||||
ASN1 DEFINITIONS ::=
|
||||
BEGIN
|
||||
|
||||
|
||||
CP_type ::= SET {
|
||||
mode_selector [0] IMPLICIT Mode_selector,
|
||||
--x410_mode_parameters [1] IMPLICIT SET {
|
||||
-- COMPONENTS OF Reliable_Transfer_APDUs.RTORQapdu
|
||||
--} OPTIONAL,
|
||||
--- Shall be used for X.410 mode only. Shall be bitwise
|
||||
--- compatible with CCITT Recommendation X.410_1984.
|
||||
--- This shall be the User data parameter of the CP PPDU1)
|
||||
normal_mode_parameters [2] IMPLICIT SEQUENCE {
|
||||
protocol_version [0] IMPLICIT Protocol_version DEFAULT {version_1},
|
||||
calling_presentation_selector [1] IMPLICIT Calling_presentation_selector OPTIONAL,
|
||||
called_presentation_selector [2] IMPLICIT Called_presentation_selector OPTIONAL,
|
||||
presentation_context_definition_list [4] IMPLICIT Presentation_context_definition_list OPTIONAL,
|
||||
default_context_name [6] IMPLICIT Default_context_name OPTIONAL,
|
||||
presentation_requirements [8] IMPLICIT Presentation_requirements OPTIONAL,
|
||||
user_session_requirements [9] IMPLICIT User_session_requirements OPTIONAL
|
||||
-- shall not be present if equal to the Revised session
|
||||
-- requirements parameter -- ,
|
||||
user_data User_data OPTIONAL
|
||||
} OPTIONAL
|
||||
-- Shall be used for normal mode only.
|
||||
-- Shall be the parameters of the CP PPDU.
|
||||
}
|
||||
|
||||
CPA_PPDU ::= SET {
|
||||
mode_selector [0] IMPLICIT Mode_selector,
|
||||
--x410_mode_parameters [1] IMPLICIT SET {
|
||||
-- COMPONENTS OF Reliable_Transfer_APDUs.RTOACapdu
|
||||
--} OPTIONAL,
|
||||
--- Shall be used for X.410 mode only. Shall be bitwise
|
||||
--- compatible with CCITT Recommendation X.410_1984.
|
||||
--- This shall be the User data parameter of the CPA PPDU1)
|
||||
normal_mode_parameters [2] IMPLICIT SEQUENCE {
|
||||
protocol_version [0] IMPLICIT Protocol_version DEFAULT {version_1},
|
||||
responding_presentation_selector [3] IMPLICIT Responding_presentation_selector OPTIONAL,
|
||||
presentation_context_definition_result_list [5] IMPLICIT Presentation_context_definition_result_list OPTIONAL,
|
||||
presentation_requirements [8] IMPLICIT Presentation_requirements OPTIONAL,
|
||||
user_session_requirements [9] IMPLICIT User_session_requirements OPTIONAL,
|
||||
-- shall not be present if equal to the Revised session
|
||||
-- requirements parameter --
|
||||
user_data User_data OPTIONAL
|
||||
} OPTIONAL
|
||||
-- Shall be used for normal mode only.
|
||||
}
|
||||
|
||||
Responding_presentation_selector ::= Presentation_selector
|
||||
Presentation_context_definition_result_list ::= Result_list
|
||||
|
||||
Result_list ::= SEQUENCE OF SEQUENCE {
|
||||
result [0] IMPLICIT Result,
|
||||
transfer_syntax_name [1] IMPLICIT Transfer_syntax_name OPTIONAL,
|
||||
provider_reason [2] IMPLICIT INTEGER {
|
||||
reason_not_specified (0),
|
||||
abstract_syntax_not_supported (1),
|
||||
proposed_transfer_syntaxes_not_supported (2),
|
||||
local_limit_on_DCS_exceeded (3)
|
||||
} OPTIONAL
|
||||
}
|
||||
|
||||
Result ::= INTEGER {
|
||||
acceptance (0),
|
||||
user_rejection (1),
|
||||
provider_rejection (2)
|
||||
}
|
||||
|
||||
Mode_selector ::= SET {
|
||||
mode_value [0] IMPLICIT INTEGER { x410_1984_mode (0), normal_mode (1) }
|
||||
}
|
||||
|
||||
|
||||
User_data ::= CHOICE {
|
||||
simply_encoded_data [APPLICATION 0] IMPLICIT Simply_encoded_data,
|
||||
fully_encoded_data [APPLICATION 1] IMPLICIT Fully_encoded_data
|
||||
}
|
||||
-- Subclause 8.4 defines when each of the two alternatives shall be used.
|
||||
|
||||
Simply_encoded_data ::= OCTET STRING
|
||||
-- See 8.4.1.
|
||||
|
||||
Fully_encoded_data ::= SEQUENCE OF PDV_list
|
||||
-- contains one or more PDV_list values.
|
||||
-- See 8.4.2.
|
||||
|
||||
PDV_list ::= SEQUENCE {
|
||||
transfer_syntax_name Transfer_syntax_name OPTIONAL,
|
||||
presentation_context_identifier Presentation_context_identifier,
|
||||
presentation_data_values CHOICE {
|
||||
single_ASN1_type [0] ANY,
|
||||
-- Type corresponding to presentation context identifier
|
||||
octet_aligned [1] IMPLICIT OCTET STRING,
|
||||
arbitrary [2] IMPLICIT BIT STRING
|
||||
}
|
||||
-- Contains one or more presentation data values from the same
|
||||
-- presentation context.
|
||||
-- See 8.4.2.
|
||||
}
|
||||
|
||||
|
||||
Presentation_context_definition_list ::= Context_list
|
||||
|
||||
Context_list ::= SEQUENCE OF SEQUENCE {
|
||||
presentation_context_identifier Presentation_context_identifier,
|
||||
abstract_syntax_name Abstract_syntax_name,
|
||||
transfer_syntax_name_list SEQUENCE OF Transfer_syntax_name
|
||||
}
|
||||
|
||||
Presentation_context_identifier ::= INTEGER
|
||||
Abstract_syntax_name ::= OBJECT IDENTIFIER
|
||||
Transfer_syntax_name ::= OBJECT IDENTIFIER
|
||||
Protocol_version ::= BIT STRING { version_1 (0) }
|
||||
Calling_presentation_selector ::= Presentation_selector
|
||||
Called_presentation_selector ::= Presentation_selector
|
||||
Presentation_selector ::= OCTET STRING
|
||||
|
||||
|
||||
Default_context_name ::= SEQUENCE {
|
||||
abstract_syntax_name [0] IMPLICIT Abstract_syntax_name,
|
||||
transfer_syntax_name [1] IMPLICIT Transfer_syntax_name
|
||||
}
|
||||
|
||||
Presentation_requirements ::= BIT STRING { context_management (0), restoration (1) }
|
||||
|
||||
User_session_requirements ::= BIT STRING {
|
||||
half_duplex (0),
|
||||
duplex (1),
|
||||
expedited_data (2),
|
||||
minor_synchronize (3),
|
||||
major_synchronize (4),
|
||||
resynchronize (5),
|
||||
activity_management (6),
|
||||
negotiated_release (7),
|
||||
capability_data (8),
|
||||
exceptions (9),
|
||||
typed_data (10),
|
||||
symmetric_synchronize (11),
|
||||
data_separation (12)
|
||||
}
|
||||
|
||||
END
|
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm -r ../../src/main/java-gen/*
|
||||
|
||||
jasn1-compiler -o "../../src/main/java-gen" -p "org.openmuc.openiec61850.internal.mms" -f mms.asn
|
@ -0,0 +1,723 @@
|
||||
--
|
||||
-- Part of the ASN.1-Specification for MMS
|
||||
-- tries to include only those parts relevant for IEC 61850
|
||||
-- source: http://www.nettedautomation.com/standardization/iso/tc184/sc5/wg2/mms_syntax/Version1999/mms_syntax.html
|
||||
|
||||
ASN1 { iso standard 9506 part(2) mms-general-module-version(2) } DEFINITIONS ::= BEGIN
|
||||
|
||||
MMSpdu ::= CHOICE {
|
||||
confirmed-RequestPDU [0] IMPLICIT Confirmed-RequestPDU,
|
||||
confirmed-ResponsePDU [1] IMPLICIT Confirmed-ResponsePDU,
|
||||
confirmed-ErrorPDU [2] IMPLICIT Confirmed-ErrorPDU,
|
||||
unconfirmed-PDU [3] IMPLICIT Unconfirmed-PDU,
|
||||
rejectPDU [4] IMPLICIT RejectPDU,
|
||||
initiate-RequestPDU [8] IMPLICIT Initiate-RequestPDU,
|
||||
initiate-ResponsePDU [9] IMPLICIT Initiate-ResponsePDU,
|
||||
initiate-ErrorPDU [10] IMPLICIT Initiate-ErrorPDU,
|
||||
conclude-RequestPDU [11] IMPLICIT Conclude-RequestPDU
|
||||
}
|
||||
|
||||
Confirmed-RequestPDU ::= SEQUENCE {
|
||||
invokeID Unsigned32,
|
||||
service ConfirmedServiceRequest
|
||||
}
|
||||
|
||||
ConfirmedServiceRequest ::= CHOICE {
|
||||
getNameList [1] IMPLICIT GetNameList-Request,
|
||||
read [4] IMPLICIT Read-Request,
|
||||
write [5] IMPLICIT Write-Request,
|
||||
getVariableAccessAttributes [6] GetVariableAccessAttributes-Request,
|
||||
defineNamedVariableList [11] IMPLICIT DefineNamedVariableList-Request,
|
||||
getNamedVariableListAttributes [12] GetNamedVariableListAttributes-Request,
|
||||
deleteNamedVariableList [13] IMPLICIT DeleteNamedVariableList-Request
|
||||
}
|
||||
|
||||
Unconfirmed-PDU ::= SEQUENCE {
|
||||
service UnconfirmedService
|
||||
}
|
||||
|
||||
UnconfirmedService ::= CHOICE {
|
||||
informationReport [0] IMPLICIT InformationReport
|
||||
}
|
||||
|
||||
Confirmed-ResponsePDU ::= SEQUENCE {
|
||||
invokeID Unsigned32,
|
||||
service ConfirmedServiceResponse
|
||||
}
|
||||
|
||||
ConfirmedServiceResponse ::= CHOICE {
|
||||
getNameList [1] IMPLICIT GetNameList-Response,
|
||||
read [4] IMPLICIT Read-Response,
|
||||
write [5] IMPLICIT Write-Response,
|
||||
getVariableAccessAttributes [6] IMPLICIT GetVariableAccessAttributes-Response,
|
||||
defineNamedVariableList [11] IMPLICIT DefineNamedVariableList-Response,
|
||||
getNamedVariableListAttributes [12] IMPLICIT GetNamedVariableListAttributes-Response,
|
||||
deleteNamedVariableList [13] IMPLICIT DeleteNamedVariableList-Response
|
||||
}
|
||||
|
||||
|
||||
Confirmed-ErrorPDU ::= SEQUENCE {
|
||||
invokeID [0] IMPLICIT Unsigned32,
|
||||
modifierPosition [1] IMPLICIT Unsigned32 OPTIONAL,
|
||||
serviceError [2] IMPLICIT ServiceError
|
||||
}
|
||||
|
||||
|
||||
ServiceError ::= SEQUENCE {
|
||||
errorClass [0] CHOICE {
|
||||
vmd_state [0] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- vmd-state-conflict (1),
|
||||
-- vmd-operational-problem (2),
|
||||
-- domain-transfer-problem (3),
|
||||
-- state-machine-id-invalid (4)
|
||||
-- },
|
||||
application_reference [1] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- aplication-unreachable (1),
|
||||
-- connection-lost (2),
|
||||
-- application-reference-invalid (3),
|
||||
-- context-unsupported (4)
|
||||
-- },
|
||||
definition [2] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- object-undefined (1),
|
||||
-- invalid-address (2),
|
||||
-- type-unsupported (3),
|
||||
-- type-inconsistent (4),
|
||||
-- object-exists (5),
|
||||
-- object-attribute-inconsistent (6)
|
||||
-- },
|
||||
resource [3] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- memory-unavailable (1),
|
||||
-- processor-resource-unavailable (2),
|
||||
-- mass-storage-unavailable (3),
|
||||
-- capability-unavailable (4),
|
||||
-- capability-unknown (5)
|
||||
-- },
|
||||
service [4] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- primitives-out-of-sequence (1),
|
||||
-- object-state-conflict (2),
|
||||
-- pdu-size (3),
|
||||
-- continuation-invalid (4),
|
||||
-- object-constraint-conflict (5)
|
||||
-- },
|
||||
service_preempt [5] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- timeout (1),
|
||||
-- deadlock (2),
|
||||
-- cancel (3)
|
||||
-- },
|
||||
time_resolution [6] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- unsupportable-time-resolution (1)
|
||||
-- },
|
||||
access [7] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- object-access-unsupported (1),
|
||||
-- object-non-existent (2),
|
||||
-- object-access-denied (3),
|
||||
-- object-invalidated (4)
|
||||
-- },
|
||||
initiate [8] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- version-incompatible (1),
|
||||
-- max-segment-insufficient (2),
|
||||
-- max-services-outstanding-calling-insufficient (3),
|
||||
-- max-services-outstanding-called-insufficient (4),
|
||||
-- service-CBB-insufficient (5),
|
||||
-- parameter-CBB-insufficient (6),
|
||||
-- nesting-level-insufficient (7)
|
||||
-- },
|
||||
conclude [9] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- further-communication-required (1)
|
||||
-- },
|
||||
cancel [10] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invoke-id-unknown (1),
|
||||
-- cancel-not-possible (2)
|
||||
-- },
|
||||
file [11] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- filename-ambiguous (1),
|
||||
-- file-busy (2),
|
||||
-- filename-syntax_Error (3),
|
||||
-- content-type-invalid (4),
|
||||
-- position-invalid (5),
|
||||
-- file-acces-denied (6),
|
||||
-- file-non-existent (7),
|
||||
-- duplicate-filename (8),
|
||||
-- insufficient-space-in-filestore (9)
|
||||
-- },
|
||||
others [12] IMPLICIT INTEGER
|
||||
},
|
||||
additionalCode [1] IMPLICIT INTEGER OPTIONAL,
|
||||
additionalDescription [2] IMPLICIT VisibleString OPTIONAL
|
||||
-- serviceSpecificInformation [3] CHOICE
|
||||
-- {
|
||||
-- obtainFile [0] IMPLICIT ObtainFile_Error,
|
||||
-- start [1] IMPLICIT Start_Error,
|
||||
-- stop [2] IMPLICIT Stop_Error,
|
||||
-- resume [3] IMPLICIT Resume_Error,
|
||||
-- reset [4] IMPLICIT Reset_Error,
|
||||
-- deleteVariableAccess [5] IMPLICIT DeleteVariableAccess_Error,
|
||||
-- deleteNamedVariableList [6] IMPLICIT DeleteNamedVariableList_Error,
|
||||
-- deleteNamedType [7] IMPLICIT DeleteNamedType_Error,
|
||||
-- defineEventEnrollment_Error [8] DefineEventEnrollment_Error,
|
||||
-- fileRename [9] IMPLICIT FileRename_Error
|
||||
-- this one is neither in this ASN nor in the IMPORTS
|
||||
-- additionalService [10] AdditionalServiceError
|
||||
-- } OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
TimeOfDay ::= OCTET STRING (SIZE(4|6))
|
||||
|
||||
BasicIdentifier ::= VisibleString ( FROM
|
||||
("A"|"a"|"B"|"b"|"C"|"c"|"D"|"d"|"E"|"e"|"F"|"f"|
|
||||
"G"|"g"|"H"|"h"|"I"|"i"|"J"|"j"|"K"|"k"|"L"|"l"|
|
||||
"M"|"m"|"N"|"n"|"O"|"o"|"P"|"p"|"Q"|"q"|"R"|"r"|
|
||||
"S"|"s"|"T"|"t"|"U"|"u"|"V"|"v"|"W"|"w"|"X"|"x"|
|
||||
"Y"|"y"|"Z"|"z"|"$"|"_"|"0"|"1"|"2"|"3"|"4"|"5"|
|
||||
"6"|"7"|"8"|"9") ) (SIZE(1..32))
|
||||
|
||||
|
||||
Identifier ::= VisibleString
|
||||
|
||||
Integer8 ::= INTEGER(-128..127)
|
||||
Integer16 ::= INTEGER(-32768..32767)
|
||||
Integer32 ::= INTEGER(-2147483648..2147483647)
|
||||
|
||||
Unsigned8 ::= INTEGER(0..255)
|
||||
Unsigned16 ::= INTEGER(0..65535)
|
||||
Unsigned32 ::= INTEGER(0..4294967295)
|
||||
|
||||
ObjectName ::= CHOICE {
|
||||
vmd-specific [0] IMPLICIT Identifier,
|
||||
domain-specific [1] IMPLICIT SEQUENCE {
|
||||
domainID Identifier,
|
||||
itemID Identifier
|
||||
},
|
||||
aa-specific [2] IMPLICIT Identifier
|
||||
}
|
||||
|
||||
|
||||
ObjectClass ::= CHOICE {
|
||||
basicObjectClass [0] IMPLICIT INTEGER
|
||||
-- {
|
||||
-- namedVariable (0),
|
||||
-- scatteredAccess (1),
|
||||
-- namedVariableList (2),
|
||||
-- namedType (3),
|
||||
-- semaphore (4),
|
||||
-- eventCondition (5),
|
||||
-- eventAction (6),
|
||||
-- eventEnrollment (7),
|
||||
-- journal (8),
|
||||
-- domain (9),
|
||||
-- programInvocation (10),
|
||||
-- operatorStation (11),
|
||||
-- dataExchange (12), ---- Shall not appear in minor version 1
|
||||
-- accessControlList (13) ---- Shall not appear in minor version 1 or 2
|
||||
-- }
|
||||
}
|
||||
|
||||
MMSString ::= VisibleString
|
||||
|
||||
|
||||
Initiate-RequestPDU ::= SEQUENCE {
|
||||
localDetailCalling [0] IMPLICIT Integer32 OPTIONAL,
|
||||
proposedMaxServOutstandingCalling [1] IMPLICIT Integer16,
|
||||
proposedMaxServOutstandingCalled [2] IMPLICIT Integer16,
|
||||
proposedDataStructureNestingLevel [3] IMPLICIT Integer8 OPTIONAL,
|
||||
initRequestDetail [4] IMPLICIT SEQUENCE {
|
||||
proposedVersionNumber [0] IMPLICIT Integer16,
|
||||
proposedParameterCBB [1] IMPLICIT ParameterSupportOptions,
|
||||
servicesSupportedCalling [2] IMPLICIT ServiceSupportOptions
|
||||
}
|
||||
}
|
||||
|
||||
Initiate-ResponsePDU ::= SEQUENCE {
|
||||
localDetailCalled [0] IMPLICIT Integer32 OPTIONAL,
|
||||
negotiatedMaxServOutstandingCalling [1] IMPLICIT Integer16,
|
||||
negotiatedMaxServOutstandingCalled [2] IMPLICIT Integer16,
|
||||
negotiatedDataStructureNestingLevel [3] IMPLICIT Integer8 OPTIONAL,
|
||||
initResponseDetail [4] IMPLICIT SEQUENCE {
|
||||
negotiatedVersionNumber [0] IMPLICIT Integer16,
|
||||
negotiatedParameterCBB [1] IMPLICIT ParameterSupportOptions,
|
||||
servicesSupportedCalled [2] IMPLICIT ServiceSupportOptions
|
||||
}
|
||||
}
|
||||
|
||||
Initiate-ErrorPDU ::= ServiceError
|
||||
|
||||
Conclude-RequestPDU ::= NULL
|
||||
|
||||
|
||||
RejectPDU ::= SEQUENCE
|
||||
{
|
||||
originalInvokeID [0] IMPLICIT Unsigned32 OPTIONAL,
|
||||
rejectReason CHOICE
|
||||
{
|
||||
confirmed-requestPDU [1] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- unrecognized-service (1),
|
||||
-- unrecognized-modifier (2),
|
||||
-- invalid-invokeID (3),
|
||||
-- invalid-argument (4),
|
||||
-- invalid-modifier (5),
|
||||
-- max-serv-outstanding-exceeded (6),
|
||||
-- max-recursion-exceeded (8),
|
||||
-- value-out-of-range (9)
|
||||
-- },
|
||||
|
||||
confirmed-responsePDU [2] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- unrecognized-service (1),
|
||||
-- invalid-invokeID (2),
|
||||
-- invalid-result (3),
|
||||
-- max-recursion-exceeded (5),
|
||||
-- value-out-of-range (6)
|
||||
-- },
|
||||
|
||||
confirmed-errorPDU [3] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- unrecognized-service (1),
|
||||
-- invalid-invokeID (2),
|
||||
-- invalid-serviceError (3),
|
||||
-- value-out-of-range (4)
|
||||
-- } ,
|
||||
|
||||
unconfirmedPDU [4] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- unrecognized-service (1),
|
||||
-- invalid-argument (2),
|
||||
-- max-recursion-exceeded (3),
|
||||
-- value-out-of-range (4)
|
||||
-- },
|
||||
|
||||
pdu-error [5] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- unknown-pdu-type (0),
|
||||
-- invalid-pdu (1),
|
||||
-- illegal-acse-mapping (2)
|
||||
-- },
|
||||
|
||||
cancel-requestPDU [6] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invalid-invokeID (1)
|
||||
-- },
|
||||
|
||||
cancel-responsePDU [7] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invalid-invokeID (1)
|
||||
-- },
|
||||
|
||||
cancel-errorPDU [8] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invalid-invokeID (1),
|
||||
-- invalid-serviceError (2),
|
||||
-- value-out-of-range (3)
|
||||
-- },
|
||||
|
||||
conclude-requestPDU [9] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invalid-argument (1)
|
||||
-- },
|
||||
|
||||
conclude-responsePDU [10] IMPLICIT INTEGER,
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invalid-result (1)
|
||||
-- },
|
||||
|
||||
conclude-errorPDU [11] IMPLICIT INTEGER
|
||||
-- {
|
||||
-- other (0),
|
||||
-- invalid-serviceError (1),
|
||||
-- value-out-of-range (2)
|
||||
-- }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GetNameList-Request ::= SEQUENCE {
|
||||
objectClass [0] ObjectClass,
|
||||
objectScope [1] CHOICE {
|
||||
vmdSpecific [0] IMPLICIT NULL,
|
||||
domainSpecific [1] IMPLICIT Identifier,
|
||||
aaSpecific [2] IMPLICIT NULL
|
||||
},
|
||||
continueAfter [2] IMPLICIT Identifier OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
GetNameList-Response ::= SEQUENCE {
|
||||
listOfIdentifier [0] IMPLICIT SEQUENCE OF Identifier,
|
||||
moreFollows [1] IMPLICIT BOOLEAN DEFAULT TRUE
|
||||
}
|
||||
|
||||
|
||||
TypeSpecification ::= CHOICE {
|
||||
-- typeName [0] ObjectName,
|
||||
typeDescription TypeDescription
|
||||
}
|
||||
|
||||
AlternateAccess ::= SEQUENCE OF CHOICE {
|
||||
unnamed AlternateAccessSelection
|
||||
-- named [5] IMPLICIT SEQUENCE {
|
||||
-- componentName [0] CHOICE {
|
||||
-- basic BasicIdentifier,
|
||||
-- extended ExtendedIdentifier
|
||||
-- },
|
||||
-- access AlternateAccessSelection
|
||||
-- }
|
||||
}
|
||||
|
||||
AlternateAccessSelection ::= CHOICE {
|
||||
|
||||
selectAlternateAccess [0] IMPLICIT SEQUENCE {
|
||||
accessSelection CHOICE {
|
||||
component [0] CHOICE {
|
||||
basic BasicIdentifier --,
|
||||
--extended ExtendedIdentifier
|
||||
}, -- component
|
||||
index [1] IMPLICIT Unsigned32, -- 1 array element
|
||||
indexRange [2] IMPLICIT SEQUENCE { -- array elements
|
||||
lowIndex [0] IMPLICIT Unsigned32,
|
||||
numberOfElements [1] IMPLICIT Unsigned32
|
||||
},
|
||||
allElements [3] IMPLICIT NULL -- all array elements
|
||||
},
|
||||
alternateAccess AlternateAccess
|
||||
},
|
||||
selectAccess CHOICE {
|
||||
component [1] CHOICE {
|
||||
basic BasicIdentifier --,
|
||||
--extended ExtendedIdentifier
|
||||
}, -- component
|
||||
index [2] IMPLICIT Unsigned32, -- 1 array element
|
||||
indexRange [3] IMPLICIT SEQUENCE { -- array elements
|
||||
lowIndex [0] IMPLICIT Unsigned32,
|
||||
numberOfElements [1] IMPLICIT Unsigned32
|
||||
},
|
||||
allElements [4] IMPLICIT NULL -- all array elements
|
||||
}
|
||||
}
|
||||
|
||||
AccessResult ::= CHOICE {
|
||||
failure [0] IMPLICIT DataAccessError,
|
||||
success Data
|
||||
}
|
||||
|
||||
|
||||
Data ::= CHOICE {
|
||||
-- context tag 0 is reserved for AccessResult
|
||||
array [1] IMPLICIT SEQUENCE OF Data,
|
||||
structure [2] IMPLICIT SEQUENCE OF Data,
|
||||
--boolean [3] IMPLICIT BOOLEAN,
|
||||
bool [3] IMPLICIT BOOLEAN,
|
||||
bit-string [4] IMPLICIT BIT STRING,
|
||||
integer [5] IMPLICIT INTEGER,
|
||||
unsigned [6] IMPLICIT INTEGER, -- shall not be negative
|
||||
floating-point [7] IMPLICIT FloatingPoint,
|
||||
-- [8] is reserved
|
||||
octet-string [9] IMPLICIT OCTET STRING,
|
||||
visible-string [10] IMPLICIT VisibleString,
|
||||
--generalized-time [11] IMPLICIT GeneralizedTime,
|
||||
binary-time [12] IMPLICIT TimeOfDay,
|
||||
--bcd [13] IMPLICIT INTEGER, ---- shall not be negative
|
||||
--booleanArray [14] IMPLICIT BIT STRING,
|
||||
--objId [15] IMPLICIT OBJECT IDENTIFIER,
|
||||
--...,
|
||||
mMSString [16] IMPLICIT MMSString,
|
||||
utc-time [17] IMPLICIT UtcTime -- added by IEC61850 8.1 G3
|
||||
}
|
||||
|
||||
|
||||
FloatingPoint ::= OCTET STRING
|
||||
|
||||
DataAccessError ::= INTEGER
|
||||
--{
|
||||
-- object-invalidated (0),
|
||||
-- hardware-fault (1),
|
||||
-- temporarily-unavailable (2),
|
||||
-- object-access-denied (3),
|
||||
-- object-undefined (4),
|
||||
-- invalid-address (5),
|
||||
-- type-unsupported (6),
|
||||
-- type-inconsistent (7),
|
||||
-- object-attribute-inconsistent (8),
|
||||
-- object-access-unsupported (9),
|
||||
-- object-non-existent (10),
|
||||
-- object-value-invalid (11)
|
||||
--}
|
||||
|
||||
|
||||
VariableAccessSpecification ::= CHOICE {
|
||||
listOfVariable [0] IMPLICIT VariableDefs,
|
||||
variableListName [1] ObjectName
|
||||
}
|
||||
|
||||
VariableDefs ::= SEQUENCE OF SEQUENCE {
|
||||
variableSpecification VariableSpecification,
|
||||
alternateAccess [5] IMPLICIT AlternateAccess OPTIONAL
|
||||
}
|
||||
|
||||
VariableSpecification ::= CHOICE {
|
||||
name [0] ObjectName
|
||||
-- address [1] Address,
|
||||
-- variableDescription [2] IMPLICIT SEQUENCE {
|
||||
-- address Address,
|
||||
-- typeSpecificationTypeSpecification
|
||||
-- },
|
||||
|
||||
-- the following element is present only to support the services
|
||||
-- defined in annex E
|
||||
-- scatteredAccessDescription [3] IMPLICIT ScatteredAccessDescription,
|
||||
-- invalidated [4] IMPLICIT NULL
|
||||
}
|
||||
|
||||
Read-Request ::= SEQUENCE {
|
||||
specificationWithResult [0] IMPLICIT BOOLEAN DEFAULT FALSE,
|
||||
variableAccessSpecification [1] VariableAccessSpecification
|
||||
}
|
||||
|
||||
Read-Response ::= SEQUENCE {
|
||||
variableAccessSpecification [0] VariableAccessSpecification OPTIONAL,
|
||||
listOfAccessResult [1] IMPLICIT SEQUENCE OF AccessResult
|
||||
}
|
||||
|
||||
Write-Request ::= SEQUENCE {
|
||||
variableAccessSpecification VariableAccessSpecification,
|
||||
listOfData [0] IMPLICIT SEQUENCE OF Data
|
||||
}
|
||||
|
||||
Write-Response ::= SEQUENCE OF CHOICE {
|
||||
failure [0] IMPLICIT DataAccessError,
|
||||
success [1] IMPLICIT NULL
|
||||
}
|
||||
|
||||
InformationReport ::= SEQUENCE {
|
||||
variableAccessSpecification VariableAccessSpecification,
|
||||
listOfAccessResult [0] IMPLICIT SEQUENCE OF AccessResult
|
||||
}
|
||||
|
||||
GetVariableAccessAttributes-Request ::= CHOICE {
|
||||
name [0] ObjectName
|
||||
-- address [1] Address
|
||||
}
|
||||
|
||||
GetVariableAccessAttributes-Response ::= SEQUENCE {
|
||||
mmsDeletable [0] IMPLICIT BOOLEAN,
|
||||
-- address [1] Address OPTIONAL,
|
||||
typeDescription [2] TypeDescription
|
||||
-- accessControlList [3] CHOICE {
|
||||
-- basic BasicIdentifier,
|
||||
-- extended ExtendedIdentifier
|
||||
-- } OPTIONAL,
|
||||
-- meaning [4] ObjectName OPTIONAL
|
||||
}
|
||||
|
||||
DefineNamedVariableList-Request ::= SEQUENCE {
|
||||
variableListName ObjectName,
|
||||
listOfVariable [0] IMPLICIT VariableDefs
|
||||
}
|
||||
|
||||
DefineNamedVariableList-Response ::= NULL
|
||||
|
||||
GetNamedVariableListAttributes-Request ::= ObjectName -- VariableListName
|
||||
|
||||
GetNamedVariableListAttributes-Response ::= SEQUENCE {
|
||||
mmsDeletable [0] IMPLICIT BOOLEAN,
|
||||
listOfVariable [1] IMPLICIT VariableDefs
|
||||
-- accessControlList [2] CHOICE {
|
||||
-- basic BasicIdentifier,
|
||||
-- extended ExtendedIdentifier
|
||||
-- } OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
DeleteNamedVariableList-Request ::= SEQUENCE {
|
||||
scopeOfDelete [0] IMPLICIT INTEGER DEFAULT 0,
|
||||
-- {
|
||||
-- specific (0),
|
||||
-- aa-specific (1),
|
||||
-- domain (2),
|
||||
-- vmd (3)
|
||||
-- } DEFAULT specific,
|
||||
listOfVariableListName [1] IMPLICIT SEQUENCE OF ObjectName OPTIONAL,
|
||||
domainName [2] CHOICE {
|
||||
basic BasicIdentifier --,
|
||||
--extended ExtendedIdentifier
|
||||
} OPTIONAL
|
||||
}
|
||||
|
||||
DeleteNamedVariableList-Response ::= SEQUENCE {
|
||||
numberMatched [0] IMPLICIT Unsigned32,
|
||||
numberDeleted [1] IMPLICIT Unsigned32
|
||||
}
|
||||
|
||||
TypeDescription ::= CHOICE {
|
||||
array [1] IMPLICIT SEQUENCE {
|
||||
packed [0] IMPLICIT BOOLEAN DEFAULT FALSE,
|
||||
numberOfElements [1] IMPLICIT Unsigned32,
|
||||
elementType [2] TypeSpecification
|
||||
},
|
||||
structure [2] IMPLICIT SEQUENCE {
|
||||
packed [0] IMPLICIT BOOLEAN DEFAULT FALSE,
|
||||
components [1] IMPLICIT SEQUENCE OF SEQUENCE {
|
||||
componentName [0] IMPLICIT Identifier OPTIONAL,
|
||||
componentType [1] TypeSpecification
|
||||
}
|
||||
},
|
||||
|
||||
-- Simple Size Class
|
||||
--boolean [3] IMPLICIT NULL,
|
||||
bool [3] IMPLICIT NULL,
|
||||
bit-string [4] IMPLICIT Integer32, -- BIT-STRING
|
||||
integer [5] IMPLICIT Unsigned8, -- INTEGER
|
||||
unsigned [6] IMPLICIT Unsigned8, -- UNSIGNED
|
||||
floating-point [7] IMPLICIT SEQUENCE {
|
||||
format-width Unsigned8, -- number of bits of
|
||||
-- floating point value
|
||||
-- including sign, exponent,
|
||||
-- and fraction
|
||||
exponent-width Unsigned8 -- size of exponent in bits
|
||||
},
|
||||
|
||||
-- [8] is reserved
|
||||
octet-string [9] IMPLICIT Integer32, -- OCTET-STRING
|
||||
visible-string [10] IMPLICIT Integer32, -- VISIBLE-STRING
|
||||
-- generalized-time [11] IMPLICIT NULL, ---- GENERALIZED-TIME
|
||||
binary-time [12] IMPLICIT BOOLEAN, -- BINARY-TIME
|
||||
-- bcd [13] IMPLICIT Unsigned8, ---- BCD
|
||||
-- objId [15] IMPLICIT NULL,
|
||||
--...,
|
||||
mMSString [16] IMPLICIT Integer32, -- MMS String
|
||||
utc-time [17] IMPLICIT NULL -- from IEC61850 8.1 G.2
|
||||
}
|
||||
|
||||
UtcTime ::= OCTET STRING (SIZE (8))
|
||||
|
||||
|
||||
ParameterSupportOptions ::= BIT STRING
|
||||
--{
|
||||
-- str1 (0), str2 (1), vnam (2), valt (3), vadr (4), vsca (5), tpy (6), vlis (7), real (8), cei (10)
|
||||
--}
|
||||
|
||||
ServiceSupportOptions ::= BIT STRING
|
||||
-- {
|
||||
-- status (0),
|
||||
-- getNameList (1),
|
||||
-- identify (2),
|
||||
-- rename (3),
|
||||
-- read (4),
|
||||
-- write (5),
|
||||
-- getVariableAccessAttributes (6),
|
||||
-- defineNamedVariable (7),
|
||||
-- defineScatteredAccess (8),
|
||||
-- getScatteredAccessAttributes (9),
|
||||
-- deleteVariableAccess (10),
|
||||
-- defineNamedVariableList (11),
|
||||
-- getNamedVariableListAttributes (12),
|
||||
-- deleteNamedVariableList (13),
|
||||
-- defineNamedType (14),
|
||||
-- getNamedTypeAttributes (15),
|
||||
-- deleteNamedType (16),
|
||||
-- input (17),
|
||||
-- output (18),
|
||||
-- takeControl (19),
|
||||
-- relinquishControl (20),
|
||||
-- defineSemaphore (21),
|
||||
-- deleteSemaphore (22),
|
||||
-- reportSemaphoreStatus (23),
|
||||
-- reportPoolSemaphoreStatus (24),
|
||||
-- reportSemaphoreEntryStatus (25),
|
||||
-- initiateDownloadSequence (26),
|
||||
-- downloadSegment (27),
|
||||
-- terminateDownloadSequence (28),
|
||||
-- initiateUploadSequence (29),
|
||||
-- uploadSegment (30),
|
||||
-- terminateUploadSequence (31),
|
||||
-- requestDomainDownload (32),
|
||||
-- requestDomainUpload (33),
|
||||
-- loadDomainContent (34),
|
||||
-- storeDomainContent (35),
|
||||
-- deleteDomain (36),
|
||||
-- getDomainAttributes (37),
|
||||
-- createProgramInvocation (38),
|
||||
-- deleteProgramInvocation (39),
|
||||
-- start (40),
|
||||
-- stop (41),
|
||||
-- resume (42),
|
||||
-- reset (43),
|
||||
-- kill (44),
|
||||
-- getProgramInvocationAttributes (45),
|
||||
-- obtainFile (46),
|
||||
-- defineEventCondition (47),
|
||||
-- deleteEventCondition (48),
|
||||
-- getEventConditionAttributes (49),
|
||||
-- reportEventConditionStatus (50),
|
||||
-- alterEventConditionMonitoring (51),
|
||||
-- triggerEvent (52),
|
||||
-- defineEventAction (53),
|
||||
-- deleteEventAction (54),
|
||||
-- getEventActionAttributes (55),
|
||||
-- reportEventActionStatus (56),
|
||||
-- defineEventEnrollment (57),
|
||||
-- deleteEventEnrollment (58),
|
||||
-- alterEventEnrollment (59),
|
||||
-- reportEventEnrollmentStatus (60),
|
||||
-- getEventEnrollmentAttributes (61),
|
||||
-- acknowledgeEventNotification (62),
|
||||
-- getAlarmSummary (63),
|
||||
-- getAlarmEnrollmentSummary (64),
|
||||
-- readJournal (65),
|
||||
-- writeJournal (66),
|
||||
-- initializeJournal (67),
|
||||
-- reportJournalStatus (68),
|
||||
-- createJournal (69),
|
||||
-- deleteJournal (70),
|
||||
-- getCapabilityList (71),
|
||||
-- fileOpen (72),
|
||||
-- fileRead (73),
|
||||
-- fileClose (74),
|
||||
-- fileRename (75),
|
||||
-- fileDelete (76),
|
||||
-- fileDirectory (77),
|
||||
-- unsolicitedStatus (78),
|
||||
-- informationReport (79),
|
||||
-- eventNotification (80),
|
||||
-- attachToEventCondition (81),
|
||||
-- attachToSemaphore (82),
|
||||
-- conclude (83),
|
||||
-- cancel (84)
|
||||
-- }
|
||||
|
||||
|
||||
|
||||
END
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,318 @@
|
||||
MMSDEF DEFINITIONS::=
|
||||
BEGIN
|
||||
|
||||
MMSpdu ::= CHOICE {
|
||||
confirmed_RequestPDU [0] IMPLICIT Confirmed_RequestPDU,
|
||||
confirmed_ResponsePDU [1] IMPLICIT Confirmed_ResponsePDU,
|
||||
initiate_RequestPDU [8] IMPLICIT Initiate_RequestPDU,
|
||||
initiate_ResponsePDU [9] IMPLICIT Initiate_ResponsePDU
|
||||
}
|
||||
|
||||
Initiate_RequestPDU ::= SEQUENCE {
|
||||
localDetailCalling [0] IMPLICIT Integer32 OPTIONAL,
|
||||
proposedMaxServOutstandingCalling [1] IMPLICIT Integer16,
|
||||
proposedMaxServOutstandingCalled [2] IMPLICIT Integer16,
|
||||
proposedDataStructureNestingLevel [3] IMPLICIT Integer8 OPTIONAL,
|
||||
initRequestDetail [4] IMPLICIT SEQUENCE {
|
||||
proposedVersionNumber [0] IMPLICIT Integer16,
|
||||
proposedParameterCBB [1] IMPLICIT ParameterSupportOptions,
|
||||
servicesSupportedCalling [2] IMPLICIT ServiceSupportOptions
|
||||
}
|
||||
}
|
||||
|
||||
Initiate_ResponsePDU ::= SEQUENCE {
|
||||
localDetailCalled [0] IMPLICIT Integer32 OPTIONAL,
|
||||
negotiatedMaxServOutstandingCalling [1] IMPLICIT Integer16,
|
||||
negotiatedMaxServOutstandingCalled [2] IMPLICIT Integer16,
|
||||
negotiatedDataStructureNestingLevel [3] IMPLICIT Integer8 OPTIONAL,
|
||||
initResponseDetail [4] IMPLICIT SEQUENCE {
|
||||
negotiatedVersionNumber [0] IMPLICIT Integer16,
|
||||
negotiatedParameterCBB [1] IMPLICIT ParameterSupportOptions,
|
||||
servicesSupportedCalled [2] IMPLICIT ServiceSupportOptions
|
||||
}
|
||||
}
|
||||
|
||||
ParameterSupportOptions ::= BIT STRING {
|
||||
|
||||
str1 (0),
|
||||
str2 (1),
|
||||
vnam (2),
|
||||
valt (3),
|
||||
vadr (4),
|
||||
-- bit 5 is reserved
|
||||
vsca (5),
|
||||
tpy (6),
|
||||
vlis (7),
|
||||
-- bit 8 is reserved
|
||||
-- bit 9 is reserved
|
||||
cei (10),
|
||||
aco (11),
|
||||
sem (12),
|
||||
csr (13),
|
||||
csnc (14),
|
||||
csplc (15),
|
||||
cspi (16)
|
||||
}
|
||||
|
||||
ServiceSupportOptions ::= BIT STRING {
|
||||
status (0),
|
||||
getNameList (1),
|
||||
identify (2),
|
||||
rename (3),
|
||||
read (4),
|
||||
write (5),
|
||||
getVariableAccessAttributes (6),
|
||||
defineNamedVariable (7),
|
||||
-- bit 8 is reserved for use of a service defined in annex E
|
||||
defineScatteredAccess (8),
|
||||
-- bit 9 is reserved for use of a service defined in annex E
|
||||
getScatteredAccessAttributes (9),
|
||||
deleteVariableAccess (10),
|
||||
defineNamedVariableList (11),
|
||||
getNamedVariableListAttributes (12),
|
||||
deleteNamedVariableList (13),
|
||||
defineNamedType (14),
|
||||
getNamedTypeAttributes (15),
|
||||
deleteNamedType (16),
|
||||
input (17),
|
||||
output (18),
|
||||
takeControl (19),
|
||||
relinquishControl (20),
|
||||
defineSemaphore (21),
|
||||
deleteSemaphore (22),
|
||||
reportSemaphoreStatus (23),
|
||||
reportPoolSemaphoreStatus (24),
|
||||
reportSemaphoreEntryStatus (25),
|
||||
initiateDownloadSequence (26),
|
||||
downloadSegment (27),
|
||||
terminateDownloadSequence (28),
|
||||
initiateUploadSequence (29),
|
||||
uploadSegment (30),
|
||||
terminateUploadSequence (31),
|
||||
requestDomainDownload (32),
|
||||
requestDomainUpload (33),
|
||||
loadDomainContent (34),
|
||||
storeDomainContent (35),
|
||||
deleteDomain (36),
|
||||
getDomainAttributes (37),
|
||||
createProgramInvocation (38),
|
||||
deleteProgramInvocation (39),
|
||||
start (40),
|
||||
stop (41),
|
||||
resume (42),
|
||||
reset (43),
|
||||
kill (44),
|
||||
getProgramInvocationAttributes (45),
|
||||
obtainFile (46),
|
||||
defineEventCondition (47),
|
||||
deleteEventCondition (48),
|
||||
getEventConditionAttributes (49),
|
||||
reportEventConditionStatus (50),
|
||||
alterEventConditionMonitoring (51),
|
||||
triggerEvent (52),
|
||||
defineEventAction (53),
|
||||
deleteEventAction (54),
|
||||
getEventActionAttributes (55),
|
||||
reportEventActionStatus (56),
|
||||
defineEventEnrollment (57),
|
||||
deleteEventEnrollment (58),
|
||||
alterEventEnrollment (59),
|
||||
reportEventEnrollmentStatus (60),
|
||||
getEventEnrollmentAttributes (61),
|
||||
acknowledgeEventNotification (62),
|
||||
getAlarmSummary (63),
|
||||
getAlarmEnrollmentSummary (64),
|
||||
readJournal (65),
|
||||
writeJournal (66),
|
||||
initializeJournal (67),
|
||||
reportJournalStatus (68),
|
||||
createJournal (69),
|
||||
deleteJournal (70),
|
||||
getCapabilityList (71),
|
||||
-- bit 72 is reserved for use of a service defined in annex D
|
||||
fileOpen (72),
|
||||
-- bit 73 is reserved for use of a service defined in annex D
|
||||
fileRead (73),
|
||||
-- bit 74 is reserved for use of a service defined in annex D
|
||||
fileClose (74),
|
||||
-- bit 75 is reserved for use of a service defined in annex D
|
||||
fileRename (75),
|
||||
-- bit 76 is reserved for use of a service defined in annex D
|
||||
fileDelete (76),
|
||||
-- bit 77 is reserved for use of a service defined in annex D
|
||||
fileDirectory (77),
|
||||
unsolicitedStatus (78),
|
||||
informationReport (79),
|
||||
eventNotification (80),
|
||||
attachToEventCondition (81),
|
||||
attachToSemaphore (82),
|
||||
conclude (83),
|
||||
cancel (84),
|
||||
getDataExchangeAttributes (85),
|
||||
-- Shall not appear in minor version one
|
||||
exchangeData (86),
|
||||
-- Shall not appear in minor version one
|
||||
defineAccessControlList (87),
|
||||
-- Shall not appear in minor version one or two
|
||||
getAccessControlListAttributes (88),
|
||||
-- Shall not appear in minor version one or two
|
||||
reportAccessControlledObjects (89),
|
||||
-- Shall not appear in minor version one or two
|
||||
deleteAccessControlList (90),
|
||||
-- Shall not appear in minor version one or two
|
||||
alterAccessControl (91),
|
||||
-- Shall not appear in minor version one or two
|
||||
reconfigureProgramInvocation (92)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Confirmed_RequestPDU ::= SEQUENCE {
|
||||
invokeID Unsigned32,
|
||||
service ConfirmedServiceRequest
|
||||
}
|
||||
|
||||
Confirmed_ResponsePDU ::= SEQUENCE {
|
||||
invokeID Unsigned32,
|
||||
service ConfirmedServiceResponse
|
||||
}
|
||||
|
||||
GetNameList_Response ::= SEQUENCE {
|
||||
listOfIdentifier [0] IMPLICIT SEQUENCE OF Identifier,
|
||||
moreFollows [1] IMPLICIT BOOLEAN DEFAULT TRUE
|
||||
}
|
||||
|
||||
|
||||
|
||||
Integer8 ::= INTEGER(-128..127) -- range -128 <= i <= 127
|
||||
Integer16 ::= INTEGER(-32768..32767) -- range -32,768 <= i <= 32,767
|
||||
Integer32 ::= INTEGER(-2147483648..2147483647) -- range -2**31 <= i < 2**31
|
||||
Unsigned8 ::= INTEGER
|
||||
|
||||
Unsigned16 ::= INTEGER(0..32767) -- range 0 <= i <= 32767
|
||||
|
||||
Unsigned32 ::= INTEGER(0..2147483647) -- range 0 <= i <= 2**31 - 1
|
||||
|
||||
ConfirmedServiceRequest ::= CHOICE {
|
||||
getNameList [1] IMPLICIT GetNameList_Request,
|
||||
getVariableAccessAttributes [6] GetVariableAccessAttributes_Request
|
||||
}
|
||||
|
||||
GetVariableAccessAttributes_Request ::= CHOICE
|
||||
{
|
||||
name [0] ObjectName,
|
||||
address [1] Address
|
||||
}
|
||||
|
||||
ObjectName ::= CHOICE
|
||||
{
|
||||
vmd_specific [0] IMPLICIT Identifier,
|
||||
domain_specific [1] IMPLICIT SEQUENCE
|
||||
{
|
||||
domainId Identifier,
|
||||
itemId Identifier
|
||||
},
|
||||
aa_specific [2] IMPLICIT Identifier
|
||||
}
|
||||
|
||||
Address ::= CHOICE
|
||||
{
|
||||
numericAddress [0] IMPLICIT Unsigned32,
|
||||
symbolicAddress [1] IMPLICIT VisibleString,
|
||||
unconstrainedAddress [2] IMPLICIT OCTET STRING
|
||||
}
|
||||
|
||||
|
||||
|
||||
ConfirmedServiceResponse ::= CHOICE {
|
||||
getNameList [1] IMPLICIT GetNameList_Response,
|
||||
getVariableAccessAttributes [6] IMPLICIT GetVariableAccessAttributes_Response
|
||||
}
|
||||
|
||||
GetVariableAccessAttributes_Response ::= SEQUENCE
|
||||
{
|
||||
mmsDeletable [0] IMPLICIT BOOLEAN,
|
||||
address [1] Address OPTIONAL,
|
||||
typeSpecification [2] TypeSpecification
|
||||
}
|
||||
|
||||
TypeSpecification ::= CHOICE
|
||||
{
|
||||
typeName [0] ObjectName,
|
||||
array [1] IMPLICIT SEQUENCE
|
||||
{
|
||||
packed [0] IMPLICIT BOOLEAN DEFAULT FALSE,
|
||||
numberOfElements [1] IMPLICIT Unsigned32,
|
||||
elementType [2] TypeSpecification
|
||||
},
|
||||
structure [2] IMPLICIT SEQUENCE
|
||||
{
|
||||
packed [0] IMPLICIT BOOLEAN DEFAULT FALSE,
|
||||
components [1] IMPLICIT SEQUENCE OF StructComponent
|
||||
},
|
||||
|
||||
-- Simple Type -------- Size ---------
|
||||
tboolean [3] IMPLICIT NULL,
|
||||
bit_string [4] IMPLICIT Integer32,
|
||||
integer [5] IMPLICIT Unsigned8,
|
||||
unsigned [6] IMPLICIT Unsigned8,
|
||||
floating_point [7] IMPLICIT SEQUENCE {
|
||||
|
||||
format_width Unsigned8, -- number of bits of
|
||||
-- floating point value
|
||||
-- including sign, exponent,
|
||||
-- and fraction
|
||||
exponent_width Unsigned8 -- size of exponent in bits
|
||||
},
|
||||
octet_string [9] IMPLICIT Integer32,
|
||||
visible_string [10] IMPLICIT Integer32,
|
||||
generalized_time [11] IMPLICIT NULL,
|
||||
binary_time [12] IMPLICIT BOOLEAN,
|
||||
bcd [13] IMPLICIT Unsigned8,
|
||||
objId [15] IMPLICIT NULL,
|
||||
mMSString [16] Integer32,
|
||||
-- added by stefan
|
||||
timestamp [17] IMPLICIT NULL
|
||||
}
|
||||
|
||||
StructComponent ::= SEQUENCE
|
||||
{
|
||||
componentName [0] IMPLICIT Identifier OPTIONAL,
|
||||
componentType [1] TypeSpecification
|
||||
}
|
||||
|
||||
|
||||
GetNameList_Request ::= SEQUENCE {
|
||||
objectClass [0] ObjectClass,
|
||||
objectScope [1] CHOICE {
|
||||
vmdSpecific [0] IMPLICIT NULL,
|
||||
domainSpecific [1] IMPLICIT Identifier
|
||||
},
|
||||
continueAfter [2] IMPLICIT Identifier OPTIONAL
|
||||
}
|
||||
|
||||
|
||||
|
||||
Identifier ::= VisibleString
|
||||
|
||||
ObjectClass ::= CHOICE {
|
||||
|
||||
basicObjectClass [0] IMPLICIT INTEGER {
|
||||
namedVariable (0),
|
||||
scatteredAccess (1),
|
||||
namedVariableList (2),
|
||||
namedType (3),
|
||||
semaphore (4),
|
||||
eventCondition (5),
|
||||
eventAction (6),
|
||||
eventEnrollment (7),
|
||||
journal (8),
|
||||
domain (9),
|
||||
programInvocation (10),
|
||||
operatorStation (11),
|
||||
dataExchange (12), -- Shall not appear in minor version 1
|
||||
accessControlList (13) -- Shall not appear in minor version 1 or 2
|
||||
}
|
||||
}
|
||||
|
||||
END
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,297 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven {
|
||||
url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath "net.saliman:gradle-cobertura-plugin:2.2.8"
|
||||
classpath group: "org.asciidoctor", name: "asciidoctorj-pdf", version: "1.5.0-alpha.11"
|
||||
classpath "biz.aQute.bnd:biz.aQute.bnd.gradle:3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "org.sonarqube" version "1.0"
|
||||
id "org.asciidoctor.convert" version "1.5.3"
|
||||
}
|
||||
|
||||
apply plugin: "org.asciidoctor.convert"
|
||||
apply from: "configuration.gradle"
|
||||
|
||||
asciidoctor {
|
||||
backends = ["pdf", "html5"]
|
||||
attributes "stylesheet": "openmuc-asciidoc.css",
|
||||
"toc2": "left",
|
||||
"sampleSrc": file("src/sample/java"),
|
||||
"source-highlighter" : "coderay",
|
||||
"pdf-stylesdir": "./",
|
||||
"pdf-style": "pdf"
|
||||
|
||||
resources {
|
||||
from("$sourceDir") {
|
||||
include "images/**"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configure(allprojects) {
|
||||
version = cfgVersion
|
||||
}
|
||||
|
||||
configure(javaProjects) {
|
||||
|
||||
apply plugin: "java"
|
||||
apply plugin: "eclipse"
|
||||
apply plugin: "osgi"
|
||||
apply plugin: "maven"
|
||||
apply plugin: "signing"
|
||||
apply plugin: "net.saliman.cobertura"
|
||||
apply plugin: "biz.aQute.bnd.builder"
|
||||
|
||||
uploadArchives.enabled = false
|
||||
|
||||
group = cfgGroup
|
||||
|
||||
if (!project.properties.containsKey("cfgJavaVersion")) {
|
||||
project.ext {
|
||||
cfgJavaVersion = "1.7"
|
||||
}
|
||||
}
|
||||
|
||||
sourceCompatibility = cfgJavaVersion
|
||||
targetCompatibility = cfgJavaVersion
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
sample
|
||||
itest {
|
||||
compileClasspath += sourceSets.main.runtimeClasspath
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile group: "junit", name: "junit", version: "4.12"
|
||||
itestCompile group: "junit", name: "junit", version: "4.12"
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
version = project.version.replace("-",".");
|
||||
}
|
||||
}
|
||||
|
||||
cobertura {
|
||||
|
||||
dependencies {
|
||||
testCompile "org.slf4j:slf4j-simple:1.6.1"
|
||||
}
|
||||
coverageFormats = ["html", "xml"]
|
||||
coverageIgnoreTrivial = true
|
||||
coverageIgnores = ["org.slf4j.Logger.*"]
|
||||
coverageReportDir = new File("$buildDir/reports/cobertura")
|
||||
coverageTestTasks {
|
||||
project.tasks.withType(Test).matching {it.name == "test"}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sonarqube {
|
||||
properties {
|
||||
property "sonar.exclusions", "src/main/java-gen/**/*,**/app/**/*"
|
||||
property "sonar.java.coveragePlugin", "cobertura"
|
||||
property "sonar.cobertura.reportPath", "build/reports/cobertura/coverage.xml"
|
||||
}
|
||||
}
|
||||
|
||||
task jarAll(type: Copy) {
|
||||
dependsOn(configurations.default.getAllArtifacts().getBuildDependencies())
|
||||
|
||||
//only the jar file created:
|
||||
from configurations.default.getAllArtifacts().getFiles()
|
||||
|
||||
if (cfgCopyDependencies) {
|
||||
if (cfgCopyToRoot) {
|
||||
into rootDir.getPath() + "/build/libs-all"
|
||||
}
|
||||
else {
|
||||
into "build/libs-all"
|
||||
}
|
||||
//includes all the dependencies:
|
||||
from configurations.default
|
||||
}
|
||||
else {
|
||||
if (cfgCopyToRoot) {
|
||||
into rootDir.getPath() + "/build/libs-all"
|
||||
}
|
||||
else {
|
||||
into "build/libs-all"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn {asciidoctor}
|
||||
build.dependsOn {jarAll}
|
||||
|
||||
eclipse.pathVariables([GRADLE_USER_HOME:file(gradle.gradleUserHomeDir)])
|
||||
tasks.eclipse.dependsOn(cleanEclipse)
|
||||
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = "sources"
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = "javadoc"
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
}
|
||||
|
||||
javadoc {
|
||||
exclude "**/internal/**"
|
||||
exclude "**/java-gen/**"
|
||||
exclude "**/app/**"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
configure(repositoryProjects) {
|
||||
|
||||
uploadArchives.enabled = true
|
||||
|
||||
if (cfgSignPom) {
|
||||
signing {
|
||||
if ( project.hasProperty("signing.keyId") ) {
|
||||
sign configurations.archives
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
|
||||
if (cfgSignPom) {
|
||||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
||||
}
|
||||
|
||||
repository(url: cfgRepository) {
|
||||
authentication(userName: cfgRepositoryUser, password: cfgRepositoryPass)
|
||||
if (cfgRepository != null && System.getProperty("https.proxyHost") != null && ((System.getProperty("https.nonProxyHosts") == null) || !cfgRepository.contains(System.getProperty("https.nonProxyHosts")))) {
|
||||
proxy(host: System.getProperty("https.proxyHost"), port: Integer.parseInt(System.getProperty("https.proxyPort")), type: "https")
|
||||
}
|
||||
}
|
||||
snapshotRepository(url: cfgSnapshotRepository) {
|
||||
authentication(userName: cfgRepositoryUser, password: cfgRepositoryPass)
|
||||
if (cfgSnapshotRepository != null && System.getProperty("https.proxyHost") != null && ((System.getProperty("https.nonProxyHosts") == null) || !cfgSnapshotRepository.contains(System.getProperty("https.nonProxyHosts")))) {
|
||||
proxy(host: System.getProperty("https.proxyHost"), port: Integer.parseInt(System.getProperty("https.proxyPort")), type: "https")
|
||||
}
|
||||
}
|
||||
|
||||
pom.project {
|
||||
|
||||
//additional pom information can be found in subproject build.gradle files
|
||||
|
||||
packaging "jar"
|
||||
url "http://www.openmuc.org/"
|
||||
|
||||
scm {
|
||||
url "none"
|
||||
connection "none"
|
||||
}
|
||||
|
||||
developers {
|
||||
developer {
|
||||
id "openmuc"
|
||||
name "OpenMUC Team"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task javadocAll(type: Javadoc) {
|
||||
|
||||
source docProjects.collect {
|
||||
project -> project.sourceSets.main.allJava
|
||||
}
|
||||
|
||||
exclude "**/internal/**"
|
||||
exclude "**/java-gen/**"
|
||||
exclude "**/app/**"
|
||||
|
||||
destinationDir = new File(buildDir, "docs/javadoc-all")
|
||||
|
||||
classpath = files(distributionProjects.collect { project ->
|
||||
project.sourceSets.main.compileClasspath })
|
||||
|
||||
classpath += files(distributionProjects.collect { project ->
|
||||
project.sourceSets.main.output })
|
||||
}
|
||||
|
||||
|
||||
task writeSettings {
|
||||
doLast {
|
||||
Writer out = new OutputStreamWriter(new FileOutputStream("build/settings.gradle"));
|
||||
out.write("include ");
|
||||
boolean first = true;
|
||||
for (Project myproject: distributionProjects) {
|
||||
if (!myproject.getProjectDir().equals(getProjectDir())) {
|
||||
if (first == true) {
|
||||
first = false;
|
||||
}
|
||||
else {
|
||||
out.write ", ";
|
||||
}
|
||||
out.write '"' + myproject.name + '"'
|
||||
}
|
||||
}
|
||||
out .write "\n\n";
|
||||
|
||||
for (Project myproject: distributionProjects) {
|
||||
if (!myproject.getProjectDir().equals(getProjectDir())) {
|
||||
println myproject.name
|
||||
out.write 'project(":' + myproject.name + '").projectDir = file("' + myproject.getProjectDir().toString().substring((int)(getProjectDir().toString().size() + 1)) + '")\n';
|
||||
}
|
||||
}
|
||||
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
|
||||
task buildDistProjects {
|
||||
dependsOn(distributionProjects.build)
|
||||
}
|
||||
|
||||
tasks.withType(Tar) {
|
||||
|
||||
dependsOn(writeSettings)
|
||||
dependsOn(distributionProjects.build)
|
||||
dependsOn(javadocAll)
|
||||
dependsOn(asciidoctor)
|
||||
|
||||
compression = Compression.GZIP
|
||||
|
||||
destinationDir = file("build/distributions/")
|
||||
}
|
||||
|
||||
task (tar, type: Tar) {
|
||||
archiveName = project.name + "-" + project.version + ".tgz"
|
||||
}
|
||||
|
||||
task (tarFull, type: Tar) {
|
||||
dependsOn(tar)
|
||||
archiveName = project.name + "-" + project.version + "_full.tgz"
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
|
||||
project.ext {
|
||||
|
||||
cfgVersion = "1.4.1-SNAPSHOT"
|
||||
|
||||
cfgGroup = "org.openmuc"
|
||||
|
||||
cfgCopyDependencies = true
|
||||
|
||||
cfgCopyToRoot = false
|
||||
|
||||
cfgSignPom = true
|
||||
|
||||
cfgRepository = project.properties.sonatypeRepository
|
||||
|
||||
cfgSnapshotRepository = project.properties.sonatypeSnapshotRepository
|
||||
|
||||
cfgRepositoryUser = project.properties.sonatypeUser
|
||||
|
||||
cfgRepositoryPass = project.properties.sonatypePass
|
||||
|
||||
javaProjects = allprojects
|
||||
|
||||
distributionProjects = javaProjects
|
||||
|
||||
docProjects = javaProjects
|
||||
|
||||
repositoryProjects = javaProjects
|
||||
}
|
||||
|
||||
tasks.withType(Tar) {
|
||||
|
||||
into(project.name) {
|
||||
from("./") {
|
||||
include "build.gradle"
|
||||
include "configuration.gradle"
|
||||
include "license/**"
|
||||
include "doc/CHANGELOG.txt"
|
||||
include "run-scripts/**"
|
||||
include "gradle/wrapper/**"
|
||||
include "gradlew"
|
||||
include "gradlew.bat"
|
||||
include "build/libs-all/**"
|
||||
include "src/**"
|
||||
|
||||
include "asn1/**"
|
||||
}
|
||||
|
||||
if (name.equals("tar") ){
|
||||
exclude "**/dependencies/**/src"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
into(project.name + "/doc/user-guide/") {
|
||||
from("./build/asciidoc/html5/") {
|
||||
include "**"
|
||||
}
|
||||
from("./build/asciidoc/pdf/") {
|
||||
include "*.pdf"
|
||||
}
|
||||
}
|
||||
|
||||
into(project.name + "/doc/") {
|
||||
from("./build/docs/") {
|
||||
include "javadoc/**"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------------project specific configurations--------------------
|
||||
|
||||
apply plugin: "java"
|
||||
apply plugin: "eclipse"
|
||||
apply plugin: "osgi"
|
||||
apply plugin: "maven"
|
||||
apply plugin: "signing"
|
||||
|
||||
def projectName = 'OpenIEC61850'
|
||||
|
||||
dependencies {
|
||||
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
|
||||
compile group: 'org.openmuc', name: 'jasn1', version: '1.8.0'
|
||||
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
|
||||
compile group: 'com.toedter', name: 'jcalendar', version: '1.4'
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
name = projectName
|
||||
instruction 'Export-Package', '!*.internal.*,*'
|
||||
instruction 'Import-Package', 'org.openmuc.jasn1.*,javax.net,*;resolution:=optional'
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java.srcDirs = ['src/main/java', 'src/main/java-gen']
|
||||
}
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
pom.project {
|
||||
name projectName
|
||||
packaging 'jar'
|
||||
description 'OpenIEC61850 is a library implementing the IEC 61850 MMS communication standard (client and server).'
|
||||
url 'http://www.openmuc.org/'
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name 'Apache License, Version 2.0'
|
||||
url 'http://www.apache.org/licenses/LICENSE-2.0'
|
||||
distribution 'repo'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,242 @@
|
||||
v1.4.0 30-May-2017
|
||||
------------------
|
||||
|
||||
- extended toString() method of all model node classes to print its
|
||||
complete submodel tree.
|
||||
|
||||
- merged all projects openiec61850, jositransport, josistack,
|
||||
openiec61850-clientgui, and openiec61850-sample into a single
|
||||
project "openiec61850".
|
||||
|
||||
- removed all slf4j logging for client part. Thus if library is only
|
||||
used on client side slf4j is no longer needed.
|
||||
|
||||
- replaced sample client and server by console applications
|
||||
|
||||
- fixed setting functional constraint correctly for all BRCB
|
||||
elements. Thanks to Stefan Goldmann.
|
||||
|
||||
- fixed client side processing of reports when inclusion bit string is
|
||||
not padded with zeros, thanks to Thomas Schönle from Bachmann
|
||||
|
||||
- fixed ServerSAP.stop() to close timer threads correctly
|
||||
|
||||
- made several imports in OSGi MANIFEST file optional because they are
|
||||
not necessarily required
|
||||
|
||||
- library now depends on jASN1 1.8.0
|
||||
|
||||
|
||||
v1.3.3 09-Mar-2017
|
||||
------------------
|
||||
|
||||
- fixes bug introduced in 1.3.2: report control block instance names
|
||||
should start at 01 instead of 00
|
||||
|
||||
- library now depends on jASN1 1.7.1
|
||||
|
||||
v1.3.2 01-Mar-2017
|
||||
------------------
|
||||
|
||||
- fixes object reference of child attributes of array elements: old:
|
||||
LD/LN.DO.Array(1)child, new LD/LN.DO.Array(1).child
|
||||
|
||||
- fixes setting of RptEna DA in server to true when reports are enabled.
|
||||
|
||||
- fixes reading report control blocks with "max" attribute greater 1
|
||||
from SCL file
|
||||
|
||||
- added check whether received BitString has correct size before setting it
|
||||
in model
|
||||
|
||||
v1.3.1 24-Feb-2017
|
||||
------------------
|
||||
|
||||
- fixed TapCommand data attribute default value
|
||||
|
||||
- types based on BdaBitString now check in setValue(byte[] value)
|
||||
whether passed byte array has correct length
|
||||
|
||||
|
||||
v1.3.0 17-Jan-2017
|
||||
------------------
|
||||
|
||||
- fixed bug that urcb reservation was not canceled after connection
|
||||
was closed
|
||||
|
||||
- fixed support for reserving buffered report control blocks on the
|
||||
client side thanks to Bo Orsted Andresen
|
||||
|
||||
- fixed support for receiving buffered and unbuffered reports when the
|
||||
data set reference is not part of the report thanks to Bo Orsted
|
||||
Andresen
|
||||
|
||||
- fixed bug in parsing scl file, in some cases predefined values were
|
||||
not set, thanks to Wu Yongming
|
||||
|
||||
- added support for parsing ObjRef in SCL file
|
||||
|
||||
- added support for multiple report control block instances by
|
||||
specifying RptEnabled max attribute in SCL file
|
||||
|
||||
v1.2.0 20-Mar-2016
|
||||
------------------
|
||||
- changed license from LGPL to Apache 2.0
|
||||
- added methods to ServerModel class to retrieve BRCBs on the client
|
||||
side, thanks to Thomas Saabye from EURISCO
|
||||
- added support for parsing "Val" elements inside "DA" elements of SCL
|
||||
file
|
||||
- several minor bug fixes
|
||||
|
||||
v1.1.1 11-Dec-2014
|
||||
------------------
|
||||
- set default max TPDU size to 1024
|
||||
- fix: server stops sending reports when client closed association
|
||||
- fix in sample model to enable general interrogation
|
||||
|
||||
v1.1.0 17-Oct-2014
|
||||
------------------
|
||||
- fixed ServerSap.stop()
|
||||
- added possibility change more settings in ClientSap
|
||||
- setDataSetValues will now only call a single call back function of a
|
||||
server application. The syntax of the call back function had to be
|
||||
changed for that.
|
||||
- fixed doclint errors and warnings. doclint is used by Java8
|
||||
|
||||
v1.0 31-Jul-2014
|
||||
----------------
|
||||
- added support for reporting on server side.
|
||||
- minor bug fixes
|
||||
- improvements to logging messages
|
||||
- added maxtpdu size to all Transport Layer Connection Requests
|
||||
(thanks to Michael Volz)
|
||||
- client can now receive reports via callback method
|
||||
- improved documentation
|
||||
- fixed build file for newest gradle
|
||||
- improved documentation
|
||||
|
||||
v0.17.1 27-Jan-2014
|
||||
-------------------
|
||||
- extracted jOSIStack lib from openiec61850 lib so it can be used
|
||||
separately (e.g. for the TASE.2 protocol)
|
||||
- fixed bugs in client Report functionality
|
||||
- readded ClientReportingSample application
|
||||
- fixed copying of arrays
|
||||
- support for decoding authentication value, though the authentication
|
||||
value is NOT being checked at the moment
|
||||
- added full server side support for nonpersistent DataSets
|
||||
- fixed bug in runSampleServer.bat script
|
||||
- jars are now uploaded to the central maven repository
|
||||
|
||||
v0.16.0 03-Sep-2013
|
||||
-------------------
|
||||
- renamed many functions and classes
|
||||
- added Client GUI project to easily browse the device model of an IEC
|
||||
61850 IED.
|
||||
- openiec61850-client, -server, -common and jmms where combined into a
|
||||
single openiec61850 library. The split was of no real use and caused
|
||||
split package problems in OSGi environments.
|
||||
- client ACSI functions now throw two types of exceptions: IOException
|
||||
(fatal exception, client needs to reconnect to server) and
|
||||
ServiceError for Errors that did not affect the active
|
||||
assocition/connection.
|
||||
- The way the server library works was completely changed: DataSources
|
||||
no longer exist and there is no need for property files anymore. The
|
||||
readValue() callback method in the DataSource is no longer needed
|
||||
because GetDataValues requests are handled by the server library
|
||||
without consulting the server application. Instead the server
|
||||
application now has to fill the internal model of the server library
|
||||
with up to date values. This change was necessary in order to be
|
||||
able to efficiently implement reporting and controling services in
|
||||
the future.
|
||||
- Basic control services are now part of the library and no longer
|
||||
have to be handled by the server application.
|
||||
- Several bug fixes in the SCL-parser
|
||||
- fix so that FunctionalConstraints such as GS that are not supported
|
||||
by openIEC61850 yet do not cause a null pointer exception when they
|
||||
are part of a DataSet
|
||||
|
||||
v0.14.4 30-Oct-2012
|
||||
-------------------
|
||||
- fixed another bug when decoding Float64
|
||||
- getDataDefinition of all kinds of DataObjects and DataAttributes now
|
||||
possible
|
||||
- modified toString() function of most DataAttributes to print more
|
||||
valuable information
|
||||
|
||||
v0.14.3 18-Sep-2012
|
||||
-------------------
|
||||
- fixed decoding of Float32 and Float64
|
||||
- fixed getChildren(fc) Function in LogicalNode
|
||||
|
||||
v0.14.2 23-Aug-2012
|
||||
-------------------
|
||||
- major refactoring to make code more efficient and easier to
|
||||
maintain. Many classes have been renamed and/or relocated.
|
||||
- the ability to use different SCSM was completely removed because
|
||||
only one mapping existed so far: the MMS mapping. No other Mapping
|
||||
seems to have a chance against MMS simply because MMS is already in
|
||||
use and works.
|
||||
- note that the syntax of the properties file for the StandaloneServer
|
||||
changed a little, see the sampeServer for details
|
||||
|
||||
v0.12.0 31-Jul-2012
|
||||
-------------------
|
||||
- changed from LGPLv3 to LGPLv2.1
|
||||
- replaced OCTET_STRING64, OCTET_STRING8 and so on with a general
|
||||
OCTET_STRING class
|
||||
- the same was done for UNICODE_STRING and VISIBLE_STRING
|
||||
- client no longer hangs when receiving ApplError Reports
|
||||
|
||||
v0.11.0 02-Jul-2012
|
||||
-------------------
|
||||
- new jASN1 version that can decode empty Object Identifiers
|
||||
- added mms authentication capability
|
||||
- fixed multi thread issues in TSAPConnection of MMS mapping
|
||||
- added FLOAT64 from IEC61400-2
|
||||
- added SampleReportClient to demonstrate how to use reporting with the client
|
||||
- some improvements to client receiver thread
|
||||
- some other small bug fixes
|
||||
|
||||
v0.10.0 14-Mai-2012
|
||||
-------------------
|
||||
- restructuring: code moved to src folder
|
||||
- new jASN1 version which fixes bug in decoding empty bitstrings
|
||||
- receving "Check" data does not cause errors anymore
|
||||
- ASN.1 buffers are automatically resized in the client
|
||||
|
||||
v0.9.9 29-Mar-2012
|
||||
------------------
|
||||
- added DataSet Services for client and server
|
||||
- added getReport methods and processReport for the client -> they
|
||||
will get a report from the queue and return a report object with the
|
||||
updated data
|
||||
- fixed getDataValues for array structures
|
||||
- disabled sending SpecificationWithResult in read request because
|
||||
some clients cannot cope with it
|
||||
- fixed bug in RFC 1006 part
|
||||
- added receiver thread in client so that reports can be received at any time
|
||||
- added VisibleString65 to be compatible with some version1.0 servers
|
||||
- avoid srcRef == 0 because some servers cannot cope with it
|
||||
|
||||
v0.9.8 22-Feb-2012
|
||||
------------------
|
||||
- fixed path in runSampleServer.sh and runSampleClient.sh
|
||||
|
||||
0.9.7 21-Feb-2012
|
||||
-----------------
|
||||
- small bug fix in T-Sel encoding/decoding in TConnection.java -
|
||||
thanks to Johannes Schmidt from University of Leipzig
|
||||
|
||||
v0.9.6 20-Feb-2012
|
||||
------------------
|
||||
- when importing Eclipse projects: GRADLE_HOME was replaced by GRADLE_USER_HOME
|
||||
- removed duplicate entries from tar distribution file
|
||||
- Remote TSAPs can now be addressed using a T-Selector. The client can
|
||||
set the T-Selector like this:
|
||||
MmsScsmClientSAP clientSAP = new MmsScsmClientSAP();
|
||||
clientSAP.acseSAP.tSAP.tSelRemote = new byte[] { 0, 1 };
|
||||
|
||||
v0.9.5 06-Feb-2012
|
||||
------------------
|
||||
- first version
|
@ -0,0 +1,33 @@
|
||||
ifndef::imagesdir[:imagesdir: images]
|
||||
ifdef::backend-pdf[]
|
||||
Fraunhofer Institute for Solar Energy Systems ISE
|
||||
openmuc.org
|
||||
//:doctype: book
|
||||
// Settings:
|
||||
:compat-mode:
|
||||
:experimental:
|
||||
:icons: font
|
||||
:listing-caption: Listing
|
||||
:sectnums:
|
||||
:toc:
|
||||
:toclevels: 3
|
||||
:title-logo-image: image:banner.png[pdfwidth=90%,align=center]
|
||||
:frame: none
|
||||
|
||||
:width100: 750
|
||||
:width80: 600
|
||||
:width60: 450
|
||||
:width40: 300
|
||||
:width20: 150
|
||||
|
||||
endif::[]
|
||||
|
||||
ifndef::backend-pdf[]
|
||||
|
||||
:width100: "100%"
|
||||
:width80: "80%"
|
||||
:width60: "60%"
|
||||
:width40: "40%"
|
||||
:width20: "20%"
|
||||
|
||||
endif::[]
|
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
@ -0,0 +1,438 @@
|
||||
= OpenIEC61850 User Guide
|
||||
include::common-settings.txt[]
|
||||
|
||||
:numbered:
|
||||
|
||||
== Intro
|
||||
|
||||
OpenIEC61850 is a library implementing the IEC 61850 standard based on
|
||||
the MMS mapping for client and server communication. It is licensed
|
||||
under the Apache 2.0 license. OpenIEC61850 includes a console client
|
||||
and server as well as a gui client.
|
||||
|
||||
=== Distribution
|
||||
|
||||
After extracting the distribution tar file the OpenIEC61850 library
|
||||
can be found in the build/libs-all folder. For license information
|
||||
check the _license_ directory in the distribution.
|
||||
|
||||
==== Dependencies
|
||||
|
||||
Besides the OpenIEC61850 library the folder _build/libs-all/_ contains the
|
||||
following external libraries:
|
||||
|
||||
* *jasn1* - a library from the jASN1 project doing BER
|
||||
encoding/decoding, Copyright 2011-17 Fraunhofer ISE, Author: Stefan
|
||||
Feuerhahn, License: LGPLv2.1 or later, http://www.openmuc.org
|
||||
|
||||
* *slf4j-api* - a popular logging API. It is only needed if
|
||||
openiec61850 is used to implement a server. The client part does
|
||||
not log anything. License: MIT, http://www.slf4j.org
|
||||
|
||||
* *logback-core/logback-classic* - an actual logger implementation of
|
||||
the slf4-api. It is used by the console server application to
|
||||
output log information. It can be replaced by a logger of your
|
||||
choice that supports the slf4j API. Like slf4j it is only needed
|
||||
for server implementations. License: EPLv1.0 and LGPLv2.1,
|
||||
http://logback.qos.ch
|
||||
|
||||
* *jcalendar* - a calendar library needed by the client GUI. You don't
|
||||
need this dependency if you don't use the client gui. (C)
|
||||
1999-2011 Kai Toedter, License: LGPLv3,
|
||||
http://toedter.com/jcalendar/
|
||||
|
||||
|
||||
=== Console & GUI Applications
|
||||
|
||||
You can execute the console client and server through the scripts
|
||||
found in the folder _run-scripts_. Executing the scripts without any
|
||||
parameters will print help information to the screen. Note that under
|
||||
Unix/Linux you need root privilages if you want the server to listen
|
||||
on any port lower than 1000.
|
||||
|
||||
Instead of running the applications from the terminal you can create
|
||||
Eclipse project files as explained in our
|
||||
link:https://www.openmuc.org/faq/gradle_getting_started/[FAQs] and run
|
||||
them from within Eclipse.
|
||||
|
||||
|
||||
=== OSI Stack
|
||||
|
||||
The OpenIEC61850 library includes an OSI stack implementation as it is
|
||||
needed by the IEC 61850 MMS mapping. The API of the OSI stack and the
|
||||
OSI transport layers are made public so that they can be used by other
|
||||
projects.
|
||||
|
||||
* *josistack* - implements the Application Control Service Element
|
||||
(ACSE) protocol as defined by ISO 8650 or ITU X.217/X.227, the
|
||||
lower ISO Presentation Layer as defined by ISO 8823/ITU X226, and
|
||||
the ISO Session Layer as defined by 8327/ITU X.225.
|
||||
|
||||
* *jositransport* - implements RFC 1006 and the OSI Transport Service
|
||||
Layer.
|
||||
|
||||
|
||||
== Using OpenIEC61850
|
||||
|
||||
The easiest way to learn how OpenIEC61850 works is by running and
|
||||
analyzing the console client and server applications. You might want
|
||||
to look at the source code of the console applications to get an
|
||||
understanding of how they work. They can be used as a basis for you to
|
||||
code your individual client or server applications.
|
||||
|
||||
An IEC 61850 device that is to be controlled or monitored is called an
|
||||
IEC 61850 server. An IEC 61850 server normally listens on port 102 for
|
||||
incoming connection requests by IEC 61850 clients.
|
||||
|
||||
=== Client
|
||||
|
||||
If you want to connect to an IEC 61850 server, you should first create
|
||||
an instance of ClientSap (SAP = Service Access Point) and configure it
|
||||
to your needs. Then you build up the association to the server using
|
||||
the associate() method.
|
||||
|
||||
=== Server
|
||||
|
||||
First get a List of ServerSaps using the method
|
||||
ServerSap.getSapsFromSclFile(). This method reads in the SAP from the
|
||||
given ICD file. Take the ServerSap you want to run and configure it to
|
||||
your needs (e.g. set the port to listen on). The ServerSap includes
|
||||
the complete device model defined in the ICD file. Retrieve a copy of
|
||||
it using the method getModelCopy(). Tell the ServerSap to start
|
||||
to listen on the configured port using startListening(). This is a
|
||||
non-blocking function.
|
||||
|
||||
=== Data Model
|
||||
|
||||
An IEC 61850 server contains a treelike data model that contains at
|
||||
its leafs the data (integers, boolean, strings etc) that can be
|
||||
accessed by clients. Clients can also retrieve the whole data model
|
||||
from the server.
|
||||
|
||||
The upper most model node ist called "server". In OpenIEC61850 it is
|
||||
an object of type ServerModel. The server node contains 1..n logical
|
||||
devices (LD). A logical device may contain 1..n logical nodes (LN). A
|
||||
logical node may contain 1..n data objects. In OpenIEC61850 the
|
||||
logical nodes do not contain complete data objects but instead contain
|
||||
so called functionally constraint data objects (FCDO). An FCDO is a
|
||||
data object that is split up by functional constraint. An FCDO can
|
||||
contain a combination of other FCDOs, arrays, constructed data
|
||||
attributes and/or basic data attributes.
|
||||
|
||||
All nodes of the server model in OpenIEC61850 are of one of the
|
||||
following seven types:
|
||||
|
||||
* ServerModel
|
||||
* LogicalDevice
|
||||
* LogicalNode
|
||||
* FcDataObject
|
||||
* Array
|
||||
* ConstructedDataAttribute
|
||||
* BasicDataAttribute
|
||||
|
||||
They all implement the ModelNode interface. The nodes FcDataObject,
|
||||
Array, ConstructedDataAttribute and BasicDataAttribute also implement
|
||||
the interface called FcModelNode because they are considered
|
||||
functionally constraint data in the standard. Many of the services of
|
||||
IEC 61850 can only be applied to functionally constraint data
|
||||
(e.g. GetDataValues and SetDataValues).
|
||||
|
||||
When programming a client you get a copy of the server model either
|
||||
through ClientAssociation.retrieveModel() or
|
||||
ClientAssociation.getModelFromSclFile(). When programming a server you
|
||||
get a copy of the server model through the ServerSap.getModelCopy()
|
||||
function.
|
||||
|
||||
You can then navigate through the model using several functions:
|
||||
|
||||
* ServerModel.findModelNode(ObjectReference objectReference, Fc fc)
|
||||
will search for the subnode with the given reference and functional
|
||||
constraint.
|
||||
|
||||
* ModelNode.getChild(String name, Fc fc) will return the child node
|
||||
with the given name and functional constraint.
|
||||
|
||||
* ModelNode.getBasicDataAttributes() will return a list of all leaf
|
||||
nodes (basic data attributes) of the model node.
|
||||
|
||||
|
||||
|
||||
== Modifying and Compiling OpenIEC61850
|
||||
|
||||
We use the Gradle build automation tool. The distribution contains a
|
||||
fully functional gradle build file (_build.gradle_). Thus if you
|
||||
changed code and want to rebuild a library you can do it easily with
|
||||
Gradle. Also if you want to import our software into Eclipse you can
|
||||
easily create Eclipse project files using Gradle. Just follow the
|
||||
instructions on our
|
||||
link:https://www.openmuc.org/faq/gradle_getting_started/[FAQ site].
|
||||
|
||||
== IEC 61850 Concepts
|
||||
|
||||
=== Data Sets
|
||||
|
||||
Data sets (DS) form a group/set of data. Data sets can be used to read
|
||||
or write several data objects/data attributes at once using a single
|
||||
request/response message exchange. The service used for this are
|
||||
GetDataSetValues and SetDataSetValues. Besides the data set
|
||||
services the reporting, logging, GOOSE and sampled value services also
|
||||
use the data set concept.
|
||||
|
||||
The data attributes or data objects that are part of a data set are
|
||||
called the members of a data set. Only functionally constraint data
|
||||
may be a member of a data set.
|
||||
|
||||
The IEC 61850 standard defines five ASCI services related to data sets:
|
||||
|
||||
* *GetDataSetValues* to get the value of all members of the data set.
|
||||
|
||||
* *SetDataSetValues* to set the value of all members of the data set.
|
||||
|
||||
* *CreateDataSet* to create a new data set dynamically.
|
||||
|
||||
* *DeleteDataSet* to delete a data set that was created.
|
||||
|
||||
* *GetDataSetDirectory* to get the list of all existing data sets in
|
||||
the server
|
||||
|
||||
Two types of data sets exist:
|
||||
|
||||
* *Persistent data sets* - they have a reference of the format
|
||||
LDName/LNName.DataSetName . They are visible to all
|
||||
clients. Persistent data sets can be preconfigured in the SCL
|
||||
file. In this case they cannot be deleted. Persistent data sets can
|
||||
also be dynamicall created by clients. In this case they may be
|
||||
deleted again later. Dynamically created data sets will be
|
||||
automatically deleted once the server stops.
|
||||
|
||||
* *Non-persistent data sets* - they have a reference of the format
|
||||
@datasetname . They are only visible to the client that created it
|
||||
through the CreateDataSet service. These data sets only exist as
|
||||
long as the association is open.
|
||||
|
||||
|
||||
=== Reporting
|
||||
|
||||
Reporting allows a server to send data based on events and without
|
||||
explict request by the client. What data is sent and the events that
|
||||
cause reports are configured through so called report control blocks
|
||||
(RCB).
|
||||
|
||||
The standard distinguishes between two types of reporting: buffered
|
||||
reporting and unbuffered reporting. With buffered reporting reports
|
||||
are buffered by the server in case a connection to the client is
|
||||
interrupted. This way reports can be sent after the client has
|
||||
connected again. Buffered reporting is configured through buffered
|
||||
report control blocks (BRCB). Unbuffered reporting is configured
|
||||
through unbuffered report control blocks (URCB).
|
||||
|
||||
RCBs are located within logical nodes of the server's data model
|
||||
(i.e. the server's ICD/SCL file). They are fixed and cannot be deleted
|
||||
or added at runtime. An RCB is blocked once a client has registered to
|
||||
receive reports (by enabling it). That means a single RCB cannot send
|
||||
reports to several clients in parallel.
|
||||
|
||||
RCBs are always associated with a specific <<_data_sets,data set>>
|
||||
that must be located in the same logical node as the RCB. A subset of
|
||||
the data set's members will be reported if any of the configured
|
||||
events occures. The associated data set of the RCB can be
|
||||
dynamically changed by a client at run-time.
|
||||
|
||||
RCBs are located in logical nodes in the server's model tree. Therefor
|
||||
the reference of an RCB is of the form
|
||||
LogicalDeviceName/LogicalNodeName.RCBName . Even though RCBs can only
|
||||
reference data sets located in the same logical node as the RCB
|
||||
itself, they can still monitor data from other logical nodes because
|
||||
the data set's members can be located in other logical nodes.
|
||||
|
||||
The following events can cause a server to send a report:
|
||||
|
||||
. The client issues a general interrogation.
|
||||
|
||||
. A data attribute that is part of the associated data set changes or
|
||||
is updated.
|
||||
|
||||
. Periodic sending of reports has been enabled by setting the
|
||||
integrity period of an RCB.
|
||||
|
||||
Whether one of these events really causes a report to be sent is
|
||||
configured through the RCB.
|
||||
|
||||
A report control block contains the following fields:
|
||||
|
||||
* Configuration fields. They can only be written if the RCB has not
|
||||
been enabled nor reserved by another client:
|
||||
|
||||
** *RptID* - The report ID identifies the RCB. If not set, it equals
|
||||
the RCB reference. The RptID will be sent with every report so that
|
||||
the client can identify the RCB responsible for the report.
|
||||
|
||||
** *DatSet* - The reference of the data set associated with this RCB. It
|
||||
must be located in the same logical node as the RCB. Members of
|
||||
this data set will be reported whenever the configured events
|
||||
occure.
|
||||
|
||||
** *OptFlds* - A bitstring where each bit indicates whether an
|
||||
optional field is included in the reports caused by this RCB. The
|
||||
following optional fields exist: sequence-number, report-
|
||||
timestamp, reason-for-inclusion, data-set-name, data-reference,
|
||||
buffer-overflow, entryID, segmentation, and conf-revision. For
|
||||
URCBs the values of buffer-overflow and entryID are ignored.
|
||||
|
||||
** *BufTm* - In case of an event that causes a report the server will
|
||||
wait for _BufTm_ ms for other events. All data that is to be
|
||||
reported because of events in this time span is sent in a single
|
||||
report.
|
||||
|
||||
** *TrgOps* - Specifies which events will trigger reports. Possible
|
||||
events are:
|
||||
|
||||
*** data change (dchg)
|
||||
|
||||
*** quality change (qchg)
|
||||
|
||||
*** data update (dupd)
|
||||
|
||||
*** integrity - if enabled the server will send periodic integrity
|
||||
reports to the client. Integrity reports will contain the current
|
||||
values of all members of the referenced data set.
|
||||
|
||||
*** general interrogation (GI).
|
||||
|
||||
** *IntgPd* - The integrity period specifies an interval in ms for the
|
||||
periodic sending of intergrity reports.
|
||||
|
||||
** *PurgeBuf* (only part of BRCBs not URCBs) -
|
||||
|
||||
** *EntryID* (only part of BRCBs not URCBs) -
|
||||
|
||||
* Information fields: can only be read:
|
||||
|
||||
** *SqNum* - the current sequence number of the RCB. After sending a
|
||||
report the RCB will increment the sequence number by one.
|
||||
|
||||
** *ConfRev* - The configuration revision is a counter representing the number of
|
||||
times the referenced data set was changed.
|
||||
|
||||
** *Owner* - Shall be equal to the IP of the client that reserved the
|
||||
RCB. Shall be NULL (i.e. the empty string) if the RCB is not
|
||||
reserved.
|
||||
|
||||
** *TimeOfEntry* (only part of BRCBs not URCBs)
|
||||
|
||||
* Functional fields: The following fields of the RCB can be read or
|
||||
written to execute functions:
|
||||
|
||||
** *Resv* (only part of URCBs not BRCBs) - Before doing anything with
|
||||
an RCB a client should reserve it by setting this field to
|
||||
true. If the setting was successful the RCB will be reserved
|
||||
exclusively for this client. Enabling an RCB that has not been
|
||||
reserved implicitly reserves it.
|
||||
|
||||
** *ResvTms* (only part of BRCBs not URCBs) - This attribute of BRCBs
|
||||
is optional. If not present the control block is reserved by
|
||||
simply enabling it. A ResvTms value of -1 indicates that the
|
||||
control block was reserved by configuration for a certain set of
|
||||
clients. A value of 0 indicates that the BRCB is not reserved. A
|
||||
client can reserve the control block by writing a value largen
|
||||
than 0. The value represents the number of seconds that the
|
||||
reservation shall be maintained after the association was closed
|
||||
or interrupted.
|
||||
|
||||
** *RptEna* - By setting this variable to true reporting will be
|
||||
enabled. Note that changing/writing and configuration fields of
|
||||
the RCB will fail as long as reporting is enabled.
|
||||
|
||||
** *GI* - General Interrogation. Setting this parameter to true will
|
||||
initiate a report to be sent to the client. This report will
|
||||
contain all the data of the associated data set. The GI parameter
|
||||
will be reset to false automatically by the server once the report
|
||||
has been sent.
|
||||
|
||||
|
||||
A report always contains the following information fields:
|
||||
|
||||
* *RptID* - The report ID identifies the RCB that has caused the
|
||||
generation of the report. It equals the RptID field of the RCB.
|
||||
|
||||
* *OptFlds* - It is equal to the OptFlds field of the corresponding
|
||||
RCB.
|
||||
|
||||
* *SqNum* (optional, included if OptFlds.SequenceNumber is true) - The
|
||||
sequence number of the report. It is equal to the SqNum field of
|
||||
the corresponding RCB by the time it was sent.
|
||||
|
||||
* *TimeOfEntry* (optional, included if OptFlds.report-timestamp is
|
||||
true) - specifies the time when the Entry ID was created.
|
||||
|
||||
* *DatSet* (optional, included if OptFlds.dataset-name is true) - The
|
||||
reference of the data set whose data is sent in this report.
|
||||
|
||||
* *BufOvfl* (optional, only included if it is a buffered report and
|
||||
OptFlds.buffer-overflow is true) - Indicates the server lost report
|
||||
entries due to a buffer overflow. Only applies to buffered
|
||||
reporting.
|
||||
|
||||
* *EntryID* (optional, only included if it is a buffered report and
|
||||
OptFlds.entryID is true) - Entry identification ToDo
|
||||
|
||||
* *ConfRev* (optional, only included if OptFlds.conf-rev is true) - It
|
||||
is equal to the ConfRev field of the corresponding RCB.
|
||||
|
||||
* *SubSqNum* (optional, included if OptFlds.segmentation is true) - In
|
||||
case that a long report does not fit into one message, a single
|
||||
report shall be divided into subreports. Each subreport shall have
|
||||
the same sequence number and a unique SubSqNum.
|
||||
|
||||
* *MoreSegmentsFollow* (optional, included if OptFlds.segmentation is
|
||||
true) - indicates that more subreports with the same SqNum follow.
|
||||
|
||||
* *Inclusion Bitstring* - A bit string whose length equals the number
|
||||
of data members of the referenced data set. Each bit indicates
|
||||
whether the corresponding data member is included in the report or
|
||||
not.
|
||||
|
||||
* *Data-references* (optional, included if OptFlds.data-reference is
|
||||
true) - The references of the reported data set members.
|
||||
|
||||
* *Values* - The values of the reported data set members.
|
||||
|
||||
* *Reason Codes* (optional, included if OptFlds.reason-for-inclusion
|
||||
is true) - The reason codes indicate for each reported value, the
|
||||
reason why it was reported. Possible reasons are data change,
|
||||
quality change, data update, integrity, general interrogation,
|
||||
and application trigger. Several reasons can be true for a single
|
||||
reported value.
|
||||
|
||||
A client that wants to receive reports from a certain RCB would
|
||||
usually first attempt to reserve the RCB. If successful he would then
|
||||
configure the RCB as he wishes. Finally he would enable reporting.
|
||||
|
||||
|
||||
== Terminology
|
||||
|
||||
* *BRCB* - Buffered Report Control Block
|
||||
|
||||
* *DS* - Data Set
|
||||
|
||||
* *LD* - Logical Device
|
||||
|
||||
* *LN* - Logical Node
|
||||
|
||||
* *SAP* - Service Access Point
|
||||
|
||||
* *URCB* - Unbuffered Report Control Block
|
||||
|
||||
== Authors
|
||||
|
||||
Developers:
|
||||
|
||||
* Stefan Feuerhahn
|
||||
|
||||
Former developers:
|
||||
|
||||
* Claus Brunzema
|
||||
* Bertram Lückehe
|
||||
* Chau Do
|
||||
* Tobias Weidelt
|
||||
* Michael Zillgith
|
@ -0,0 +1,398 @@
|
||||
/*
|
||||
* AsciiDoc 'volnitsky' theme for xhtml11 and html5 backends.
|
||||
* Based on css from http://volnitsky.com, which was in turn based on default
|
||||
* theme from AsciiDoc
|
||||
*
|
||||
* FIXME: The styling is still a bit rough in places.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Default font. */
|
||||
body {
|
||||
font-family: Helvetica, sans-serif;
|
||||
max-width:62.5em;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/* Title font. */
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
clear: both;
|
||||
font-family: Helvetica, serif;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
a {
|
||||
border-bottom: 1px dotted #999999;
|
||||
color: #378f03 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
a:hover {
|
||||
border-bottom: 1px solid #378f03;
|
||||
color: #378f03 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
color: #4E4E4E;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
|
||||
div.sectionbody {
|
||||
/* margin-left: 0;*/
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 1px solid #575757;
|
||||
}
|
||||
|
||||
|
||||
pre {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#author {
|
||||
color: #575757;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
#footer {
|
||||
font-size: small;
|
||||
padding-top: 0.5em;
|
||||
margin-top: 4.0em;
|
||||
}
|
||||
|
||||
#footer-text {
|
||||
float: left;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
|
||||
#footer-badges {
|
||||
float: right;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
|
||||
#preamble {
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
|
||||
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
|
||||
div.admonitionblock {
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
div.admonitionblock {
|
||||
margin-top: 2.5em;
|
||||
margin-bottom: 2.5em;
|
||||
}
|
||||
|
||||
div.content { /* Block element content. */
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Block element titles. */
|
||||
div.title, caption.title {
|
||||
color: #575757;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
div.title + * {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
td div.title:first-child {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
div.content div.title:first-child {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
div.content + div.title {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
|
||||
div.sidebarblock > div.content {
|
||||
background: #ffffee;
|
||||
border: 1px solid silver;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.listingblock > div.content {
|
||||
border: 1px solid silver;
|
||||
background: #f4f4f4;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.quoteblock {
|
||||
padding-left: 2.0em;
|
||||
margin-right: 10%;
|
||||
}
|
||||
div.quoteblock > div.attribution {
|
||||
padding-top: 0.5em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.verseblock {
|
||||
padding-left: 2.0em;
|
||||
margin-right: 10%;
|
||||
}
|
||||
div.verseblock > pre.content {
|
||||
font-family: inherit;
|
||||
}
|
||||
div.verseblock > div.attribution {
|
||||
padding-top: 0.75em;
|
||||
text-align: left;
|
||||
}
|
||||
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
|
||||
div.verseblock + div.attribution {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.admonitionblock .icon {
|
||||
vertical-align: top;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
color: #575757;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
div.admonitionblock td.content {
|
||||
padding-left: 0.5em;
|
||||
border-left: 2px solid silver;
|
||||
}
|
||||
|
||||
div.exampleblock > div.content {
|
||||
border-left: 2px solid silver;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.imageblock div.content { padding-left: 0; }
|
||||
span.image img { border-style: none; }
|
||||
a.image:visited { color: white; }
|
||||
|
||||
dl {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
dt {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0;
|
||||
font-style: normal;
|
||||
color: #575757;
|
||||
}
|
||||
dd > *:first-child {
|
||||
margin-top: 0.1em;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
list-style-position: outside;
|
||||
}
|
||||
ol.arabic {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
ol.loweralpha {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
ol.upperalpha {
|
||||
list-style-type: upper-alpha;
|
||||
}
|
||||
ol.lowerroman {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
ol.upperroman {
|
||||
list-style-type: upper-roman;
|
||||
}
|
||||
|
||||
div.compact ul, div.compact ol,
|
||||
div.compact p, div.compact p,
|
||||
div.compact div, div.compact div {
|
||||
margin-top: 0.1em;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
div.tableblock > table {
|
||||
border: 3px solid #575757;
|
||||
}
|
||||
thead {
|
||||
font-weight: bold;
|
||||
color: #575757;
|
||||
}
|
||||
tfoot {
|
||||
font-weight: bold;
|
||||
}
|
||||
td > div.verse {
|
||||
white-space: pre;
|
||||
}
|
||||
p.table {
|
||||
margin-top: 0;
|
||||
}
|
||||
/* Because the table frame attribute is overriden by CSS in most browsers. */
|
||||
div.tableblock > table[frame="void"] {
|
||||
border-style: none;
|
||||
}
|
||||
div.tableblock > table[frame="hsides"] {
|
||||
border-left-style: none;
|
||||
border-right-style: none;
|
||||
}
|
||||
div.tableblock > table[frame="vsides"] {
|
||||
border-top-style: none;
|
||||
border-bottom-style: none;
|
||||
}
|
||||
|
||||
|
||||
div.hdlist {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
div.hdlist tr {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
dt.hdlist1.strong, td.hdlist1.strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
td.hdlist1 {
|
||||
vertical-align: top;
|
||||
font-style: normal;
|
||||
padding-right: 0.8em;
|
||||
color: #575757;
|
||||
}
|
||||
td.hdlist2 {
|
||||
vertical-align: top;
|
||||
}
|
||||
div.hdlist.compact tr {
|
||||
margin: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.comment {
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
@media print {
|
||||
#footer-badges { display: none; }
|
||||
}
|
||||
|
||||
#toctitle {
|
||||
color: #575757;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { margin-top: 0; margin-bottom: 0; }
|
||||
div.toclevel1 { margin-top: 0.3em; margin-left: 0; font-size: 1.0em; }
|
||||
div.toclevel2 { margin-top: 0.25em; margin-left: 2em; font-size: 0.9em; }
|
||||
div.toclevel3 { margin-left: 4em; font-size: 0.8em; }
|
||||
div.toclevel4 { margin-left: 6em; font-size: 0.8em; }
|
||||
|
||||
|
||||
|
||||
.monospaced, tt, div.listingblock > div.content {
|
||||
font-family: Consolas, "Andale Mono", "Courier New", monospace;
|
||||
color: #004400;
|
||||
background: #f4f4f4;
|
||||
max-width: 80em;
|
||||
line-height: 1.2em;
|
||||
}
|
||||
|
||||
.paragraph p {
|
||||
line-height: 1.5em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
/*.paragraph p, li, dd, .content { max-width: 85em; }
|
||||
.admonitionblock { max-width: 35em; }*/
|
||||
|
||||
div.sectionbody div.ulist > ul > li {
|
||||
list-style-type: square;
|
||||
color: #aaa;
|
||||
}
|
||||
div.sectionbody div.ulist > ul > li > * {
|
||||
color: black;
|
||||
/*font-size: 50%;*/
|
||||
}
|
||||
|
||||
|
||||
div.sectionbody div.ulist > ul > li div.ulist > ul > li {
|
||||
color: #ccd ;
|
||||
}
|
||||
div.sectionbody div.ulist > ul > li div.ulist > ul > li > * {
|
||||
color: black ;
|
||||
}
|
||||
|
||||
/*
|
||||
* html5 specific
|
||||
*
|
||||
* */
|
||||
|
||||
table.tableblock {
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
thead, p.tableblock.header {
|
||||
font-weight: bold;
|
||||
color: #575757;
|
||||
}
|
||||
p.tableblock {
|
||||
margin-top: 0;
|
||||
}
|
||||
table.tableblock {
|
||||
border-width: 3px;
|
||||
border-spacing: 0px;
|
||||
border-style: solid;
|
||||
border-color: #575757;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th.tableblock, td.tableblock {
|
||||
border-width: 1px;
|
||||
padding: 4px;
|
||||
border-style: solid;
|
||||
border-color: #575757;
|
||||
}
|
||||
|
||||
table.tableblock.frame-topbot {
|
||||
border-left-style: hidden;
|
||||
border-right-style: hidden;
|
||||
}
|
||||
table.tableblock.frame-sides {
|
||||
border-top-style: hidden;
|
||||
border-bottom-style: hidden;
|
||||
}
|
||||
table.tableblock.frame-none {
|
||||
border-style: hidden;
|
||||
}
|
||||
|
||||
th.tableblock.halign-left, td.tableblock.halign-left {
|
||||
text-align: left;
|
||||
}
|
||||
th.tableblock.halign-center, td.tableblock.halign-center {
|
||||
text-align: center;
|
||||
}
|
||||
th.tableblock.halign-right, td.tableblock.halign-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th.tableblock.valign-top, td.tableblock.valign-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
th.tableblock.valign-middle, td.tableblock.valign-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,54 @@
|
||||
title_page:
|
||||
align: right
|
||||
|
||||
page:
|
||||
layout: portrait
|
||||
# margin: [0.75in, 1in, 0.75in, 1in]
|
||||
size: A4
|
||||
|
||||
base:
|
||||
font_family: Times-Roman
|
||||
font_color: #333333
|
||||
font_size: 11
|
||||
line_height_length: 17
|
||||
line_height: $base_line_height_length / $base_font_size
|
||||
|
||||
vertical_rhythm: $base_line_height_length
|
||||
|
||||
heading:
|
||||
font_color: #0000
|
||||
font_size: 14
|
||||
font_style: bold
|
||||
line_height: 1.2
|
||||
margin_bottom: $vertical_rhythm
|
||||
|
||||
link:
|
||||
font_color: #939393
|
||||
|
||||
outline_list:
|
||||
indent: $base_font_size * 1.5
|
||||
|
||||
header:
|
||||
height: 0.75in
|
||||
line_height: 1
|
||||
recto_content:
|
||||
center: '{document-title}'
|
||||
verso_content:
|
||||
center: '{document-title}'
|
||||
|
||||
footer:
|
||||
height: 0.75in
|
||||
line_height: 1
|
||||
recto_content:
|
||||
right: '*{page-number}*'
|
||||
verso_content:
|
||||
left: '*{page-number}*'
|
||||
|
||||
caption:
|
||||
align: left
|
||||
font_color: #000000
|
||||
font_size: 9
|
||||
|
||||
code:
|
||||
border_color: #cccccc
|
||||
|
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
#Tue Apr 25 13:05:33 CEST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
|
@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save ( ) {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
@ -0,0 +1,84 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright 2011-17 Fraunhofer ISE, energy & meteo Systems GmbH and other contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
@ -0,0 +1,606 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
import org.openmuc.jasn1.ber.types.BerBitString;
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
|
||||
public class AAREApdu implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.APPLICATION_CLASS, BerTag.CONSTRUCTED, 1);
|
||||
|
||||
public byte[] code = null;
|
||||
private BerBitString protocolVersion = null;
|
||||
private BerObjectIdentifier applicationContextName = null;
|
||||
private AssociateResult result = null;
|
||||
private AssociateSourceDiagnostic resultSourceDiagnostic = null;
|
||||
private APTitle respondingAPTitle = null;
|
||||
private AEQualifier respondingAEQualifier = null;
|
||||
private APInvocationIdentifier respondingAPInvocationIdentifier = null;
|
||||
private AEInvocationIdentifier respondingAEInvocationIdentifier = null;
|
||||
private ACSERequirements responderAcseRequirements = null;
|
||||
private MechanismName mechanismName = null;
|
||||
private AuthenticationValue respondingAuthenticationValue = null;
|
||||
private ApplicationContextNameList applicationContextNameList = null;
|
||||
private ImplementationData implementationInformation = null;
|
||||
private AssociationInformation userInformation = null;
|
||||
|
||||
public AAREApdu() {
|
||||
}
|
||||
|
||||
public AAREApdu(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setProtocolVersion(BerBitString protocolVersion) {
|
||||
this.protocolVersion = protocolVersion;
|
||||
}
|
||||
|
||||
public BerBitString getProtocolVersion() {
|
||||
return protocolVersion;
|
||||
}
|
||||
|
||||
public void setApplicationContextName(BerObjectIdentifier applicationContextName) {
|
||||
this.applicationContextName = applicationContextName;
|
||||
}
|
||||
|
||||
public BerObjectIdentifier getApplicationContextName() {
|
||||
return applicationContextName;
|
||||
}
|
||||
|
||||
public void setResult(AssociateResult result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public AssociateResult getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResultSourceDiagnostic(AssociateSourceDiagnostic resultSourceDiagnostic) {
|
||||
this.resultSourceDiagnostic = resultSourceDiagnostic;
|
||||
}
|
||||
|
||||
public AssociateSourceDiagnostic getResultSourceDiagnostic() {
|
||||
return resultSourceDiagnostic;
|
||||
}
|
||||
|
||||
public void setRespondingAPTitle(APTitle respondingAPTitle) {
|
||||
this.respondingAPTitle = respondingAPTitle;
|
||||
}
|
||||
|
||||
public APTitle getRespondingAPTitle() {
|
||||
return respondingAPTitle;
|
||||
}
|
||||
|
||||
public void setRespondingAEQualifier(AEQualifier respondingAEQualifier) {
|
||||
this.respondingAEQualifier = respondingAEQualifier;
|
||||
}
|
||||
|
||||
public AEQualifier getRespondingAEQualifier() {
|
||||
return respondingAEQualifier;
|
||||
}
|
||||
|
||||
public void setRespondingAPInvocationIdentifier(APInvocationIdentifier respondingAPInvocationIdentifier) {
|
||||
this.respondingAPInvocationIdentifier = respondingAPInvocationIdentifier;
|
||||
}
|
||||
|
||||
public APInvocationIdentifier getRespondingAPInvocationIdentifier() {
|
||||
return respondingAPInvocationIdentifier;
|
||||
}
|
||||
|
||||
public void setRespondingAEInvocationIdentifier(AEInvocationIdentifier respondingAEInvocationIdentifier) {
|
||||
this.respondingAEInvocationIdentifier = respondingAEInvocationIdentifier;
|
||||
}
|
||||
|
||||
public AEInvocationIdentifier getRespondingAEInvocationIdentifier() {
|
||||
return respondingAEInvocationIdentifier;
|
||||
}
|
||||
|
||||
public void setResponderAcseRequirements(ACSERequirements responderAcseRequirements) {
|
||||
this.responderAcseRequirements = responderAcseRequirements;
|
||||
}
|
||||
|
||||
public ACSERequirements getResponderAcseRequirements() {
|
||||
return responderAcseRequirements;
|
||||
}
|
||||
|
||||
public void setMechanismName(MechanismName mechanismName) {
|
||||
this.mechanismName = mechanismName;
|
||||
}
|
||||
|
||||
public MechanismName getMechanismName() {
|
||||
return mechanismName;
|
||||
}
|
||||
|
||||
public void setRespondingAuthenticationValue(AuthenticationValue respondingAuthenticationValue) {
|
||||
this.respondingAuthenticationValue = respondingAuthenticationValue;
|
||||
}
|
||||
|
||||
public AuthenticationValue getRespondingAuthenticationValue() {
|
||||
return respondingAuthenticationValue;
|
||||
}
|
||||
|
||||
public void setApplicationContextNameList(ApplicationContextNameList applicationContextNameList) {
|
||||
this.applicationContextNameList = applicationContextNameList;
|
||||
}
|
||||
|
||||
public ApplicationContextNameList getApplicationContextNameList() {
|
||||
return applicationContextNameList;
|
||||
}
|
||||
|
||||
public void setImplementationInformation(ImplementationData implementationInformation) {
|
||||
this.implementationInformation = implementationInformation;
|
||||
}
|
||||
|
||||
public ImplementationData getImplementationInformation() {
|
||||
return implementationInformation;
|
||||
}
|
||||
|
||||
public void setUserInformation(AssociationInformation userInformation) {
|
||||
this.userInformation = userInformation;
|
||||
}
|
||||
|
||||
public AssociationInformation getUserInformation() {
|
||||
return userInformation;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
int sublength;
|
||||
|
||||
if (userInformation != null) {
|
||||
codeLength += userInformation.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 30
|
||||
os.write(0xBE);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (implementationInformation != null) {
|
||||
codeLength += implementationInformation.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 29
|
||||
os.write(0x9D);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (applicationContextNameList != null) {
|
||||
codeLength += applicationContextNameList.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 11
|
||||
os.write(0xAB);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (respondingAuthenticationValue != null) {
|
||||
sublength = respondingAuthenticationValue.encode(os);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 10
|
||||
os.write(0xAA);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (mechanismName != null) {
|
||||
codeLength += mechanismName.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 9
|
||||
os.write(0x89);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (responderAcseRequirements != null) {
|
||||
codeLength += responderAcseRequirements.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 8
|
||||
os.write(0x88);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (respondingAEInvocationIdentifier != null) {
|
||||
sublength = respondingAEInvocationIdentifier.encode(os, true);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 7
|
||||
os.write(0xA7);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (respondingAPInvocationIdentifier != null) {
|
||||
sublength = respondingAPInvocationIdentifier.encode(os, true);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 6
|
||||
os.write(0xA6);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (respondingAEQualifier != null) {
|
||||
sublength = respondingAEQualifier.encode(os);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 5
|
||||
os.write(0xA5);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (respondingAPTitle != null) {
|
||||
sublength = respondingAPTitle.encode(os);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 4
|
||||
os.write(0xA4);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
sublength = resultSourceDiagnostic.encode(os);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 3
|
||||
os.write(0xA3);
|
||||
codeLength += 1;
|
||||
|
||||
sublength = result.encode(os, true);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
|
||||
os.write(0xA2);
|
||||
codeLength += 1;
|
||||
|
||||
sublength = applicationContextName.encode(os, true);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
|
||||
os.write(0xA1);
|
||||
codeLength += 1;
|
||||
|
||||
if (protocolVersion != null) {
|
||||
codeLength += protocolVersion.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
|
||||
os.write(0x80);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
codeLength += totalLength;
|
||||
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
|
||||
protocolVersion = new BerBitString();
|
||||
subCodeLength += protocolVersion.decode(is, false);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) {
|
||||
subCodeLength += length.decode(is);
|
||||
applicationContextName = new BerObjectIdentifier();
|
||||
subCodeLength += applicationContextName.decode(is, true);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
else {
|
||||
throw new IOException("Tag does not match the mandatory sequence element tag.");
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) {
|
||||
subCodeLength += length.decode(is);
|
||||
result = new AssociateResult();
|
||||
subCodeLength += result.decode(is, true);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
else {
|
||||
throw new IOException("Tag does not match the mandatory sequence element tag.");
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 3)) {
|
||||
subCodeLength += length.decode(is);
|
||||
resultSourceDiagnostic = new AssociateSourceDiagnostic();
|
||||
subCodeLength += resultSourceDiagnostic.decode(is, null);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
else {
|
||||
throw new IOException("Tag does not match the mandatory sequence element tag.");
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 4)) {
|
||||
subCodeLength += length.decode(is);
|
||||
respondingAPTitle = new APTitle();
|
||||
subCodeLength += respondingAPTitle.decode(is, null);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 5)) {
|
||||
subCodeLength += length.decode(is);
|
||||
respondingAEQualifier = new AEQualifier();
|
||||
subCodeLength += respondingAEQualifier.decode(is, null);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 6)) {
|
||||
subCodeLength += length.decode(is);
|
||||
respondingAPInvocationIdentifier = new APInvocationIdentifier();
|
||||
subCodeLength += respondingAPInvocationIdentifier.decode(is, true);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 7)) {
|
||||
subCodeLength += length.decode(is);
|
||||
respondingAEInvocationIdentifier = new AEInvocationIdentifier();
|
||||
subCodeLength += respondingAEInvocationIdentifier.decode(is, true);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 8)) {
|
||||
responderAcseRequirements = new ACSERequirements();
|
||||
subCodeLength += responderAcseRequirements.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 9)) {
|
||||
mechanismName = new MechanismName();
|
||||
subCodeLength += mechanismName.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 10)) {
|
||||
subCodeLength += length.decode(is);
|
||||
respondingAuthenticationValue = new AuthenticationValue();
|
||||
subCodeLength += respondingAuthenticationValue.decode(is, null);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 11)) {
|
||||
applicationContextNameList = new ApplicationContextNameList();
|
||||
subCodeLength += applicationContextNameList.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 29)) {
|
||||
implementationInformation = new ImplementationData();
|
||||
subCodeLength += implementationInformation.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 30)) {
|
||||
userInformation = new AssociationInformation();
|
||||
subCodeLength += userInformation.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
}
|
||||
throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: "
|
||||
+ subCodeLength);
|
||||
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
sb.append("{");
|
||||
boolean firstSelectedElement = true;
|
||||
if (protocolVersion != null) {
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("protocolVersion: ").append(protocolVersion);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(",\n");
|
||||
}
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
if (applicationContextName != null) {
|
||||
sb.append("applicationContextName: ").append(applicationContextName);
|
||||
}
|
||||
else {
|
||||
sb.append("applicationContextName: <empty-required-field>");
|
||||
}
|
||||
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
if (result != null) {
|
||||
sb.append("result: ").append(result);
|
||||
}
|
||||
else {
|
||||
sb.append("result: <empty-required-field>");
|
||||
}
|
||||
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
if (resultSourceDiagnostic != null) {
|
||||
sb.append("resultSourceDiagnostic: ");
|
||||
resultSourceDiagnostic.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
else {
|
||||
sb.append("resultSourceDiagnostic: <empty-required-field>");
|
||||
}
|
||||
|
||||
if (respondingAPTitle != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("respondingAPTitle: ");
|
||||
respondingAPTitle.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
|
||||
if (respondingAEQualifier != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("respondingAEQualifier: ");
|
||||
respondingAEQualifier.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
|
||||
if (respondingAPInvocationIdentifier != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("respondingAPInvocationIdentifier: ").append(respondingAPInvocationIdentifier);
|
||||
}
|
||||
|
||||
if (respondingAEInvocationIdentifier != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("respondingAEInvocationIdentifier: ").append(respondingAEInvocationIdentifier);
|
||||
}
|
||||
|
||||
if (responderAcseRequirements != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("responderAcseRequirements: ").append(responderAcseRequirements);
|
||||
}
|
||||
|
||||
if (mechanismName != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("mechanismName: ").append(mechanismName);
|
||||
}
|
||||
|
||||
if (respondingAuthenticationValue != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("respondingAuthenticationValue: ");
|
||||
respondingAuthenticationValue.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
|
||||
if (applicationContextNameList != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("applicationContextNameList: ");
|
||||
applicationContextNameList.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
|
||||
if (implementationInformation != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("implementationInformation: ").append(implementationInformation);
|
||||
}
|
||||
|
||||
if (userInformation != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("userInformation: ");
|
||||
userInformation.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("}");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,677 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
import org.openmuc.jasn1.ber.types.BerBitString;
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
|
||||
public class AARQApdu implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.APPLICATION_CLASS, BerTag.CONSTRUCTED, 0);
|
||||
|
||||
public byte[] code = null;
|
||||
private BerBitString protocolVersion = null;
|
||||
private BerObjectIdentifier applicationContextName = null;
|
||||
private APTitle calledAPTitle = null;
|
||||
private AEQualifier calledAEQualifier = null;
|
||||
private APInvocationIdentifier calledAPInvocationIdentifier = null;
|
||||
private AEInvocationIdentifier calledAEInvocationIdentifier = null;
|
||||
private APTitle callingAPTitle = null;
|
||||
private AEQualifier callingAEQualifier = null;
|
||||
private APInvocationIdentifier callingAPInvocationIdentifier = null;
|
||||
private AEInvocationIdentifier callingAEInvocationIdentifier = null;
|
||||
private ACSERequirements senderAcseRequirements = null;
|
||||
private MechanismName mechanismName = null;
|
||||
private AuthenticationValue callingAuthenticationValue = null;
|
||||
private ApplicationContextNameList applicationContextNameList = null;
|
||||
private ImplementationData implementationInformation = null;
|
||||
private AssociationInformation userInformation = null;
|
||||
|
||||
public AARQApdu() {
|
||||
}
|
||||
|
||||
public AARQApdu(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setProtocolVersion(BerBitString protocolVersion) {
|
||||
this.protocolVersion = protocolVersion;
|
||||
}
|
||||
|
||||
public BerBitString getProtocolVersion() {
|
||||
return protocolVersion;
|
||||
}
|
||||
|
||||
public void setApplicationContextName(BerObjectIdentifier applicationContextName) {
|
||||
this.applicationContextName = applicationContextName;
|
||||
}
|
||||
|
||||
public BerObjectIdentifier getApplicationContextName() {
|
||||
return applicationContextName;
|
||||
}
|
||||
|
||||
public void setCalledAPTitle(APTitle calledAPTitle) {
|
||||
this.calledAPTitle = calledAPTitle;
|
||||
}
|
||||
|
||||
public APTitle getCalledAPTitle() {
|
||||
return calledAPTitle;
|
||||
}
|
||||
|
||||
public void setCalledAEQualifier(AEQualifier calledAEQualifier) {
|
||||
this.calledAEQualifier = calledAEQualifier;
|
||||
}
|
||||
|
||||
public AEQualifier getCalledAEQualifier() {
|
||||
return calledAEQualifier;
|
||||
}
|
||||
|
||||
public void setCalledAPInvocationIdentifier(APInvocationIdentifier calledAPInvocationIdentifier) {
|
||||
this.calledAPInvocationIdentifier = calledAPInvocationIdentifier;
|
||||
}
|
||||
|
||||
public APInvocationIdentifier getCalledAPInvocationIdentifier() {
|
||||
return calledAPInvocationIdentifier;
|
||||
}
|
||||
|
||||
public void setCalledAEInvocationIdentifier(AEInvocationIdentifier calledAEInvocationIdentifier) {
|
||||
this.calledAEInvocationIdentifier = calledAEInvocationIdentifier;
|
||||
}
|
||||
|
||||
public AEInvocationIdentifier getCalledAEInvocationIdentifier() {
|
||||
return calledAEInvocationIdentifier;
|
||||
}
|
||||
|
||||
public void setCallingAPTitle(APTitle callingAPTitle) {
|
||||
this.callingAPTitle = callingAPTitle;
|
||||
}
|
||||
|
||||
public APTitle getCallingAPTitle() {
|
||||
return callingAPTitle;
|
||||
}
|
||||
|
||||
public void setCallingAEQualifier(AEQualifier callingAEQualifier) {
|
||||
this.callingAEQualifier = callingAEQualifier;
|
||||
}
|
||||
|
||||
public AEQualifier getCallingAEQualifier() {
|
||||
return callingAEQualifier;
|
||||
}
|
||||
|
||||
public void setCallingAPInvocationIdentifier(APInvocationIdentifier callingAPInvocationIdentifier) {
|
||||
this.callingAPInvocationIdentifier = callingAPInvocationIdentifier;
|
||||
}
|
||||
|
||||
public APInvocationIdentifier getCallingAPInvocationIdentifier() {
|
||||
return callingAPInvocationIdentifier;
|
||||
}
|
||||
|
||||
public void setCallingAEInvocationIdentifier(AEInvocationIdentifier callingAEInvocationIdentifier) {
|
||||
this.callingAEInvocationIdentifier = callingAEInvocationIdentifier;
|
||||
}
|
||||
|
||||
public AEInvocationIdentifier getCallingAEInvocationIdentifier() {
|
||||
return callingAEInvocationIdentifier;
|
||||
}
|
||||
|
||||
public void setSenderAcseRequirements(ACSERequirements senderAcseRequirements) {
|
||||
this.senderAcseRequirements = senderAcseRequirements;
|
||||
}
|
||||
|
||||
public ACSERequirements getSenderAcseRequirements() {
|
||||
return senderAcseRequirements;
|
||||
}
|
||||
|
||||
public void setMechanismName(MechanismName mechanismName) {
|
||||
this.mechanismName = mechanismName;
|
||||
}
|
||||
|
||||
public MechanismName getMechanismName() {
|
||||
return mechanismName;
|
||||
}
|
||||
|
||||
public void setCallingAuthenticationValue(AuthenticationValue callingAuthenticationValue) {
|
||||
this.callingAuthenticationValue = callingAuthenticationValue;
|
||||
}
|
||||
|
||||
public AuthenticationValue getCallingAuthenticationValue() {
|
||||
return callingAuthenticationValue;
|
||||
}
|
||||
|
||||
public void setApplicationContextNameList(ApplicationContextNameList applicationContextNameList) {
|
||||
this.applicationContextNameList = applicationContextNameList;
|
||||
}
|
||||
|
||||
public ApplicationContextNameList getApplicationContextNameList() {
|
||||
return applicationContextNameList;
|
||||
}
|
||||
|
||||
public void setImplementationInformation(ImplementationData implementationInformation) {
|
||||
this.implementationInformation = implementationInformation;
|
||||
}
|
||||
|
||||
public ImplementationData getImplementationInformation() {
|
||||
return implementationInformation;
|
||||
}
|
||||
|
||||
public void setUserInformation(AssociationInformation userInformation) {
|
||||
this.userInformation = userInformation;
|
||||
}
|
||||
|
||||
public AssociationInformation getUserInformation() {
|
||||
return userInformation;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
int sublength;
|
||||
|
||||
if (userInformation != null) {
|
||||
codeLength += userInformation.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 30
|
||||
os.write(0xBE);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (implementationInformation != null) {
|
||||
codeLength += implementationInformation.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 29
|
||||
os.write(0x9D);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (applicationContextNameList != null) {
|
||||
codeLength += applicationContextNameList.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 13
|
||||
os.write(0xAD);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (callingAuthenticationValue != null) {
|
||||
sublength = callingAuthenticationValue.encode(os);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 12
|
||||
os.write(0xAC);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (mechanismName != null) {
|
||||
codeLength += mechanismName.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 11
|
||||
os.write(0x8B);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (senderAcseRequirements != null) {
|
||||
codeLength += senderAcseRequirements.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 10
|
||||
os.write(0x8A);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (callingAEInvocationIdentifier != null) {
|
||||
sublength = callingAEInvocationIdentifier.encode(os, true);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 9
|
||||
os.write(0xA9);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (callingAPInvocationIdentifier != null) {
|
||||
sublength = callingAPInvocationIdentifier.encode(os, true);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 8
|
||||
os.write(0xA8);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (callingAEQualifier != null) {
|
||||
sublength = callingAEQualifier.encode(os);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 7
|
||||
os.write(0xA7);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (callingAPTitle != null) {
|
||||
sublength = callingAPTitle.encode(os);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 6
|
||||
os.write(0xA6);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (calledAEInvocationIdentifier != null) {
|
||||
sublength = calledAEInvocationIdentifier.encode(os, true);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 5
|
||||
os.write(0xA5);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (calledAPInvocationIdentifier != null) {
|
||||
sublength = calledAPInvocationIdentifier.encode(os, true);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 4
|
||||
os.write(0xA4);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (calledAEQualifier != null) {
|
||||
sublength = calledAEQualifier.encode(os);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 3
|
||||
os.write(0xA3);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (calledAPTitle != null) {
|
||||
sublength = calledAPTitle.encode(os);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
|
||||
os.write(0xA2);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
sublength = applicationContextName.encode(os, true);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
|
||||
os.write(0xA1);
|
||||
codeLength += 1;
|
||||
|
||||
if (protocolVersion != null) {
|
||||
codeLength += protocolVersion.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
|
||||
os.write(0x80);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
codeLength += totalLength;
|
||||
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
|
||||
protocolVersion = new BerBitString();
|
||||
subCodeLength += protocolVersion.decode(is, false);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) {
|
||||
subCodeLength += length.decode(is);
|
||||
applicationContextName = new BerObjectIdentifier();
|
||||
subCodeLength += applicationContextName.decode(is, true);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
else {
|
||||
throw new IOException("Tag does not match the mandatory sequence element tag.");
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) {
|
||||
subCodeLength += length.decode(is);
|
||||
calledAPTitle = new APTitle();
|
||||
subCodeLength += calledAPTitle.decode(is, null);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 3)) {
|
||||
subCodeLength += length.decode(is);
|
||||
calledAEQualifier = new AEQualifier();
|
||||
subCodeLength += calledAEQualifier.decode(is, null);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 4)) {
|
||||
subCodeLength += length.decode(is);
|
||||
calledAPInvocationIdentifier = new APInvocationIdentifier();
|
||||
subCodeLength += calledAPInvocationIdentifier.decode(is, true);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 5)) {
|
||||
subCodeLength += length.decode(is);
|
||||
calledAEInvocationIdentifier = new AEInvocationIdentifier();
|
||||
subCodeLength += calledAEInvocationIdentifier.decode(is, true);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 6)) {
|
||||
subCodeLength += length.decode(is);
|
||||
callingAPTitle = new APTitle();
|
||||
subCodeLength += callingAPTitle.decode(is, null);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 7)) {
|
||||
subCodeLength += length.decode(is);
|
||||
callingAEQualifier = new AEQualifier();
|
||||
subCodeLength += callingAEQualifier.decode(is, null);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 8)) {
|
||||
subCodeLength += length.decode(is);
|
||||
callingAPInvocationIdentifier = new APInvocationIdentifier();
|
||||
subCodeLength += callingAPInvocationIdentifier.decode(is, true);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 9)) {
|
||||
subCodeLength += length.decode(is);
|
||||
callingAEInvocationIdentifier = new AEInvocationIdentifier();
|
||||
subCodeLength += callingAEInvocationIdentifier.decode(is, true);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 10)) {
|
||||
senderAcseRequirements = new ACSERequirements();
|
||||
subCodeLength += senderAcseRequirements.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 11)) {
|
||||
mechanismName = new MechanismName();
|
||||
subCodeLength += mechanismName.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 12)) {
|
||||
subCodeLength += length.decode(is);
|
||||
callingAuthenticationValue = new AuthenticationValue();
|
||||
subCodeLength += callingAuthenticationValue.decode(is, null);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 13)) {
|
||||
applicationContextNameList = new ApplicationContextNameList();
|
||||
subCodeLength += applicationContextNameList.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 29)) {
|
||||
implementationInformation = new ImplementationData();
|
||||
subCodeLength += implementationInformation.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 30)) {
|
||||
userInformation = new AssociationInformation();
|
||||
subCodeLength += userInformation.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
}
|
||||
throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: "
|
||||
+ subCodeLength);
|
||||
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
sb.append("{");
|
||||
boolean firstSelectedElement = true;
|
||||
if (protocolVersion != null) {
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("protocolVersion: ").append(protocolVersion);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(",\n");
|
||||
}
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
if (applicationContextName != null) {
|
||||
sb.append("applicationContextName: ").append(applicationContextName);
|
||||
}
|
||||
else {
|
||||
sb.append("applicationContextName: <empty-required-field>");
|
||||
}
|
||||
|
||||
if (calledAPTitle != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("calledAPTitle: ");
|
||||
calledAPTitle.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
|
||||
if (calledAEQualifier != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("calledAEQualifier: ");
|
||||
calledAEQualifier.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
|
||||
if (calledAPInvocationIdentifier != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("calledAPInvocationIdentifier: ").append(calledAPInvocationIdentifier);
|
||||
}
|
||||
|
||||
if (calledAEInvocationIdentifier != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("calledAEInvocationIdentifier: ").append(calledAEInvocationIdentifier);
|
||||
}
|
||||
|
||||
if (callingAPTitle != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("callingAPTitle: ");
|
||||
callingAPTitle.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
|
||||
if (callingAEQualifier != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("callingAEQualifier: ");
|
||||
callingAEQualifier.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
|
||||
if (callingAPInvocationIdentifier != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("callingAPInvocationIdentifier: ").append(callingAPInvocationIdentifier);
|
||||
}
|
||||
|
||||
if (callingAEInvocationIdentifier != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("callingAEInvocationIdentifier: ").append(callingAEInvocationIdentifier);
|
||||
}
|
||||
|
||||
if (senderAcseRequirements != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("senderAcseRequirements: ").append(senderAcseRequirements);
|
||||
}
|
||||
|
||||
if (mechanismName != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("mechanismName: ").append(mechanismName);
|
||||
}
|
||||
|
||||
if (callingAuthenticationValue != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("callingAuthenticationValue: ");
|
||||
callingAuthenticationValue.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
|
||||
if (applicationContextNameList != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("applicationContextNameList: ");
|
||||
applicationContextNameList.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
|
||||
if (implementationInformation != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("implementationInformation: ").append(implementationInformation);
|
||||
}
|
||||
|
||||
if (userInformation != null) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("userInformation: ");
|
||||
userInformation.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("}");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,183 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
|
||||
public class ACSEApdu implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public byte[] code = null;
|
||||
private AARQApdu aarq = null;
|
||||
private AAREApdu aare = null;
|
||||
private RLRQApdu rlrq = null;
|
||||
private RLREApdu rlre = null;
|
||||
|
||||
public ACSEApdu() {
|
||||
}
|
||||
|
||||
public ACSEApdu(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setAarq(AARQApdu aarq) {
|
||||
this.aarq = aarq;
|
||||
}
|
||||
|
||||
public AARQApdu getAarq() {
|
||||
return aarq;
|
||||
}
|
||||
|
||||
public void setAare(AAREApdu aare) {
|
||||
this.aare = aare;
|
||||
}
|
||||
|
||||
public AAREApdu getAare() {
|
||||
return aare;
|
||||
}
|
||||
|
||||
public void setRlrq(RLRQApdu rlrq) {
|
||||
this.rlrq = rlrq;
|
||||
}
|
||||
|
||||
public RLRQApdu getRlrq() {
|
||||
return rlrq;
|
||||
}
|
||||
|
||||
public void setRlre(RLREApdu rlre) {
|
||||
this.rlre = rlre;
|
||||
}
|
||||
|
||||
public RLREApdu getRlre() {
|
||||
return rlre;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
if (rlre != null) {
|
||||
codeLength += rlre.encode(os, true);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (rlrq != null) {
|
||||
codeLength += rlrq.encode(os, true);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (aare != null) {
|
||||
codeLength += aare.encode(os, true);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (aarq != null) {
|
||||
codeLength += aarq.encode(os, true);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
throw new IOException("Error encoding CHOICE: No element of CHOICE was selected.");
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, null);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, BerTag berTag) throws IOException {
|
||||
|
||||
int codeLength = 0;
|
||||
BerTag passedTag = berTag;
|
||||
|
||||
if (berTag == null) {
|
||||
berTag = new BerTag();
|
||||
codeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(AARQApdu.tag)) {
|
||||
aarq = new AARQApdu();
|
||||
codeLength += aarq.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (berTag.equals(AAREApdu.tag)) {
|
||||
aare = new AAREApdu();
|
||||
codeLength += aare.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (berTag.equals(RLRQApdu.tag)) {
|
||||
rlrq = new RLRQApdu();
|
||||
codeLength += rlrq.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (berTag.equals(RLREApdu.tag)) {
|
||||
rlre = new RLREApdu();
|
||||
codeLength += rlre.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (passedTag != null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item.");
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
if (aarq != null) {
|
||||
sb.append("aarq: ");
|
||||
aarq.appendAsString(sb, indentLevel + 1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (aare != null) {
|
||||
sb.append("aare: ");
|
||||
aare.appendAsString(sb, indentLevel + 1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (rlrq != null) {
|
||||
sb.append("rlrq: ");
|
||||
rlrq.appendAsString(sb, indentLevel + 1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (rlre != null) {
|
||||
sb.append("rlre: ");
|
||||
rlre.appendAsString(sb, indentLevel + 1);
|
||||
return;
|
||||
}
|
||||
|
||||
sb.append("<none>");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerBitString;
|
||||
|
||||
public class ACSERequirements extends BerBitString {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ACSERequirements() {
|
||||
}
|
||||
|
||||
public ACSERequirements(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public ACSERequirements(byte[] value, int numBits) {
|
||||
super(value, numBits);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
|
||||
public class AEInvocationIdentifier extends BerInteger {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public AEInvocationIdentifier() {
|
||||
}
|
||||
|
||||
public AEInvocationIdentifier(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public AEInvocationIdentifier(BigInteger value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
public AEInvocationIdentifier(long value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
|
||||
public class AEQualifier implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public byte[] code = null;
|
||||
private AEQualifierForm2 aeQualifierForm2 = null;
|
||||
|
||||
public AEQualifier() {
|
||||
}
|
||||
|
||||
public AEQualifier(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setAeQualifierForm2(AEQualifierForm2 aeQualifierForm2) {
|
||||
this.aeQualifierForm2 = aeQualifierForm2;
|
||||
}
|
||||
|
||||
public AEQualifierForm2 getAeQualifierForm2() {
|
||||
return aeQualifierForm2;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
if (aeQualifierForm2 != null) {
|
||||
codeLength += aeQualifierForm2.encode(os, true);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
throw new IOException("Error encoding CHOICE: No element of CHOICE was selected.");
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, null);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, BerTag berTag) throws IOException {
|
||||
|
||||
int codeLength = 0;
|
||||
BerTag passedTag = berTag;
|
||||
|
||||
if (berTag == null) {
|
||||
berTag = new BerTag();
|
||||
codeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerInteger.tag)) {
|
||||
aeQualifierForm2 = new AEQualifierForm2();
|
||||
codeLength += aeQualifierForm2.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (passedTag != null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item.");
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
if (aeQualifierForm2 != null) {
|
||||
sb.append("aeQualifierForm2: ").append(aeQualifierForm2);
|
||||
return;
|
||||
}
|
||||
|
||||
sb.append("<none>");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
|
||||
public class AEQualifierForm2 extends BerInteger {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public AEQualifierForm2() {
|
||||
}
|
||||
|
||||
public AEQualifierForm2(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public AEQualifierForm2(BigInteger value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
public AEQualifierForm2(long value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
|
||||
public class AETitle implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public byte[] code = null;
|
||||
private AETitleForm2 aeTitleForm2 = null;
|
||||
|
||||
public AETitle() {
|
||||
}
|
||||
|
||||
public AETitle(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setAeTitleForm2(AETitleForm2 aeTitleForm2) {
|
||||
this.aeTitleForm2 = aeTitleForm2;
|
||||
}
|
||||
|
||||
public AETitleForm2 getAeTitleForm2() {
|
||||
return aeTitleForm2;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
if (aeTitleForm2 != null) {
|
||||
codeLength += aeTitleForm2.encode(os, true);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
throw new IOException("Error encoding CHOICE: No element of CHOICE was selected.");
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, null);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, BerTag berTag) throws IOException {
|
||||
|
||||
int codeLength = 0;
|
||||
BerTag passedTag = berTag;
|
||||
|
||||
if (berTag == null) {
|
||||
berTag = new BerTag();
|
||||
codeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerObjectIdentifier.tag)) {
|
||||
aeTitleForm2 = new AETitleForm2();
|
||||
codeLength += aeTitleForm2.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (passedTag != null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item.");
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
if (aeTitleForm2 != null) {
|
||||
sb.append("aeTitleForm2: ").append(aeTitleForm2);
|
||||
return;
|
||||
}
|
||||
|
||||
sb.append("<none>");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
|
||||
public class AETitleForm2 extends BerObjectIdentifier {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public AETitleForm2() {
|
||||
}
|
||||
|
||||
public AETitleForm2(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public AETitleForm2(int[] value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
|
||||
public class APInvocationIdentifier extends BerInteger {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public APInvocationIdentifier() {
|
||||
}
|
||||
|
||||
public APInvocationIdentifier(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public APInvocationIdentifier(BigInteger value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
public APInvocationIdentifier(long value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
|
||||
public class APTitle implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public byte[] code = null;
|
||||
private APTitleForm2 apTitleForm2 = null;
|
||||
|
||||
public APTitle() {
|
||||
}
|
||||
|
||||
public APTitle(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setApTitleForm2(APTitleForm2 apTitleForm2) {
|
||||
this.apTitleForm2 = apTitleForm2;
|
||||
}
|
||||
|
||||
public APTitleForm2 getApTitleForm2() {
|
||||
return apTitleForm2;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
if (apTitleForm2 != null) {
|
||||
codeLength += apTitleForm2.encode(os, true);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
throw new IOException("Error encoding CHOICE: No element of CHOICE was selected.");
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, null);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, BerTag berTag) throws IOException {
|
||||
|
||||
int codeLength = 0;
|
||||
BerTag passedTag = berTag;
|
||||
|
||||
if (berTag == null) {
|
||||
berTag = new BerTag();
|
||||
codeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerObjectIdentifier.tag)) {
|
||||
apTitleForm2 = new APTitleForm2();
|
||||
codeLength += apTitleForm2.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (passedTag != null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item.");
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
if (apTitleForm2 != null) {
|
||||
sb.append("apTitleForm2: ").append(apTitleForm2);
|
||||
return;
|
||||
}
|
||||
|
||||
sb.append("<none>");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
|
||||
public class APTitleForm2 extends BerObjectIdentifier {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public APTitleForm2() {
|
||||
}
|
||||
|
||||
public APTitleForm2(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public APTitleForm2(int[] value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
|
||||
public class ApplicationContextName extends BerObjectIdentifier {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ApplicationContextName() {
|
||||
}
|
||||
|
||||
public ApplicationContextName(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public ApplicationContextName(int[] value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
|
||||
public class ApplicationContextNameList implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
|
||||
public byte[] code = null;
|
||||
private List<ApplicationContextName> seqOf = null;
|
||||
|
||||
public ApplicationContextNameList() {
|
||||
seqOf = new ArrayList<>();
|
||||
}
|
||||
|
||||
public ApplicationContextNameList(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public List<ApplicationContextName> getApplicationContextName() {
|
||||
if (seqOf == null) {
|
||||
seqOf = new ArrayList<>();
|
||||
}
|
||||
return seqOf;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
for (int i = (seqOf.size() - 1); i >= 0; i--) {
|
||||
codeLength += seqOf.get(i).encode(os, true);
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
int totalLength = length.val;
|
||||
|
||||
while (subCodeLength < totalLength) {
|
||||
ApplicationContextName element = new ApplicationContextName();
|
||||
subCodeLength += element.decode(is, true);
|
||||
seqOf.add(element);
|
||||
}
|
||||
if (subCodeLength != totalLength) {
|
||||
throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has "
|
||||
+ subCodeLength);
|
||||
|
||||
}
|
||||
codeLength += subCodeLength;
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
sb.append("{\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
if (seqOf == null) {
|
||||
sb.append("null");
|
||||
}
|
||||
else {
|
||||
Iterator<ApplicationContextName> it = seqOf.iterator();
|
||||
if (it.hasNext()) {
|
||||
sb.append(it.next());
|
||||
while (it.hasNext()) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append(it.next());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("}");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
|
||||
public class AssociateResult extends BerInteger {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public AssociateResult() {
|
||||
}
|
||||
|
||||
public AssociateResult(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public AssociateResult(BigInteger value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
public AssociateResult(long value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,145 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
|
||||
public class AssociateSourceDiagnostic implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public byte[] code = null;
|
||||
private BerInteger acseServiceUser = null;
|
||||
private BerInteger acseServiceProvider = null;
|
||||
|
||||
public AssociateSourceDiagnostic() {
|
||||
}
|
||||
|
||||
public AssociateSourceDiagnostic(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setAcseServiceUser(BerInteger acseServiceUser) {
|
||||
this.acseServiceUser = acseServiceUser;
|
||||
}
|
||||
|
||||
public BerInteger getAcseServiceUser() {
|
||||
return acseServiceUser;
|
||||
}
|
||||
|
||||
public void setAcseServiceProvider(BerInteger acseServiceProvider) {
|
||||
this.acseServiceProvider = acseServiceProvider;
|
||||
}
|
||||
|
||||
public BerInteger getAcseServiceProvider() {
|
||||
return acseServiceProvider;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
int sublength;
|
||||
|
||||
if (acseServiceProvider != null) {
|
||||
sublength = acseServiceProvider.encode(os, true);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
|
||||
os.write(0xA2);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (acseServiceUser != null) {
|
||||
sublength = acseServiceUser.encode(os, true);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 1
|
||||
os.write(0xA1);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
throw new IOException("Error encoding CHOICE: No element of CHOICE was selected.");
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, null);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, BerTag berTag) throws IOException {
|
||||
|
||||
int codeLength = 0;
|
||||
BerTag passedTag = berTag;
|
||||
|
||||
if (berTag == null) {
|
||||
berTag = new BerTag();
|
||||
codeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 1)) {
|
||||
codeLength += BerLength.skip(is);
|
||||
acseServiceUser = new BerInteger();
|
||||
codeLength += acseServiceUser.decode(is, true);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) {
|
||||
codeLength += BerLength.skip(is);
|
||||
acseServiceProvider = new BerInteger();
|
||||
codeLength += acseServiceProvider.decode(is, true);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (passedTag != null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item.");
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
if (acseServiceUser != null) {
|
||||
sb.append("acseServiceUser: ").append(acseServiceUser);
|
||||
return;
|
||||
}
|
||||
|
||||
if (acseServiceProvider != null) {
|
||||
sb.append("acseServiceProvider: ").append(acseServiceProvider);
|
||||
return;
|
||||
}
|
||||
|
||||
sb.append("<none>");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
|
||||
public class AssociationInformation implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
|
||||
public byte[] code = null;
|
||||
private List<Myexternal> seqOf = null;
|
||||
|
||||
public AssociationInformation() {
|
||||
seqOf = new ArrayList<>();
|
||||
}
|
||||
|
||||
public AssociationInformation(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public List<Myexternal> getMyexternal() {
|
||||
if (seqOf == null) {
|
||||
seqOf = new ArrayList<>();
|
||||
}
|
||||
return seqOf;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
for (int i = (seqOf.size() - 1); i >= 0; i--) {
|
||||
codeLength += seqOf.get(i).encode(os, true);
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
int totalLength = length.val;
|
||||
|
||||
while (subCodeLength < totalLength) {
|
||||
Myexternal element = new Myexternal();
|
||||
subCodeLength += element.decode(is, true);
|
||||
seqOf.add(element);
|
||||
}
|
||||
if (subCodeLength != totalLength) {
|
||||
throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has "
|
||||
+ subCodeLength);
|
||||
|
||||
}
|
||||
codeLength += subCodeLength;
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
sb.append("{\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
if (seqOf == null) {
|
||||
sb.append("null");
|
||||
}
|
||||
else {
|
||||
Iterator<Myexternal> it = seqOf.iterator();
|
||||
if (it.hasNext()) {
|
||||
it.next().appendAsString(sb, indentLevel + 1);
|
||||
while (it.hasNext()) {
|
||||
sb.append(",\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
it.next().appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("}");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,166 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
import org.openmuc.jasn1.ber.types.BerBitString;
|
||||
import org.openmuc.jasn1.ber.types.string.BerGraphicString;
|
||||
|
||||
public class AuthenticationValue implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public byte[] code = null;
|
||||
private BerGraphicString charstring = null;
|
||||
private BerBitString bitstring = null;
|
||||
private Myexternal2 external = null;
|
||||
|
||||
public AuthenticationValue() {
|
||||
}
|
||||
|
||||
public AuthenticationValue(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setCharstring(BerGraphicString charstring) {
|
||||
this.charstring = charstring;
|
||||
}
|
||||
|
||||
public BerGraphicString getCharstring() {
|
||||
return charstring;
|
||||
}
|
||||
|
||||
public void setBitstring(BerBitString bitstring) {
|
||||
this.bitstring = bitstring;
|
||||
}
|
||||
|
||||
public BerBitString getBitstring() {
|
||||
return bitstring;
|
||||
}
|
||||
|
||||
public void setExternal(Myexternal2 external) {
|
||||
this.external = external;
|
||||
}
|
||||
|
||||
public Myexternal2 getExternal() {
|
||||
return external;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
if (external != null) {
|
||||
codeLength += external.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
|
||||
os.write(0xA2);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (bitstring != null) {
|
||||
codeLength += bitstring.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
|
||||
os.write(0x81);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (charstring != null) {
|
||||
codeLength += charstring.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
|
||||
os.write(0x80);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
throw new IOException("Error encoding CHOICE: No element of CHOICE was selected.");
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, null);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, BerTag berTag) throws IOException {
|
||||
|
||||
int codeLength = 0;
|
||||
BerTag passedTag = berTag;
|
||||
|
||||
if (berTag == null) {
|
||||
berTag = new BerTag();
|
||||
codeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
|
||||
charstring = new BerGraphicString();
|
||||
codeLength += charstring.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) {
|
||||
bitstring = new BerBitString();
|
||||
codeLength += bitstring.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) {
|
||||
external = new Myexternal2();
|
||||
codeLength += external.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (passedTag != null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item.");
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
if (charstring != null) {
|
||||
sb.append("charstring: ").append(charstring);
|
||||
return;
|
||||
}
|
||||
|
||||
if (bitstring != null) {
|
||||
sb.append("bitstring: ").append(bitstring);
|
||||
return;
|
||||
}
|
||||
|
||||
if (external != null) {
|
||||
sb.append("external: ");
|
||||
external.appendAsString(sb, indentLevel + 1);
|
||||
return;
|
||||
}
|
||||
|
||||
sb.append("<none>");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.string.BerGraphicString;
|
||||
|
||||
public class ImplementationData extends BerGraphicString {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ImplementationData() {
|
||||
}
|
||||
|
||||
public ImplementationData(byte[] value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
|
||||
public class MechanismName extends BerObjectIdentifier {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public MechanismName() {
|
||||
}
|
||||
|
||||
public MechanismName(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public MechanismName(int[] value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,355 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
import org.openmuc.jasn1.ber.types.BerAny;
|
||||
import org.openmuc.jasn1.ber.types.BerBitString;
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
import org.openmuc.jasn1.ber.types.BerOctetString;
|
||||
|
||||
public class Myexternal implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static class Encoding implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public byte[] code = null;
|
||||
private BerAny singleASN1Type = null;
|
||||
private BerOctetString octetAligned = null;
|
||||
private BerBitString arbitrary = null;
|
||||
|
||||
public Encoding() {
|
||||
}
|
||||
|
||||
public Encoding(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setSingleASN1Type(BerAny singleASN1Type) {
|
||||
this.singleASN1Type = singleASN1Type;
|
||||
}
|
||||
|
||||
public BerAny getSingleASN1Type() {
|
||||
return singleASN1Type;
|
||||
}
|
||||
|
||||
public void setOctetAligned(BerOctetString octetAligned) {
|
||||
this.octetAligned = octetAligned;
|
||||
}
|
||||
|
||||
public BerOctetString getOctetAligned() {
|
||||
return octetAligned;
|
||||
}
|
||||
|
||||
public void setArbitrary(BerBitString arbitrary) {
|
||||
this.arbitrary = arbitrary;
|
||||
}
|
||||
|
||||
public BerBitString getArbitrary() {
|
||||
return arbitrary;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
int sublength;
|
||||
|
||||
if (arbitrary != null) {
|
||||
codeLength += arbitrary.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
|
||||
os.write(0x82);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (octetAligned != null) {
|
||||
codeLength += octetAligned.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
|
||||
os.write(0x81);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (singleASN1Type != null) {
|
||||
sublength = singleASN1Type.encode(os);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
|
||||
os.write(0xA0);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
throw new IOException("Error encoding CHOICE: No element of CHOICE was selected.");
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, null);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, BerTag berTag) throws IOException {
|
||||
|
||||
int codeLength = 0;
|
||||
BerTag passedTag = berTag;
|
||||
|
||||
if (berTag == null) {
|
||||
berTag = new BerTag();
|
||||
codeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) {
|
||||
codeLength += BerLength.skip(is);
|
||||
singleASN1Type = new BerAny();
|
||||
codeLength += singleASN1Type.decode(is, null);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) {
|
||||
octetAligned = new BerOctetString();
|
||||
codeLength += octetAligned.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) {
|
||||
arbitrary = new BerBitString();
|
||||
codeLength += arbitrary.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (passedTag != null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item.");
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
if (singleASN1Type != null) {
|
||||
sb.append("singleASN1Type: ").append(singleASN1Type);
|
||||
return;
|
||||
}
|
||||
|
||||
if (octetAligned != null) {
|
||||
sb.append("octetAligned: ").append(octetAligned);
|
||||
return;
|
||||
}
|
||||
|
||||
if (arbitrary != null) {
|
||||
sb.append("arbitrary: ").append(arbitrary);
|
||||
return;
|
||||
}
|
||||
|
||||
sb.append("<none>");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 8);
|
||||
|
||||
public byte[] code = null;
|
||||
private BerObjectIdentifier directReference = null;
|
||||
private BerInteger indirectReference = null;
|
||||
private Encoding encoding = null;
|
||||
|
||||
public Myexternal() {
|
||||
}
|
||||
|
||||
public Myexternal(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setDirectReference(BerObjectIdentifier directReference) {
|
||||
this.directReference = directReference;
|
||||
}
|
||||
|
||||
public BerObjectIdentifier getDirectReference() {
|
||||
return directReference;
|
||||
}
|
||||
|
||||
public void setIndirectReference(BerInteger indirectReference) {
|
||||
this.indirectReference = indirectReference;
|
||||
}
|
||||
|
||||
public BerInteger getIndirectReference() {
|
||||
return indirectReference;
|
||||
}
|
||||
|
||||
public void setEncoding(Encoding encoding) {
|
||||
this.encoding = encoding;
|
||||
}
|
||||
|
||||
public Encoding getEncoding() {
|
||||
return encoding;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
codeLength += encoding.encode(os);
|
||||
|
||||
if (indirectReference != null) {
|
||||
codeLength += indirectReference.encode(os, true);
|
||||
}
|
||||
|
||||
if (directReference != null) {
|
||||
codeLength += directReference.encode(os, true);
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
codeLength += totalLength;
|
||||
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerObjectIdentifier.tag)) {
|
||||
directReference = new BerObjectIdentifier();
|
||||
subCodeLength += directReference.decode(is, false);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerInteger.tag)) {
|
||||
indirectReference = new BerInteger();
|
||||
subCodeLength += indirectReference.decode(is, false);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
encoding = new Encoding();
|
||||
subCodeLength += encoding.decode(is, berTag);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: "
|
||||
+ subCodeLength);
|
||||
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
sb.append("{");
|
||||
boolean firstSelectedElement = true;
|
||||
if (directReference != null) {
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("directReference: ").append(directReference);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (indirectReference != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(",\n");
|
||||
}
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("indirectReference: ").append(indirectReference);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(",\n");
|
||||
}
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
if (encoding != null) {
|
||||
sb.append("encoding: ");
|
||||
encoding.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
else {
|
||||
sb.append("encoding: <empty-required-field>");
|
||||
}
|
||||
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("}");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,355 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
import org.openmuc.jasn1.ber.types.BerAny;
|
||||
import org.openmuc.jasn1.ber.types.BerBitString;
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
import org.openmuc.jasn1.ber.types.BerOctetString;
|
||||
|
||||
public class Myexternal2 implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static class Encoding implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public byte[] code = null;
|
||||
private BerAny singleASN1Type = null;
|
||||
private BerOctetString octetAligned = null;
|
||||
private BerBitString arbitrary = null;
|
||||
|
||||
public Encoding() {
|
||||
}
|
||||
|
||||
public Encoding(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setSingleASN1Type(BerAny singleASN1Type) {
|
||||
this.singleASN1Type = singleASN1Type;
|
||||
}
|
||||
|
||||
public BerAny getSingleASN1Type() {
|
||||
return singleASN1Type;
|
||||
}
|
||||
|
||||
public void setOctetAligned(BerOctetString octetAligned) {
|
||||
this.octetAligned = octetAligned;
|
||||
}
|
||||
|
||||
public BerOctetString getOctetAligned() {
|
||||
return octetAligned;
|
||||
}
|
||||
|
||||
public void setArbitrary(BerBitString arbitrary) {
|
||||
this.arbitrary = arbitrary;
|
||||
}
|
||||
|
||||
public BerBitString getArbitrary() {
|
||||
return arbitrary;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
int sublength;
|
||||
|
||||
if (arbitrary != null) {
|
||||
codeLength += arbitrary.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
|
||||
os.write(0x82);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (octetAligned != null) {
|
||||
codeLength += octetAligned.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
|
||||
os.write(0x81);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (singleASN1Type != null) {
|
||||
sublength = singleASN1Type.encode(os);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
|
||||
os.write(0xA0);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
throw new IOException("Error encoding CHOICE: No element of CHOICE was selected.");
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, null);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, BerTag berTag) throws IOException {
|
||||
|
||||
int codeLength = 0;
|
||||
BerTag passedTag = berTag;
|
||||
|
||||
if (berTag == null) {
|
||||
berTag = new BerTag();
|
||||
codeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) {
|
||||
codeLength += BerLength.skip(is);
|
||||
singleASN1Type = new BerAny();
|
||||
codeLength += singleASN1Type.decode(is, null);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) {
|
||||
octetAligned = new BerOctetString();
|
||||
codeLength += octetAligned.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) {
|
||||
arbitrary = new BerBitString();
|
||||
codeLength += arbitrary.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (passedTag != null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item.");
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
if (singleASN1Type != null) {
|
||||
sb.append("singleASN1Type: ").append(singleASN1Type);
|
||||
return;
|
||||
}
|
||||
|
||||
if (octetAligned != null) {
|
||||
sb.append("octetAligned: ").append(octetAligned);
|
||||
return;
|
||||
}
|
||||
|
||||
if (arbitrary != null) {
|
||||
sb.append("arbitrary: ").append(arbitrary);
|
||||
return;
|
||||
}
|
||||
|
||||
sb.append("<none>");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 8);
|
||||
|
||||
public byte[] code = null;
|
||||
private BerObjectIdentifier directReference = null;
|
||||
private BerInteger indirectReference = null;
|
||||
private Encoding encoding = null;
|
||||
|
||||
public Myexternal2() {
|
||||
}
|
||||
|
||||
public Myexternal2(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setDirectReference(BerObjectIdentifier directReference) {
|
||||
this.directReference = directReference;
|
||||
}
|
||||
|
||||
public BerObjectIdentifier getDirectReference() {
|
||||
return directReference;
|
||||
}
|
||||
|
||||
public void setIndirectReference(BerInteger indirectReference) {
|
||||
this.indirectReference = indirectReference;
|
||||
}
|
||||
|
||||
public BerInteger getIndirectReference() {
|
||||
return indirectReference;
|
||||
}
|
||||
|
||||
public void setEncoding(Encoding encoding) {
|
||||
this.encoding = encoding;
|
||||
}
|
||||
|
||||
public Encoding getEncoding() {
|
||||
return encoding;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
codeLength += encoding.encode(os);
|
||||
|
||||
if (indirectReference != null) {
|
||||
codeLength += indirectReference.encode(os, true);
|
||||
}
|
||||
|
||||
if (directReference != null) {
|
||||
codeLength += directReference.encode(os, true);
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
codeLength += totalLength;
|
||||
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerObjectIdentifier.tag)) {
|
||||
directReference = new BerObjectIdentifier();
|
||||
subCodeLength += directReference.decode(is, false);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerInteger.tag)) {
|
||||
indirectReference = new BerInteger();
|
||||
subCodeLength += indirectReference.decode(is, false);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
encoding = new Encoding();
|
||||
subCodeLength += encoding.decode(is, berTag);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: "
|
||||
+ subCodeLength);
|
||||
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
sb.append("{");
|
||||
boolean firstSelectedElement = true;
|
||||
if (directReference != null) {
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("directReference: ").append(directReference);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (indirectReference != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(",\n");
|
||||
}
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("indirectReference: ").append(indirectReference);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(",\n");
|
||||
}
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
if (encoding != null) {
|
||||
sb.append("encoding: ");
|
||||
encoding.appendAsString(sb, indentLevel + 1);
|
||||
}
|
||||
else {
|
||||
sb.append("encoding: <empty-required-field>");
|
||||
}
|
||||
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("}");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
|
||||
public final class OidValues {
|
||||
public static final BerObjectIdentifier aCSEId = new BerObjectIdentifier(new int[] { 2, 2, 3, 1, 1 });
|
||||
public static final BerObjectIdentifier acseAsId = new BerObjectIdentifier(new int[] { 2, 2, 1, 0, 1 });
|
||||
}
|
@ -0,0 +1,178 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
|
||||
public class RLREApdu implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.APPLICATION_CLASS, BerTag.CONSTRUCTED, 3);
|
||||
|
||||
public byte[] code = null;
|
||||
private ReleaseResponseReason reason = null;
|
||||
private AssociationInformation userInformation = null;
|
||||
|
||||
public RLREApdu() {
|
||||
}
|
||||
|
||||
public RLREApdu(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setReason(ReleaseResponseReason reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public ReleaseResponseReason getReason() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setUserInformation(AssociationInformation userInformation) {
|
||||
this.userInformation = userInformation;
|
||||
}
|
||||
|
||||
public AssociationInformation getUserInformation() {
|
||||
return userInformation;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
if (userInformation != null) {
|
||||
codeLength += userInformation.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 30
|
||||
os.write(0xBE);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (reason != null) {
|
||||
codeLength += reason.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
|
||||
os.write(0x80);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
codeLength += totalLength;
|
||||
|
||||
if (totalLength == 0) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
|
||||
reason = new ReleaseResponseReason();
|
||||
subCodeLength += reason.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 30)) {
|
||||
userInformation = new AssociationInformation();
|
||||
subCodeLength += userInformation.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
}
|
||||
throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: "
|
||||
+ subCodeLength);
|
||||
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
sb.append("{");
|
||||
boolean firstSelectedElement = true;
|
||||
if (reason != null) {
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("reason: ").append(reason);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (userInformation != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(",\n");
|
||||
}
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("userInformation: ");
|
||||
userInformation.appendAsString(sb, indentLevel + 1);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("}");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,178 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
|
||||
public class RLRQApdu implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.APPLICATION_CLASS, BerTag.CONSTRUCTED, 2);
|
||||
|
||||
public byte[] code = null;
|
||||
private ReleaseRequestReason reason = null;
|
||||
private AssociationInformation userInformation = null;
|
||||
|
||||
public RLRQApdu() {
|
||||
}
|
||||
|
||||
public RLRQApdu(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setReason(ReleaseRequestReason reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public ReleaseRequestReason getReason() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setUserInformation(AssociationInformation userInformation) {
|
||||
this.userInformation = userInformation;
|
||||
}
|
||||
|
||||
public AssociationInformation getUserInformation() {
|
||||
return userInformation;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
if (userInformation != null) {
|
||||
codeLength += userInformation.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 30
|
||||
os.write(0xBE);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (reason != null) {
|
||||
codeLength += reason.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
|
||||
os.write(0x80);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
codeLength += totalLength;
|
||||
|
||||
if (totalLength == 0) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
|
||||
reason = new ReleaseRequestReason();
|
||||
subCodeLength += reason.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 30)) {
|
||||
userInformation = new AssociationInformation();
|
||||
subCodeLength += userInformation.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
}
|
||||
throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: "
|
||||
+ subCodeLength);
|
||||
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendAsString(sb, 0);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void appendAsString(StringBuilder sb, int indentLevel) {
|
||||
|
||||
sb.append("{");
|
||||
boolean firstSelectedElement = true;
|
||||
if (reason != null) {
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("reason: ").append(reason);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (userInformation != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(",\n");
|
||||
}
|
||||
for (int i = 0; i < indentLevel + 1; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("userInformation: ");
|
||||
userInformation.appendAsString(sb, indentLevel + 1);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
sb.append("\n");
|
||||
for (int i = 0; i < indentLevel; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
sb.append("}");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
|
||||
public class ReleaseRequestReason extends BerInteger {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ReleaseRequestReason() {
|
||||
}
|
||||
|
||||
public ReleaseRequestReason(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public ReleaseRequestReason(BigInteger value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
public ReleaseRequestReason(long value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.8.0 (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.acse.asn1;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
|
||||
public class ReleaseResponseReason extends BerInteger {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ReleaseResponseReason() {
|
||||
}
|
||||
|
||||
public ReleaseResponseReason(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public ReleaseResponseReason(BigInteger value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
public ReleaseResponseReason(long value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
|
||||
public class AbstractSyntaxName extends BerObjectIdentifier {
|
||||
|
||||
public AbstractSyntaxName() {
|
||||
}
|
||||
|
||||
public AbstractSyntaxName(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public AbstractSyntaxName(int[] value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,416 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
|
||||
public class CPAPPDU {
|
||||
|
||||
public static class NormalModeParameters {
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
|
||||
|
||||
public byte[] code = null;
|
||||
private ProtocolVersion protocolVersion = null;
|
||||
private RespondingPresentationSelector respondingPresentationSelector = null;
|
||||
private PresentationContextDefinitionResultList presentationContextDefinitionResultList = null;
|
||||
private PresentationRequirements presentationRequirements = null;
|
||||
private UserSessionRequirements userSessionRequirements = null;
|
||||
private UserData userData = null;
|
||||
|
||||
public NormalModeParameters() {
|
||||
}
|
||||
|
||||
public NormalModeParameters(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setProtocolVersion(ProtocolVersion protocolVersion) {
|
||||
this.protocolVersion = protocolVersion;
|
||||
}
|
||||
|
||||
public ProtocolVersion getProtocolVersion() {
|
||||
return protocolVersion;
|
||||
}
|
||||
|
||||
public void setRespondingPresentationSelector(RespondingPresentationSelector respondingPresentationSelector) {
|
||||
this.respondingPresentationSelector = respondingPresentationSelector;
|
||||
}
|
||||
|
||||
public RespondingPresentationSelector getRespondingPresentationSelector() {
|
||||
return respondingPresentationSelector;
|
||||
}
|
||||
|
||||
public void setPresentationContextDefinitionResultList(
|
||||
PresentationContextDefinitionResultList presentationContextDefinitionResultList) {
|
||||
this.presentationContextDefinitionResultList = presentationContextDefinitionResultList;
|
||||
}
|
||||
|
||||
public PresentationContextDefinitionResultList getPresentationContextDefinitionResultList() {
|
||||
return presentationContextDefinitionResultList;
|
||||
}
|
||||
|
||||
public void setPresentationRequirements(PresentationRequirements presentationRequirements) {
|
||||
this.presentationRequirements = presentationRequirements;
|
||||
}
|
||||
|
||||
public PresentationRequirements getPresentationRequirements() {
|
||||
return presentationRequirements;
|
||||
}
|
||||
|
||||
public void setUserSessionRequirements(UserSessionRequirements userSessionRequirements) {
|
||||
this.userSessionRequirements = userSessionRequirements;
|
||||
}
|
||||
|
||||
public UserSessionRequirements getUserSessionRequirements() {
|
||||
return userSessionRequirements;
|
||||
}
|
||||
|
||||
public void setUserData(UserData userData) {
|
||||
this.userData = userData;
|
||||
}
|
||||
|
||||
public UserData getUserData() {
|
||||
return userData;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
if (userData != null) {
|
||||
codeLength += userData.encode(os);
|
||||
}
|
||||
|
||||
if (userSessionRequirements != null) {
|
||||
codeLength += userSessionRequirements.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 9
|
||||
os.write(0x89);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (presentationRequirements != null) {
|
||||
codeLength += presentationRequirements.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 8
|
||||
os.write(0x88);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (presentationContextDefinitionResultList != null) {
|
||||
codeLength += presentationContextDefinitionResultList.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 5
|
||||
os.write(0xA5);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (respondingPresentationSelector != null) {
|
||||
codeLength += respondingPresentationSelector.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 3
|
||||
os.write(0x83);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (protocolVersion != null) {
|
||||
codeLength += protocolVersion.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
|
||||
os.write(0x80);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
codeLength += totalLength;
|
||||
|
||||
if (totalLength == 0) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
|
||||
protocolVersion = new ProtocolVersion();
|
||||
subCodeLength += protocolVersion.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 3)) {
|
||||
respondingPresentationSelector = new RespondingPresentationSelector();
|
||||
subCodeLength += respondingPresentationSelector.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 5)) {
|
||||
presentationContextDefinitionResultList = new PresentationContextDefinitionResultList();
|
||||
subCodeLength += presentationContextDefinitionResultList.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 8)) {
|
||||
presentationRequirements = new PresentationRequirements();
|
||||
subCodeLength += presentationRequirements.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 9)) {
|
||||
userSessionRequirements = new UserSessionRequirements();
|
||||
subCodeLength += userSessionRequirements.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
userData = new UserData();
|
||||
int choiceDecodeLength = userData.decode(is, berTag);
|
||||
subCodeLength += choiceDecodeLength;
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
throw new IOException("Unexpected end of sequence, length tag: " + totalLength
|
||||
+ ", actual sequence length: " + subCodeLength);
|
||||
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("SEQUENCE{");
|
||||
boolean firstSelectedElement = true;
|
||||
if (protocolVersion != null) {
|
||||
sb.append("protocolVersion: ").append(protocolVersion);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (respondingPresentationSelector != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("respondingPresentationSelector: ").append(respondingPresentationSelector);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (presentationContextDefinitionResultList != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("presentationContextDefinitionResultList: ").append(presentationContextDefinitionResultList);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (presentationRequirements != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("presentationRequirements: ").append(presentationRequirements);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (userSessionRequirements != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("userSessionRequirements: ").append(userSessionRequirements);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (userData != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("userData: ").append(userData);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17);
|
||||
|
||||
public byte[] code = null;
|
||||
private ModeSelector modeSelector = null;
|
||||
private NormalModeParameters normalModeParameters = null;
|
||||
|
||||
public CPAPPDU() {
|
||||
}
|
||||
|
||||
public CPAPPDU(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setModeSelector(ModeSelector modeSelector) {
|
||||
this.modeSelector = modeSelector;
|
||||
}
|
||||
|
||||
public ModeSelector getModeSelector() {
|
||||
return modeSelector;
|
||||
}
|
||||
|
||||
public void setNormalModeParameters(NormalModeParameters normalModeParameters) {
|
||||
this.normalModeParameters = normalModeParameters;
|
||||
}
|
||||
|
||||
public NormalModeParameters getNormalModeParameters() {
|
||||
return normalModeParameters;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
if (normalModeParameters != null) {
|
||||
codeLength += normalModeParameters.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
|
||||
os.write(0xA2);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
codeLength += modeSelector.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
|
||||
os.write(0xA0);
|
||||
codeLength += 1;
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
while (subCodeLength < totalLength) {
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) {
|
||||
modeSelector = new ModeSelector();
|
||||
subCodeLength += modeSelector.decode(is, false);
|
||||
}
|
||||
else if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) {
|
||||
normalModeParameters = new NormalModeParameters();
|
||||
subCodeLength += normalModeParameters.decode(is, false);
|
||||
}
|
||||
}
|
||||
if (subCodeLength != totalLength) {
|
||||
throw new IOException("Length of set does not match length tag, length tag: " + totalLength
|
||||
+ ", actual set length: " + subCodeLength);
|
||||
|
||||
}
|
||||
codeLength += subCodeLength;
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("SEQUENCE{");
|
||||
sb.append("modeSelector: ").append(modeSelector);
|
||||
|
||||
if (normalModeParameters != null) {
|
||||
sb.append(", ");
|
||||
sb.append("normalModeParameters: ").append(normalModeParameters);
|
||||
}
|
||||
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,482 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
|
||||
public class CPType {
|
||||
|
||||
public static class NormalModeParameters {
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
|
||||
|
||||
public byte[] code = null;
|
||||
private ProtocolVersion protocolVersion = null;
|
||||
private CallingPresentationSelector callingPresentationSelector = null;
|
||||
private CalledPresentationSelector calledPresentationSelector = null;
|
||||
private PresentationContextDefinitionList presentationContextDefinitionList = null;
|
||||
private DefaultContextName defaultContextName = null;
|
||||
private PresentationRequirements presentationRequirements = null;
|
||||
private UserSessionRequirements userSessionRequirements = null;
|
||||
private UserData userData = null;
|
||||
|
||||
public NormalModeParameters() {
|
||||
}
|
||||
|
||||
public NormalModeParameters(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setProtocolVersion(ProtocolVersion protocolVersion) {
|
||||
this.protocolVersion = protocolVersion;
|
||||
}
|
||||
|
||||
public ProtocolVersion getProtocolVersion() {
|
||||
return protocolVersion;
|
||||
}
|
||||
|
||||
public void setCallingPresentationSelector(CallingPresentationSelector callingPresentationSelector) {
|
||||
this.callingPresentationSelector = callingPresentationSelector;
|
||||
}
|
||||
|
||||
public CallingPresentationSelector getCallingPresentationSelector() {
|
||||
return callingPresentationSelector;
|
||||
}
|
||||
|
||||
public void setCalledPresentationSelector(CalledPresentationSelector calledPresentationSelector) {
|
||||
this.calledPresentationSelector = calledPresentationSelector;
|
||||
}
|
||||
|
||||
public CalledPresentationSelector getCalledPresentationSelector() {
|
||||
return calledPresentationSelector;
|
||||
}
|
||||
|
||||
public void setPresentationContextDefinitionList(
|
||||
PresentationContextDefinitionList presentationContextDefinitionList) {
|
||||
this.presentationContextDefinitionList = presentationContextDefinitionList;
|
||||
}
|
||||
|
||||
public PresentationContextDefinitionList getPresentationContextDefinitionList() {
|
||||
return presentationContextDefinitionList;
|
||||
}
|
||||
|
||||
public void setDefaultContextName(DefaultContextName defaultContextName) {
|
||||
this.defaultContextName = defaultContextName;
|
||||
}
|
||||
|
||||
public DefaultContextName getDefaultContextName() {
|
||||
return defaultContextName;
|
||||
}
|
||||
|
||||
public void setPresentationRequirements(PresentationRequirements presentationRequirements) {
|
||||
this.presentationRequirements = presentationRequirements;
|
||||
}
|
||||
|
||||
public PresentationRequirements getPresentationRequirements() {
|
||||
return presentationRequirements;
|
||||
}
|
||||
|
||||
public void setUserSessionRequirements(UserSessionRequirements userSessionRequirements) {
|
||||
this.userSessionRequirements = userSessionRequirements;
|
||||
}
|
||||
|
||||
public UserSessionRequirements getUserSessionRequirements() {
|
||||
return userSessionRequirements;
|
||||
}
|
||||
|
||||
public void setUserData(UserData userData) {
|
||||
this.userData = userData;
|
||||
}
|
||||
|
||||
public UserData getUserData() {
|
||||
return userData;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
if (userData != null) {
|
||||
codeLength += userData.encode(os);
|
||||
}
|
||||
|
||||
if (userSessionRequirements != null) {
|
||||
codeLength += userSessionRequirements.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 9
|
||||
os.write(0x89);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (presentationRequirements != null) {
|
||||
codeLength += presentationRequirements.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 8
|
||||
os.write(0x88);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (defaultContextName != null) {
|
||||
codeLength += defaultContextName.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 6
|
||||
os.write(0xA6);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (presentationContextDefinitionList != null) {
|
||||
codeLength += presentationContextDefinitionList.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 4
|
||||
os.write(0xA4);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (calledPresentationSelector != null) {
|
||||
codeLength += calledPresentationSelector.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
|
||||
os.write(0x82);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (callingPresentationSelector != null) {
|
||||
codeLength += callingPresentationSelector.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
|
||||
os.write(0x81);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
if (protocolVersion != null) {
|
||||
codeLength += protocolVersion.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
|
||||
os.write(0x80);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
codeLength += totalLength;
|
||||
|
||||
if (totalLength == 0) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
|
||||
protocolVersion = new ProtocolVersion();
|
||||
subCodeLength += protocolVersion.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) {
|
||||
callingPresentationSelector = new CallingPresentationSelector();
|
||||
subCodeLength += callingPresentationSelector.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) {
|
||||
calledPresentationSelector = new CalledPresentationSelector();
|
||||
subCodeLength += calledPresentationSelector.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 4)) {
|
||||
presentationContextDefinitionList = new PresentationContextDefinitionList();
|
||||
subCodeLength += presentationContextDefinitionList.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 6)) {
|
||||
defaultContextName = new DefaultContextName();
|
||||
subCodeLength += defaultContextName.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 8)) {
|
||||
presentationRequirements = new PresentationRequirements();
|
||||
subCodeLength += presentationRequirements.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 9)) {
|
||||
userSessionRequirements = new UserSessionRequirements();
|
||||
subCodeLength += userSessionRequirements.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
userData = new UserData();
|
||||
int choiceDecodeLength = userData.decode(is, berTag);
|
||||
subCodeLength += choiceDecodeLength;
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
throw new IOException("Unexpected end of sequence, length tag: " + totalLength
|
||||
+ ", actual sequence length: " + subCodeLength);
|
||||
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("SEQUENCE{");
|
||||
boolean firstSelectedElement = true;
|
||||
if (protocolVersion != null) {
|
||||
sb.append("protocolVersion: ").append(protocolVersion);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (callingPresentationSelector != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("callingPresentationSelector: ").append(callingPresentationSelector);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (calledPresentationSelector != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("calledPresentationSelector: ").append(calledPresentationSelector);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (presentationContextDefinitionList != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("presentationContextDefinitionList: ").append(presentationContextDefinitionList);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (defaultContextName != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("defaultContextName: ").append(defaultContextName);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (presentationRequirements != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("presentationRequirements: ").append(presentationRequirements);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (userSessionRequirements != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("userSessionRequirements: ").append(userSessionRequirements);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (userData != null) {
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("userData: ").append(userData);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17);
|
||||
|
||||
public byte[] code = null;
|
||||
private ModeSelector modeSelector = null;
|
||||
private NormalModeParameters normalModeParameters = null;
|
||||
|
||||
public CPType() {
|
||||
}
|
||||
|
||||
public CPType(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setModeSelector(ModeSelector modeSelector) {
|
||||
this.modeSelector = modeSelector;
|
||||
}
|
||||
|
||||
public ModeSelector getModeSelector() {
|
||||
return modeSelector;
|
||||
}
|
||||
|
||||
public void setNormalModeParameters(NormalModeParameters normalModeParameters) {
|
||||
this.normalModeParameters = normalModeParameters;
|
||||
}
|
||||
|
||||
public NormalModeParameters getNormalModeParameters() {
|
||||
return normalModeParameters;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
if (normalModeParameters != null) {
|
||||
codeLength += normalModeParameters.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 2
|
||||
os.write(0xA2);
|
||||
codeLength += 1;
|
||||
}
|
||||
|
||||
codeLength += modeSelector.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
|
||||
os.write(0xA0);
|
||||
codeLength += 1;
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
while (subCodeLength < totalLength) {
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) {
|
||||
modeSelector = new ModeSelector();
|
||||
subCodeLength += modeSelector.decode(is, false);
|
||||
}
|
||||
else if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 2)) {
|
||||
normalModeParameters = new NormalModeParameters();
|
||||
subCodeLength += normalModeParameters.decode(is, false);
|
||||
}
|
||||
}
|
||||
if (subCodeLength != totalLength) {
|
||||
throw new IOException("Length of set does not match length tag, length tag: " + totalLength
|
||||
+ ", actual set length: " + subCodeLength);
|
||||
|
||||
}
|
||||
codeLength += subCodeLength;
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("SEQUENCE{");
|
||||
sb.append("modeSelector: ").append(modeSelector);
|
||||
|
||||
if (normalModeParameters != null) {
|
||||
sb.append(", ");
|
||||
sb.append("normalModeParameters: ").append(normalModeParameters);
|
||||
}
|
||||
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
public class CalledPresentationSelector extends PresentationSelector {
|
||||
|
||||
public CalledPresentationSelector() {
|
||||
}
|
||||
|
||||
public CalledPresentationSelector(byte[] value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
public class CallingPresentationSelector extends PresentationSelector {
|
||||
|
||||
public CallingPresentationSelector() {
|
||||
}
|
||||
|
||||
public CallingPresentationSelector(byte[] value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,387 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
|
||||
public class ContextList {
|
||||
|
||||
public static class SEQUENCE {
|
||||
|
||||
public static class TransferSyntaxNameList {
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
|
||||
public byte[] code = null;
|
||||
private List<TransferSyntaxName> seqOf = null;
|
||||
|
||||
public TransferSyntaxNameList() {
|
||||
seqOf = new ArrayList<>();
|
||||
}
|
||||
|
||||
public TransferSyntaxNameList(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public List<TransferSyntaxName> getTransferSyntaxName() {
|
||||
if (seqOf == null) {
|
||||
seqOf = new ArrayList<>();
|
||||
}
|
||||
return seqOf;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
for (int i = (seqOf.size() - 1); i >= 0; i--) {
|
||||
codeLength += seqOf.get(i).encode(os, true);
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
int totalLength = length.val;
|
||||
|
||||
while (subCodeLength < totalLength) {
|
||||
TransferSyntaxName element = new TransferSyntaxName();
|
||||
subCodeLength += element.decode(is, true);
|
||||
seqOf.add(element);
|
||||
}
|
||||
if (subCodeLength != totalLength) {
|
||||
throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength
|
||||
+ " but has " + subCodeLength);
|
||||
|
||||
}
|
||||
codeLength += subCodeLength;
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("SEQUENCE OF{");
|
||||
|
||||
if (seqOf == null) {
|
||||
sb.append("null");
|
||||
}
|
||||
else {
|
||||
Iterator<TransferSyntaxName> it = seqOf.iterator();
|
||||
if (it.hasNext()) {
|
||||
sb.append(it.next());
|
||||
while (it.hasNext()) {
|
||||
sb.append(", ").append(it.next());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sb.append("}");
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
|
||||
|
||||
public byte[] code = null;
|
||||
private PresentationContextIdentifier presentationContextIdentifier = null;
|
||||
private AbstractSyntaxName abstractSyntaxName = null;
|
||||
private TransferSyntaxNameList transferSyntaxNameList = null;
|
||||
|
||||
public SEQUENCE() {
|
||||
}
|
||||
|
||||
public SEQUENCE(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setPresentationContextIdentifier(PresentationContextIdentifier presentationContextIdentifier) {
|
||||
this.presentationContextIdentifier = presentationContextIdentifier;
|
||||
}
|
||||
|
||||
public PresentationContextIdentifier getPresentationContextIdentifier() {
|
||||
return presentationContextIdentifier;
|
||||
}
|
||||
|
||||
public void setAbstractSyntaxName(AbstractSyntaxName abstractSyntaxName) {
|
||||
this.abstractSyntaxName = abstractSyntaxName;
|
||||
}
|
||||
|
||||
public AbstractSyntaxName getAbstractSyntaxName() {
|
||||
return abstractSyntaxName;
|
||||
}
|
||||
|
||||
public void setTransferSyntaxNameList(TransferSyntaxNameList transferSyntaxNameList) {
|
||||
this.transferSyntaxNameList = transferSyntaxNameList;
|
||||
}
|
||||
|
||||
public TransferSyntaxNameList getTransferSyntaxNameList() {
|
||||
return transferSyntaxNameList;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
codeLength += transferSyntaxNameList.encode(os, true);
|
||||
|
||||
codeLength += abstractSyntaxName.encode(os, true);
|
||||
|
||||
codeLength += presentationContextIdentifier.encode(os, true);
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
codeLength += totalLength;
|
||||
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerInteger.tag)) {
|
||||
presentationContextIdentifier = new PresentationContextIdentifier();
|
||||
subCodeLength += presentationContextIdentifier.decode(is, false);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
else {
|
||||
throw new IOException("Tag does not match the mandatory sequence element tag.");
|
||||
}
|
||||
|
||||
if (berTag.equals(BerObjectIdentifier.tag)) {
|
||||
abstractSyntaxName = new AbstractSyntaxName();
|
||||
subCodeLength += abstractSyntaxName.decode(is, false);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
else {
|
||||
throw new IOException("Tag does not match the mandatory sequence element tag.");
|
||||
}
|
||||
|
||||
if (berTag.equals(TransferSyntaxNameList.tag)) {
|
||||
transferSyntaxNameList = new TransferSyntaxNameList();
|
||||
subCodeLength += transferSyntaxNameList.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
}
|
||||
throw new IOException("Unexpected end of sequence, length tag: " + totalLength
|
||||
+ ", actual sequence length: " + subCodeLength);
|
||||
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("SEQUENCE{");
|
||||
sb.append("presentationContextIdentifier: ").append(presentationContextIdentifier);
|
||||
|
||||
sb.append(", ");
|
||||
sb.append("abstractSyntaxName: ").append(abstractSyntaxName);
|
||||
|
||||
sb.append(", ");
|
||||
sb.append("transferSyntaxNameList: ").append(transferSyntaxNameList);
|
||||
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
|
||||
public byte[] code = null;
|
||||
private List<SEQUENCE> seqOf = null;
|
||||
|
||||
public ContextList() {
|
||||
seqOf = new ArrayList<>();
|
||||
}
|
||||
|
||||
public ContextList(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public List<SEQUENCE> getSEQUENCE() {
|
||||
if (seqOf == null) {
|
||||
seqOf = new ArrayList<>();
|
||||
}
|
||||
return seqOf;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
for (int i = (seqOf.size() - 1); i >= 0; i--) {
|
||||
codeLength += seqOf.get(i).encode(os, true);
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
int totalLength = length.val;
|
||||
|
||||
while (subCodeLength < totalLength) {
|
||||
SEQUENCE element = new SEQUENCE();
|
||||
subCodeLength += element.decode(is, true);
|
||||
seqOf.add(element);
|
||||
}
|
||||
if (subCodeLength != totalLength) {
|
||||
throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has "
|
||||
+ subCodeLength);
|
||||
|
||||
}
|
||||
codeLength += subCodeLength;
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("SEQUENCE OF{");
|
||||
|
||||
if (seqOf == null) {
|
||||
sb.append("null");
|
||||
}
|
||||
else {
|
||||
Iterator<SEQUENCE> it = seqOf.iterator();
|
||||
if (it.hasNext()) {
|
||||
sb.append(it.next());
|
||||
while (it.hasNext()) {
|
||||
sb.append(", ").append(it.next());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sb.append("}");
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,141 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
|
||||
public class DefaultContextName {
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
|
||||
|
||||
public byte[] code = null;
|
||||
private AbstractSyntaxName abstractSyntaxName = null;
|
||||
private TransferSyntaxName transferSyntaxName = null;
|
||||
|
||||
public DefaultContextName() {
|
||||
}
|
||||
|
||||
public DefaultContextName(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setAbstractSyntaxName(AbstractSyntaxName abstractSyntaxName) {
|
||||
this.abstractSyntaxName = abstractSyntaxName;
|
||||
}
|
||||
|
||||
public AbstractSyntaxName getAbstractSyntaxName() {
|
||||
return abstractSyntaxName;
|
||||
}
|
||||
|
||||
public void setTransferSyntaxName(TransferSyntaxName transferSyntaxName) {
|
||||
this.transferSyntaxName = transferSyntaxName;
|
||||
}
|
||||
|
||||
public TransferSyntaxName getTransferSyntaxName() {
|
||||
return transferSyntaxName;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
codeLength += transferSyntaxName.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
|
||||
os.write(0x81);
|
||||
codeLength += 1;
|
||||
|
||||
codeLength += abstractSyntaxName.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
|
||||
os.write(0x80);
|
||||
codeLength += 1;
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
codeLength += totalLength;
|
||||
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
|
||||
abstractSyntaxName = new AbstractSyntaxName();
|
||||
subCodeLength += abstractSyntaxName.decode(is, false);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
else {
|
||||
throw new IOException("Tag does not match the mandatory sequence element tag.");
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) {
|
||||
transferSyntaxName = new TransferSyntaxName();
|
||||
subCodeLength += transferSyntaxName.decode(is, false);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
}
|
||||
throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: "
|
||||
+ subCodeLength);
|
||||
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("SEQUENCE{");
|
||||
sb.append("abstractSyntaxName: ").append(abstractSyntaxName);
|
||||
|
||||
sb.append(", ");
|
||||
sb.append("transferSyntaxName: ").append(transferSyntaxName);
|
||||
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
|
||||
public class FullyEncodedData {
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
|
||||
public byte[] code = null;
|
||||
private List<PDVList> seqOf = null;
|
||||
|
||||
public FullyEncodedData() {
|
||||
seqOf = new ArrayList<>();
|
||||
}
|
||||
|
||||
public FullyEncodedData(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public List<PDVList> getPDVList() {
|
||||
if (seqOf == null) {
|
||||
seqOf = new ArrayList<>();
|
||||
}
|
||||
return seqOf;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
for (int i = (seqOf.size() - 1); i >= 0; i--) {
|
||||
codeLength += seqOf.get(i).encode(os, true);
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
int totalLength = length.val;
|
||||
|
||||
while (subCodeLength < totalLength) {
|
||||
PDVList element = new PDVList();
|
||||
subCodeLength += element.decode(is, true);
|
||||
seqOf.add(element);
|
||||
}
|
||||
if (subCodeLength != totalLength) {
|
||||
throw new IOException("Decoded SequenceOf or SetOf has wrong length. Expected " + totalLength + " but has "
|
||||
+ subCodeLength);
|
||||
|
||||
}
|
||||
codeLength += subCodeLength;
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("SEQUENCE OF{");
|
||||
|
||||
if (seqOf == null) {
|
||||
sb.append("null");
|
||||
}
|
||||
else {
|
||||
Iterator<PDVList> it = seqOf.iterator();
|
||||
if (it.hasNext()) {
|
||||
sb.append(it.next());
|
||||
while (it.hasNext()) {
|
||||
sb.append(", ").append(it.next());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sb.append("}");
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
|
||||
public class ModeSelector {
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 17);
|
||||
|
||||
public byte[] code = null;
|
||||
private BerInteger modeValue = null;
|
||||
|
||||
public ModeSelector() {
|
||||
}
|
||||
|
||||
public ModeSelector(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setModeValue(BerInteger modeValue) {
|
||||
this.modeValue = modeValue;
|
||||
}
|
||||
|
||||
public BerInteger getModeValue() {
|
||||
return modeValue;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
codeLength += modeValue.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
|
||||
os.write(0x80);
|
||||
codeLength += 1;
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
while (subCodeLength < totalLength) {
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
|
||||
modeValue = new BerInteger();
|
||||
subCodeLength += modeValue.decode(is, false);
|
||||
}
|
||||
}
|
||||
if (subCodeLength != totalLength) {
|
||||
throw new IOException("Length of set does not match length tag, length tag: " + totalLength
|
||||
+ ", actual set length: " + subCodeLength);
|
||||
|
||||
}
|
||||
codeLength += subCodeLength;
|
||||
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("SEQUENCE{");
|
||||
sb.append("modeValue: ").append(modeValue);
|
||||
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,310 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.openmuc.jasn1.ber.BerByteArrayOutputStream;
|
||||
import org.openmuc.jasn1.ber.BerLength;
|
||||
import org.openmuc.jasn1.ber.BerTag;
|
||||
import org.openmuc.jasn1.ber.types.BerAny;
|
||||
import org.openmuc.jasn1.ber.types.BerBitString;
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
import org.openmuc.jasn1.ber.types.BerObjectIdentifier;
|
||||
import org.openmuc.jasn1.ber.types.BerOctetString;
|
||||
|
||||
public class PDVList {
|
||||
|
||||
public static class PresentationDataValues {
|
||||
|
||||
public byte[] code = null;
|
||||
private BerAny singleASN1Type = null;
|
||||
private BerOctetString octetAligned = null;
|
||||
private BerBitString arbitrary = null;
|
||||
|
||||
public PresentationDataValues() {
|
||||
}
|
||||
|
||||
public PresentationDataValues(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setSingleASN1Type(BerAny singleASN1Type) {
|
||||
this.singleASN1Type = singleASN1Type;
|
||||
}
|
||||
|
||||
public BerAny getSingleASN1Type() {
|
||||
return singleASN1Type;
|
||||
}
|
||||
|
||||
public void setOctetAligned(BerOctetString octetAligned) {
|
||||
this.octetAligned = octetAligned;
|
||||
}
|
||||
|
||||
public BerOctetString getOctetAligned() {
|
||||
return octetAligned;
|
||||
}
|
||||
|
||||
public void setArbitrary(BerBitString arbitrary) {
|
||||
this.arbitrary = arbitrary;
|
||||
}
|
||||
|
||||
public BerBitString getArbitrary() {
|
||||
return arbitrary;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
int sublength;
|
||||
|
||||
if (arbitrary != null) {
|
||||
codeLength += arbitrary.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 2
|
||||
os.write(0x82);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (octetAligned != null) {
|
||||
codeLength += octetAligned.encode(os, false);
|
||||
// write tag: CONTEXT_CLASS, PRIMITIVE, 1
|
||||
os.write(0x81);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (singleASN1Type != null) {
|
||||
sublength = singleASN1Type.encode(os);
|
||||
codeLength += sublength;
|
||||
codeLength += BerLength.encodeLength(os, sublength);
|
||||
// write tag: CONTEXT_CLASS, CONSTRUCTED, 0
|
||||
os.write(0xA0);
|
||||
codeLength += 1;
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
throw new IOException("Error encoding CHOICE: No element of CHOICE was selected.");
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, null);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, BerTag berTag) throws IOException {
|
||||
|
||||
int codeLength = 0;
|
||||
BerTag passedTag = berTag;
|
||||
|
||||
if (berTag == null) {
|
||||
berTag = new BerTag();
|
||||
codeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.CONSTRUCTED, 0)) {
|
||||
codeLength += BerLength.skip(is);
|
||||
singleASN1Type = new BerAny();
|
||||
codeLength += singleASN1Type.decode(is, null);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 1)) {
|
||||
octetAligned = new BerOctetString();
|
||||
codeLength += octetAligned.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 2)) {
|
||||
arbitrary = new BerBitString();
|
||||
codeLength += arbitrary.decode(is, false);
|
||||
return codeLength;
|
||||
}
|
||||
|
||||
if (passedTag != null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
throw new IOException("Error decoding CHOICE: Tag " + berTag + " matched to no item.");
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (singleASN1Type != null) {
|
||||
return "CHOICE{singleASN1Type: " + singleASN1Type + "}";
|
||||
}
|
||||
|
||||
if (octetAligned != null) {
|
||||
return "CHOICE{octetAligned: " + octetAligned + "}";
|
||||
}
|
||||
|
||||
if (arbitrary != null) {
|
||||
return "CHOICE{arbitrary: " + arbitrary + "}";
|
||||
}
|
||||
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
|
||||
|
||||
public byte[] code = null;
|
||||
private TransferSyntaxName transferSyntaxName = null;
|
||||
private PresentationContextIdentifier presentationContextIdentifier = null;
|
||||
private PresentationDataValues presentationDataValues = null;
|
||||
|
||||
public PDVList() {
|
||||
}
|
||||
|
||||
public PDVList(byte[] code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setTransferSyntaxName(TransferSyntaxName transferSyntaxName) {
|
||||
this.transferSyntaxName = transferSyntaxName;
|
||||
}
|
||||
|
||||
public TransferSyntaxName getTransferSyntaxName() {
|
||||
return transferSyntaxName;
|
||||
}
|
||||
|
||||
public void setPresentationContextIdentifier(PresentationContextIdentifier presentationContextIdentifier) {
|
||||
this.presentationContextIdentifier = presentationContextIdentifier;
|
||||
}
|
||||
|
||||
public PresentationContextIdentifier getPresentationContextIdentifier() {
|
||||
return presentationContextIdentifier;
|
||||
}
|
||||
|
||||
public void setPresentationDataValues(PresentationDataValues presentationDataValues) {
|
||||
this.presentationDataValues = presentationDataValues;
|
||||
}
|
||||
|
||||
public PresentationDataValues getPresentationDataValues() {
|
||||
return presentationDataValues;
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os) throws IOException {
|
||||
return encode(os, true);
|
||||
}
|
||||
|
||||
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
|
||||
|
||||
if (code != null) {
|
||||
for (int i = code.length - 1; i >= 0; i--) {
|
||||
os.write(code[i]);
|
||||
}
|
||||
if (withTag) {
|
||||
return tag.encode(os) + code.length;
|
||||
}
|
||||
return code.length;
|
||||
}
|
||||
|
||||
int codeLength = 0;
|
||||
codeLength += presentationDataValues.encode(os);
|
||||
|
||||
codeLength += presentationContextIdentifier.encode(os, true);
|
||||
|
||||
if (transferSyntaxName != null) {
|
||||
codeLength += transferSyntaxName.encode(os, true);
|
||||
}
|
||||
|
||||
codeLength += BerLength.encodeLength(os, codeLength);
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.encode(os);
|
||||
}
|
||||
|
||||
return codeLength;
|
||||
|
||||
}
|
||||
|
||||
public int decode(InputStream is) throws IOException {
|
||||
return decode(is, true);
|
||||
}
|
||||
|
||||
public int decode(InputStream is, boolean withTag) throws IOException {
|
||||
int codeLength = 0;
|
||||
int subCodeLength = 0;
|
||||
BerTag berTag = new BerTag();
|
||||
|
||||
if (withTag) {
|
||||
codeLength += tag.decodeAndCheck(is);
|
||||
}
|
||||
|
||||
BerLength length = new BerLength();
|
||||
codeLength += length.decode(is);
|
||||
|
||||
int totalLength = length.val;
|
||||
codeLength += totalLength;
|
||||
|
||||
subCodeLength += berTag.decode(is);
|
||||
if (berTag.equals(BerObjectIdentifier.tag)) {
|
||||
transferSyntaxName = new TransferSyntaxName();
|
||||
subCodeLength += transferSyntaxName.decode(is, false);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
|
||||
if (berTag.equals(BerInteger.tag)) {
|
||||
presentationContextIdentifier = new PresentationContextIdentifier();
|
||||
subCodeLength += presentationContextIdentifier.decode(is, false);
|
||||
subCodeLength += berTag.decode(is);
|
||||
}
|
||||
else {
|
||||
throw new IOException("Tag does not match the mandatory sequence element tag.");
|
||||
}
|
||||
|
||||
presentationDataValues = new PresentationDataValues();
|
||||
subCodeLength += presentationDataValues.decode(is, berTag);
|
||||
if (subCodeLength == totalLength) {
|
||||
return codeLength;
|
||||
}
|
||||
throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: "
|
||||
+ subCodeLength);
|
||||
|
||||
}
|
||||
|
||||
public void encodeAndSave(int encodingSizeGuess) throws IOException {
|
||||
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
|
||||
encode(os, false);
|
||||
code = os.getArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("SEQUENCE{");
|
||||
boolean firstSelectedElement = true;
|
||||
if (transferSyntaxName != null) {
|
||||
sb.append("transferSyntaxName: ").append(transferSyntaxName);
|
||||
firstSelectedElement = false;
|
||||
}
|
||||
|
||||
if (!firstSelectedElement) {
|
||||
sb.append(", ");
|
||||
}
|
||||
sb.append("presentationContextIdentifier: ").append(presentationContextIdentifier);
|
||||
|
||||
sb.append(", ");
|
||||
sb.append("presentationDataValues: ").append(presentationDataValues);
|
||||
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
public class PresentationContextDefinitionList extends ContextList {
|
||||
|
||||
public PresentationContextDefinitionList() {
|
||||
}
|
||||
|
||||
public PresentationContextDefinitionList(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
public class PresentationContextDefinitionResultList extends ResultList {
|
||||
|
||||
public PresentationContextDefinitionResultList() {
|
||||
}
|
||||
|
||||
public PresentationContextDefinitionResultList(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerInteger;
|
||||
|
||||
public class PresentationContextIdentifier extends BerInteger {
|
||||
|
||||
public PresentationContextIdentifier() {
|
||||
}
|
||||
|
||||
public PresentationContextIdentifier(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public PresentationContextIdentifier(BigInteger value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
public PresentationContextIdentifier(long value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerBitString;
|
||||
|
||||
public class PresentationRequirements extends BerBitString {
|
||||
|
||||
public PresentationRequirements() {
|
||||
}
|
||||
|
||||
public PresentationRequirements(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public PresentationRequirements(byte[] value, int numBits) {
|
||||
super(value, numBits);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerOctetString;
|
||||
|
||||
public class PresentationSelector extends BerOctetString {
|
||||
|
||||
public PresentationSelector() {
|
||||
}
|
||||
|
||||
public PresentationSelector(byte[] value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
import org.openmuc.jasn1.ber.types.BerBitString;
|
||||
|
||||
public class ProtocolVersion extends BerBitString {
|
||||
|
||||
public ProtocolVersion() {
|
||||
}
|
||||
|
||||
public ProtocolVersion(byte[] code) {
|
||||
super(code);
|
||||
}
|
||||
|
||||
public ProtocolVersion(byte[] value, int numBits) {
|
||||
super(value, numBits);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* This class file was automatically generated by jASN1 v1.7.2-SNAPSHOT (http://www.openmuc.org)
|
||||
*/
|
||||
|
||||
package org.openmuc.josistack.internal.presentation.asn1;
|
||||
|
||||
public class RespondingPresentationSelector extends PresentationSelector {
|
||||
|
||||
public RespondingPresentationSelector() {
|
||||
}
|
||||
|
||||
public RespondingPresentationSelector(byte[] value) {
|
||||
super(value);
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue