/** * Gets the period of the given status frame. * * @param frame * Frame to get the period of. * @param timeoutMs * Timeout value in ms. If nonzero, function will wait for * config success and report an error if it times out. * If zero, no blocking or checking is performed. * @return Period of the given status frame. */ public int GetStatusFramePeriod(CANifierStatusFrame frame, int timeoutMs) { int period; _ll.GetStatusFramePeriod(frame, out period, timeoutMs); return(period); }
/// <summary> /// Gets the period of the given status frame. /// </summary> /// <param name="frame">Frame to get the period of.</param> /// <param name="timeoutMs">Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.</param> /// <returns>Period of the given status frame.</returns> public int GetStatusFramePeriod(CANifierStatusFrame frame, int timeoutMs) { return(CANifierNative.JNI_GetStatusFramePeriod(m_handle, (int)frame, timeoutMs)); }
/// <summary> /// Sets the period of the given status frame. /// </summary> /// <param name="statusFrame">Frame whose period is to be changed.</param> /// <param name="periodMs">Period in ms for the given frame.</param> /// <param name="timeoutMs">Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.</param> /// <returns>Error Code generated by function. 0 indicates no error.</returns> public ErrorCode SetStatusFramePeriod(CANifierStatusFrame statusFrame, int periodMs, int timeoutMs) { return((ErrorCode)CANifierNative.JNI_SetStatusFramePeriod(m_handle, (int)statusFrame, periodMs, timeoutMs)); }
public ErrorCode GetStatusFramePeriod(CANifierStatusFrame frame, out int periodMs, int timeoutMs) { int fullId = (int)((int)_baseArbId | (int)frame); /* build ID */ return(base.GetStatusFramePeriod(fullId, out periodMs, timeoutMs)); }
//----------------------------------------------------------------------------------------------------// /*----- getters and setters that use param request/response. These signals are backed up in flash and will survive a power cycle. ---------*/ /*----- If your application requires changing these values consider using both slots and switch between slot0 <=> slot1. ------------------*/ /*----- If your application requires changing these signals frequently then it makes sense to leverage this API. --------------------------*/ /*----- Getters don't block, so it may require several calls to get the latest value. --------------------------*/ public ErrorCode SetStatusFramePeriod(CANifierStatusFrame frame, uint periodMs, uint timeoutMs = 0) { int fullId = (int)((int)_baseArbId | (int)frame); /* build ID */ return(base.SetStatusFramePeriod(fullId, (int)periodMs, (int)timeoutMs)); }
/** * Sets the period of the given status frame. * * @param statusFrame * Frame whose period is to be changed. * @param periodMs * Period in ms for the given frame. * @param timeoutMs * Timeout value in ms. If nonzero, function will wait for * config success and report an error if it times out. * If zero, no blocking or checking is performed. * @return Error Code generated by function. 0 indicates no error. */ public ErrorCode SetStatusFramePeriod(CANifierStatusFrame statusFrame, int periodMs, int timeoutMs) { ErrorCode retval = _ll.SetStatusFramePeriod(statusFrame, (uint)periodMs, (uint)timeoutMs); return(retval); }
public ErrorCode SetStatusFramePeriod(CANifierStatusFrame statusFrame, uint newPeriodMs, uint timeoutMs = 0) { return((ErrorCode)_ll.SetStatusFramePeriod(statusFrame, newPeriodMs, timeoutMs)); }