- MMS client: MmsConnection_getVariableAccessAttributes support for VMD specific variables
This commit is contained in:
parent
e595cb7b46
commit
c3043290ac
2 changed files with 23 additions and 10 deletions
|
@ -484,7 +484,7 @@ MmsConnection_writeNamedVariableList(MmsConnection self, MmsError* mmsError, boo
|
|||
*
|
||||
* \param self MmsConnection instance to operate on
|
||||
* \param mmsError user provided variable to store error code
|
||||
* \param domainId the domain name of the variable
|
||||
* \param domainId the domain name of the variable or NULL for a VMD specific request
|
||||
* \param itemId name of the variable
|
||||
*
|
||||
* \return Returns a MmsTypeSpecification object or NULL if the request failed.
|
||||
|
|
|
@ -179,22 +179,35 @@ mmsClient_createGetVariableAccessAttributesRequest(
|
|||
|
||||
request->present = GetVariableAccessAttributesRequest_PR_name;
|
||||
|
||||
request->choice.name.present = ObjectName_PR_domainspecific;
|
||||
if (domainId != NULL) {
|
||||
request->choice.name.present = ObjectName_PR_domainspecific;
|
||||
|
||||
request->choice.name.choice.domainspecific.domainId.buf = (uint8_t*) domainId;
|
||||
request->choice.name.choice.domainspecific.domainId.size = strlen(domainId);
|
||||
request->choice.name.choice.domainspecific.itemId.buf = (uint8_t*) itemId;
|
||||
request->choice.name.choice.domainspecific.itemId.size = strlen(itemId);
|
||||
request->choice.name.choice.domainspecific.domainId.buf = (uint8_t*) domainId;
|
||||
request->choice.name.choice.domainspecific.domainId.size = strlen(domainId);
|
||||
request->choice.name.choice.domainspecific.itemId.buf = (uint8_t*) itemId;
|
||||
request->choice.name.choice.domainspecific.itemId.size = strlen(itemId);
|
||||
}
|
||||
else {
|
||||
request->choice.name.present = ObjectName_PR_vmdspecific;
|
||||
request->choice.name.choice.vmdspecific.buf = (uint8_t*) itemId;
|
||||
request->choice.name.choice.vmdspecific.size = strlen(itemId);
|
||||
}
|
||||
|
||||
asn_enc_rval_t rval;
|
||||
|
||||
rval = der_encode(&asn_DEF_MmsPdu, mmsPdu,
|
||||
(asn_app_consume_bytes_f*) mmsClient_write_out, (void*) writeBuffer);
|
||||
|
||||
request->choice.name.choice.domainspecific.domainId.buf = 0;
|
||||
request->choice.name.choice.domainspecific.domainId.size = 0;
|
||||
request->choice.name.choice.domainspecific.itemId.buf = 0;
|
||||
request->choice.name.choice.domainspecific.itemId.size = 0;
|
||||
if (domainId != NULL) {
|
||||
request->choice.name.choice.domainspecific.domainId.buf = 0;
|
||||
request->choice.name.choice.domainspecific.domainId.size = 0;
|
||||
request->choice.name.choice.domainspecific.itemId.buf = 0;
|
||||
request->choice.name.choice.domainspecific.itemId.size = 0;
|
||||
}
|
||||
else {
|
||||
request->choice.name.choice.vmdspecific.buf = 0;
|
||||
request->choice.name.choice.vmdspecific.size = 0;
|
||||
}
|
||||
|
||||
asn_DEF_MmsPdu.free_struct(&asn_DEF_MmsPdu, mmsPdu, 0);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue