public interface YangDataTreeCodec
YANG has it extension framework which allows vendor / implementation specific operation or extensions. The default CODECs will fail to handle such protocol requests. In such scenarios, the providers can register their specific CODEC's with the YANG codec utility to translate the protocol specific data to abstract YANG data tree, from which it can be translate into the YANG modelled java objects for the provider / driver to operate on the device.
| Modifier and Type | Method and Description |
|---|---|
YdtBuilder |
decodeCompositeProtocolDataToYdt(YangCompositeEncoding protocolData,
Object schemaRegistryForYdt,
YmsOperationType protocolOperation)
When YMS decode composite protocol operation request it uses the
registered decode method to translate the protocol data into a
abstract YANG data tree.
|
YdtBuilder |
decodeProtocolDataToYdt(String protocolData,
Object schemaRegistryForYdt,
YmsOperationType protocolOperation)
When YMS decode simple protocol operation request it uses the
registered decode method to translate the protocol data into a
abstract YANG data tree.
|
YangCompositeEncoding |
encodeYdtToCompositeProtocolFormat(YdtBuilder ydtBuilder)
When the YMS need to encode composite protocol operation request, it
will translate the YANG objects into an abstract YANG data
tree and invoke this registered encode method.
|
String |
encodeYdtToProtocolFormat(YdtBuilder ydtBuilder)
When the YMS need to encode simple protocol operation request,
it will translate the YANG objects into an abstract YANG data tree and
invoke this registered encode method.
|
String encodeYdtToProtocolFormat(YdtBuilder ydtBuilder)
ydtBuilder - Abstract YANG data tree contains the operation
requestYangCompositeEncoding encodeYdtToCompositeProtocolFormat(YdtBuilder ydtBuilder)
The Initial chain of node in the YDT will have the operation type set to NONE to specify it is a resource identifier. The Resource information is maintained as a subtree to the resource identifier node.
ydtBuilder - Abstract YANG data tree contains the operation
requestYdtBuilder decodeProtocolDataToYdt(String protocolData, Object schemaRegistryForYdt, YmsOperationType protocolOperation)
The CODEC implementation are unaware of the schema against which they are performing the codec operation, so YMS will send the schema registry on which the YANG data tree needs to operate, so the code implementation needs to pass this schema registry to the get a YDT builder.
protocolData - input string containing the simple
protocol data which needs to be decodedschemaRegistryForYdt - Schema registry based on which the YANG
data tree will be builtprotocolOperation - protocol operation being performedYdtBuilder decodeCompositeProtocolDataToYdt(YangCompositeEncoding protocolData, Object schemaRegistryForYdt, YmsOperationType protocolOperation)
The CODEC implementation are unaware of the schema against which they are performing the codec operation, so YMS will send the schema registry on which the YANG data tree needs to operate, so the code implementation needs to pass this schema registry to the get a YDT builder.
protocolData - composite input string containing the
protocol data which needs to be decodedschemaRegistryForYdt - Schema registry based on which the YANG
data tree will be builtprotocolOperation - protocol operation being performed