AG903ライブラリリファレンス
内容インデックスホーム
前へ上へ次へ
AG903_OSPMgrGetCommandCnt 関数

コマンド登録数取得

Syntax
C++
int32_t AG903_OSPMgrGetCommandCnt(AG903_OSPMgrHandle * handle, uint32_t * cnt);
引数 
説明 
AG903_OSPMgrHandle * handle 
[in] OSPハンドル 
uint32_t * cnt 
[out] 登録コマンド数 

エラーコード

返値の詳細 
説明 
正常終了 
-AG903_EINVAL 
パラメータ異常 
-AG903_ENODATA 
コマンドバッファ異常 

コマンドバッファに登録されているコマンド数を返します.

1: int32_t AG903_OSPMgrGetCommandCnt(AG903_OSPMgrHandle *handle, uint32_t *cnt) 2: { 3: int32_t rc = AG903_ENONE; 4: uint8_t ch; 5: OSPCmdDesc *desc; 6: 7: if(NULL == handle) { 8: rc = -AG903_EINVAL; 9: } 10: 11: rc = OSPMgrCheckHandle(handle, &ch); 12: 13: if (rc == AG903_ENONE) { 14: if (cnt == NULL) { 15: 16: rc = -AG903_EINVAL; 17: } 18: } 19: if (rc == AG903_ENONE) { 20: if(NULL == OspChStat[ch].cmdbuf) { 21: 22: rc = -AG903_ENODATA; 23: } 24: } 25: 26: if (rc == AG903_ENONE) { 27: desc = (OSPCmdDesc*)OspChStat[ch].cmdbuf; 28: (*cnt) = desc->CurLen; 29: } 30: 31: return rc; 32: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.