>Yes, this is a valid approach, but not the only possible one.
>Alternatively, you could just get the table with tag/field/format
>and create the encoder/decoder by hand, yourself. This would be
>significantly slower and more error-prone. Moreover, you will not
>gain some advantages provided by the asn.1 compiler automatically.
>For example, you would not be able to obtain the XER (XML) encoding
>from the binary data as a simple by-product of compiling the ASN.1
>specification.
>
>If you could show a part of that table I could give you some tips
>about
>converting that table back into ASN.1 specification.
>
>Although this will only be possible if the format you are trying to
>convert back into ASN.1 domain was initially an ASN.1 one. If not,
>it might not be possible to convert an arbitrary protocol into ASN.1
>while maintaining complete binary compatibility. Without using ECN,
>that is.
Thank you Lev, I am on the right track then, hope to find a free java
encoder then.
This is the table I told you about, please tell me if it is convertable
and what are your tips
SCM-tag
SCM field name
Format
DD-name
DD-XML-tag
remark
TE8.T88
NodeIDOrigin
B2
BCD, CAM 's nodeid for sender of message.
NodeId for SAMIS card issue requests: 1010
TE8.T8A
BatchTypeID
B2
BCD, 0010
TE8.T8F
Options
B2
BCD, CAM Mandatory √ '0000' for Ch-add
TE0.T80
MessageId
B18
BCD, 36 nibbles. A SAMIS-generated number that is unique over all card
issue request messages ever.
TE0.T81
MessageTypeId
B2
BCD, CAM Mandatory √ 0101 for Ch-add
TE0.T82
Options
B2
BCD, CAM Mandatory √ '0002' for Ch-add
TE0.TA3.TA2.T84
CardTypeId
B18
Card Product ID
cardprod
BCD, 36 nibbles
See Table 1 - CardTypeIDs
TE0.TA3.TA2.T87
CardIssuerId
B18
BCD, 36 nibbles 000000000000000000000000000000001010
TE0.TA3.TA2.T9F24
CollectionAddress
B2
BCD, 4 nibbles, this is the four digit code that identifies the User Site.
TE0.TA3.TA2.T9F25
Photo
B
Photo from SAMIS
Like enrphoto
Binary
TE0.TA3.TA2.T9F34
CollectorId
B1..36
UTF-8, max 15 characters, 30bytes
TE0.TA3.TA2.T9F35
Gender
B1
Gender 1- male, 2-female
gender
Formatted as per [DD].
This is gender of cardholder.
TE0.TA3.TA2.T9F36
PlaceOfIssue
B
Place of issue
aissueplc
Optional, Formatted as per [DD]
TE0.TA3.TA4.T81
CardholderId
B1..36
acivilid
This field is used by CMS to identify a cardholder. It will be based on
the 'acivilid'.
TE0.TA3.TA4.T85.T40
UserData.acivilid
B
ID Number (Civil ID/Resident ID)
acivilid
Formatted as per [DD]
TE0.TA3.TA4.T85.T7F4F.T40
UserData.dltype
B
DL1 type Note 9
dltype
Formatted as per [DD]
TE0.TA3.TA4.T85.T7F4F.T41
UserData.dlexph
B
DL1 Expiration (H)
dlexph
BCD-encoded, 7 bytes / 14 nibbles
CCYYMMDDHHMMSS
TE0.TA3.TA4.T85.T7F4F.T9F29
UserData.dlexpg
B
DL1 Expiration (G)
dlexpg
BCD-encoded, 7 bytes / 14 nibbles
CCYYMMDDHHMMSS
TE0.TA3.TA4.T85.T50
UserData.hbirthdat
B
Date of Birth (H) - Note 2
hbirthdat
Formatted as per [DD]
TE0.TA3.TA4.T85.T52
UserData.gbirthdat
B
Date of Birth (G)
gbirthdat
Formatted as per [DD]
TE0.TA3.TA4.T85.T5F53
UserData.dlrestr
B
DL restrictions
dlrestr
Formatted as per [DD]
TE0.TA3.TA4.T85.T5F54
UserData.dlblood
B
Blood Type
dlblood
Formatted as per [DD]
TE0.TA3.TA4.T85.T5F5C
UserData.perphon
B
Phone in PRS
perphon
Formatted as per [DD]
TE0.TA3.TA4.T85.T9F19
UserData.ecivilid
B
Civil ID English
ecivilid
Formatted as per [DD]
TE0.TA3.TA4.T85.T9F1D
UserData.a125name
B
Name 1, 2 and 5 (A)
a125name
Formatted as per [DD]
TE0.TA3.TA4.T85.T9F21
UserData.e125name
B
Name 1, 2 and 5 (E)
e125name
Formatted as per [DD]
TE0.TA3.TA4.T85.T9F36
UserData.collectorgender
B1
Gender 1- male, 2-female
Formatted as per [DD].
CollectorGender
TE0.T84
MessageRR
B2
Issue Reason
issreasn
See separate table.
TE0.T85
Address
B2
BCD, CAM 's nodeid for sender of message.
NodeId for SAMIS card issue requests: 1010
TE0.T86
Priority
B1
Priority
priority
Range 1..100: 1=lowest priority, 50=regular priority, 100=highest
priority (01h-64h)
TE9.T81
NrOfMessages
B4
Binary, 4 bytes Big Endian Integer
Regarding the formats:
B means variable amount of bytes without further restrictions
B/n / (e.g. B2, B7, B18) means /n /bytes.
B1../n /(e.g. B1..36) means variable amount of bytes between 1 and a
maximum of /n/.
BCD means binary coded decimal, where one digit (0..9) is encoded in a 1
single nibble (half byte).