Commit 71361f70 authored by Pfeiffer, Götz's avatar Pfeiffer, Götz
Browse files

sci_get_object can be used to get an sci_Object by can-id and port.


This function is used for applications where we need to inspect a CAN object
whose sci_Object handle is not available by it's can-id and port number.
parent d4b77238
......@@ -1675,6 +1675,31 @@ sci_Return sci_get_errcode(sci_Struc *s_struc, sci_Errcode *errcode)
return(SCI_NOTHING);
}
/*----------------------------------------------------*/
/*@IL get sci_Object from port/COB */
/*----------------------------------------------------*/
/*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/* export */
/*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
/*@EX(3)*/
sci_Return sci_get_object(sci_Struc *s_struc, sci_Object **object,
unsigned short port, int id)
/* return sci_Object for a given port and id. */
{
sci_Errcode err;
err= check_port(port);
if (err!=SCI_NO_ERR)
return(SCI_ERR(err));
err= check_id(id);
if (err!=SCI_NO_ERR)
return(SCI_ERR(err));
*object= (*(sci_obj_list[port]))[id];
return SCI_NOTHING;
}
/*----------------------------------------------------*/
/*@IL get private user part */
/*----------------------------------------------------*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment