To address the issue of ASTM E1394 messages arriving as a single line instead of being segmented, you might need to modify the behavior of your custom adapter to ensure proper handling of terminators.
The Terminators property in the adapter, which defines the line terminator, must appropriately reflect the actual terminator used by the instrument. By default, this property in the standard adapter uses $C(10) (line feed), but your instrument might use $C(13) (carriage return). You have already set the Terminators property to $C(13). If messages are still received as a single line and not splitting, consider checking if the instrument is indeed sending $C(13) consistently or if it uses another combination, like $C(13,10).
Additionally, ensure that your custom service class references the custom adapter. An example setup could be:
Class Custom.EDI.ASTM.Adapter.TCPAdapter Extends EnsLib.EDI.ASTM.Adapter.TCPAdapter {
/// Use Carriage Return (ASCII 13) as line terminator
Property Terminators As %String [ InitialExpression = {$C(13)} ];
}
Class Custom.EDI.ASTM.Service.TCPService Extends EnsLib.EDI.ASTM.Service.TCPService {
Parameter ADAPTER = "Custom.EDI.ASTM.Adapter.TCPAdapter";
}
Deploy the custom service in your production setup, ensuring that other relevant configuration settings, such as framing and DocType, are correct.
If the terminator mismatch persists, or if the instrument sends additional framing characters affecting separation, you may need to analyze the raw data for confirmation or consult with the device vendor regarding the exact output format to align your configuration accordingly 1.
情報源:
- コメントを投稿するにはログインしてください