SNMP reading OBJECT IDENTIFIER

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SNMP reading OBJECT IDENTIFIER

ソリューションへジャンプ
1,557件の閲覧回数
kappa74
Contributor IV

Good morning,

I have a problem about SNMP OBJECT IDENTIFIER: I don't understand how reading an object identifier in SNMP.

I need to change the value of sysObjectID which is now .0.0. (this is the default).

The structure to read its value in 1213.c file is:

const RTCSMIB_VALUE MIBVALUE_sysObjectID = {

    RTCSMIB_NODETYPE_OID_PTR,

    NULL

};

The value is a pointer to NULL.

Do you have an example which shows how to change its value (example .1.3.6.1.2.1.1.1 SysDescr)?

Thank you

Best Regards

Mirko

ラベル(1)
0 件の賞賛
返信
1 解決策
1,243件の閲覧回数
kappa74
Contributor IV

Hi thiagow,

I solved in this way.

I defined the node of the my machine

const RTCSMIB_NODE MIBNODE_machine = {

   1,

   NULL,

   (RTCSMIB_NODE_PTR)&MIBNODE_analog_input,

   (RTCSMIB_NODE_PTR)&MIBNODE_board,

   0,

   NULL,

   NULL, 0, NULL, NULL

};

and then in the struct of MIBVALUE_sysObjectID I inserted the pointer to the MIBNODE_machine

const RTCSMIB_VALUE MIBVALUE_sysObjectID = {

    RTCSMIB_NODETYPE_OID_PTR,

    (void _PTR_)(RTCSMIB_VALUE_PTR)&MIBNODE_machine

};

In this way it's working.

Best Regards

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,243件の閲覧回数
thiagow
Contributor III

I have the same problem that you. I need to set a OID VALUE another mib object, but MQX can't. I have been tried using RTCSMIB_NODETYPE_OID_FN too, but I can't know what kind of value I need to set. I believe that MQX have a bug in this case or setting a complete OID value ( ex.:  .1.3.6.1.23.56) in another OID it's not implemented yet. Does anybody can check this?

0 件の賞賛
返信
1,244件の閲覧回数
kappa74
Contributor IV

Hi thiagow,

I solved in this way.

I defined the node of the my machine

const RTCSMIB_NODE MIBNODE_machine = {

   1,

   NULL,

   (RTCSMIB_NODE_PTR)&MIBNODE_analog_input,

   (RTCSMIB_NODE_PTR)&MIBNODE_board,

   0,

   NULL,

   NULL, 0, NULL, NULL

};

and then in the struct of MIBVALUE_sysObjectID I inserted the pointer to the MIBNODE_machine

const RTCSMIB_VALUE MIBVALUE_sysObjectID = {

    RTCSMIB_NODETYPE_OID_PTR,

    (void _PTR_)(RTCSMIB_VALUE_PTR)&MIBNODE_machine

};

In this way it's working.

Best Regards

0 件の賞賛
返信
1,243件の閲覧回数
thiagow
Contributor III

Thank you, I solved my problem with your tip. Best Regards. --- Thiago

0 件の賞賛
返信