[AGENT++] How to add a new row to an agent in the agenpro2 generated source?

변정수 jsbyun at samsung.com
Mon Apr 23 07:14:49 CEST 2007


Hi, all.

After I generated agent source using AgenPro2, I implemented below like that.
( in case of , read-only table )

- Is this way right way?

- Is there any other recomend way to interface with such case?



e.g) the table name is "homeUserInfo"

<MIB>
    homeUserInfoTable   OBJECT-TYPE
        SYNTAX      SEQUENCE  OF  HomeUserInfoEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION "Home User Information table."
        ::=  { ubiSystem  2 }
        
    homeUserInfoEntry   OBJECT-TYPE
        SYNTAX      HomeUserInfoEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION "Home User Info table entry."
        INDEX       {  homeUserIndex  }
        ::=  { homeUserInfoTable 1 }  
        
    HomeUserInfoEntry  ::=  SEQUENCE {
        homeUserIndex  Unsigned32,
        mobileId  DisplayString,
        classification  UbicellUserClass
        }


< src >

// using this function I add a row to agent memory

int agt_AddRow_homeUserInfoTable
(
        int homeUserIndex, \
        char* mobileId, int classification
)
{
        char Index[10];
        MibTableRow * newRow;


        sprintf (Index,"%d", homeUserIndex);
        newRow = ubicellcm_homeUserInfoEntry::instance->add_row(Index);
    agtPrint(PL_DATA , "addrress of newRow = %d , %x \n" , newRow , newRow  );
        ubicellcm_homeUserInfoEntry::instance->set_row\
                (newRow,homeUserIndex, mobileId, classification);

return result;
}




<p align="left">?</p>
<p align="left">?</p>
<div align="left">
<table style="BORDER-COLLAPSE: collapse" cellspacing="0" width="460">
   <tr><td style="BORDER-TOP: black 2px solid; BORDER-BOTTOM: black 2px solid" width="200" height="38">
                  <img src="http://www.sec.co.kr/images/corp/profile/brand/img_logo_01.gif" width="209" height="54" ><p></p>   </td>
   
   <td style="BORDER-TOP: black 2px solid; BORDER-BOTTOM: black 2px solid" width="30" height="38"> </td> <br>
   
   <td style="BORDER-TOP: black 2px solid; BORDER-BOTTOM: black 2px solid" width="250" height="38"><br><p>
       <font face="Verdana" color="#04047e"><b>Jung  Su , Byun</b><br></font>
	   <font face="Verdana" size="1"><br>Senior Engineer<br>Wireless S/W Lab <br>Telecommunicatioin Systems  Division<br>Telecommunicatioin Network<br></font>
	   <font face="Verdana" color="#464695" size="1"><b>SAMSUNG ELECTRONICS CO. LTD</b><br></font>
	   <font face="Verdana" size="1"><b>
	             <br>Tel</b> +82-31-279-4967<b>
		        <br>Cell.</b> +82-16-385-9076<b><br>
			   <br>E-mail</b><br> jsbyun at samsung.com<br></font><br><br></p></td></tr>
    </table></div>>


More information about the AGENTPP mailing list