Exemple #1
0
 public static extern TPCANStatus GetValue(
     [MarshalAs(UnmanagedType.U1)]
     TPCANHandle Channel,
     [MarshalAs(UnmanagedType.U1)]
     TPCANParameter Parameter,
     StringBuilder StringBuffer,
     UInt32 BufferLength);
Exemple #2
0
 public static extern TPCANStatus FilterMessages(
     [MarshalAs(UnmanagedType.U1)]
     TPCANHandle Channel,
     UInt32 FromID,
     UInt32 ToID,
     [MarshalAs(UnmanagedType.U1)]
     TPCANMode Mode);
Exemple #3
0
 public static extern TPCANStatus SetValue(
     [MarshalAs(UnmanagedType.U1)]
     TPCANHandle Channel,
     [MarshalAs(UnmanagedType.U1)]
     TPCANParameter Parameter,
     ref UInt32 NumericBuffer,
     UInt32 BufferLength);
Exemple #4
0
 internal PCANAdapter(PCAN parent, string identification, TPCANHandle handle)
 {
     m_parent         = parent;
     m_identification = identification;
     m_handle         = handle;
     m_onlyChannel    = new PCANChannel(this);
 }
Exemple #5
0
 public static extern TPCANStatus SetValue(
     [MarshalAs(UnmanagedType.U1)]
     TPCANHandle Channel,
     [MarshalAs(UnmanagedType.U1)]
     TPCANParameter Parameter,
     [MarshalAs(UnmanagedType.LPStr, SizeParamIndex = 3)]
     string StringBuffer,
     UInt32 BufferLength);
Exemple #6
0
 internal PCANChannel(PCANAdapter adapter)
 {
     m_parent    = adapter;
     m_mode      = ChannelMode.Extended;
     m_handle    = adapter.Handle;
     m_receivers = new List <IReceiveEntity>();
     m_receivers.Add(m_noQueueReceived);
 }
Exemple #7
0
 public static extern TPCANStatus Initialize(
     [MarshalAs(UnmanagedType.U1)]
     TPCANHandle Channel,
     [MarshalAs(UnmanagedType.U2)]
     TPCANBaudrate Btr0Btr1,
     [MarshalAs(UnmanagedType.U1)]
     TPCANType HwType,
     UInt32 IOPort,
     UInt16 Interrupt);
Exemple #8
0
 public static extern TPCANStatus Uninitialize(
     [MarshalAs(UnmanagedType.U1)]
     TPCANHandle Channel);
Exemple #9
0
 public static extern TPCANStatus InitializeFD(
     [MarshalAs(UnmanagedType.U2)]
     TPCANHandle Channel,
     TPCANBitrateFD BitrateFD);
Exemple #10
0
 public static extern TPCANStatus Reset(
     [MarshalAs(UnmanagedType.U2)]
     TPCANHandle Channel);
Exemple #11
0
 private static extern TPCANStatus ReadFD(
     [MarshalAs(UnmanagedType.U2)]
     TPCANHandle Channel,
     out TPCANMsgFD MessageBuffer,
     IntPtr TimestampBuffer);
Exemple #12
0
 public static extern TPCANStatus Write(
     [MarshalAs(UnmanagedType.U1)]
     TPCANHandle Channel,
     ref TPCANMsg MessageBuffer);
Exemple #13
0
 /// <summary>
 /// Reads a CAN message from the receive queue of a PCAN Channel
 /// </summary>
 /// <param name="Channel">The handle of a PCAN Channel</param>
 /// <param name="MessageBuffer">A TPCANMsg structure buffer to store the CAN message</param>
 /// <returns>A TPCANStatus error code</returns>
 public static TPCANStatus Read(
     TPCANHandle Channel,
     out TPCANMsg MessageBuffer)
 {
     return(Read(Channel, out MessageBuffer, IntPtr.Zero));
 }
Exemple #14
0
 private static extern TPCANStatus Read(
     [MarshalAs(UnmanagedType.U1)]
     TPCANHandle Channel,
     out TPCANMsg MessageBuffer,
     IntPtr bufferPointer);
Exemple #15
0
 public static extern TPCANStatus Read(
     [MarshalAs(UnmanagedType.U1)]
     TPCANHandle Channel,
     out TPCANMsg MessageBuffer,
     out TPCANTimestamp TimestampBuffer);
Exemple #16
0
 public static extern TPCANStatus GetStatus(
     [MarshalAs(UnmanagedType.U1)]
     TPCANHandle Channel);
Exemple #17
0
 /// <summary>
 /// Initializes a PCAN Channel
 /// </summary>
 /// <param name="Channel">The handle of a PCAN Channel</param>
 /// <param name="Btr0Btr1">The speed for the communication (BTR0BTR1 code)</param>
 /// <returns>A TPCANStatus error code</returns>
 public static TPCANStatus Initialize(
     TPCANHandle Channel,
     TPCANBaudrate Btr0Btr1)
 {
     return(Initialize(Channel, Btr0Btr1, (TPCANType)0, 0, 0));
 }
Exemple #18
0
 /// <summary>
 /// Reads a CAN message from the receive queue of a PCAN Channel
 /// </summary>
 /// <param name="Channel">The handle of a PCAN Channel</param>
 /// <param name="MessageBuffer">A TPCANMsg structure buffer to store the CAN message</param>        
 /// <returns>A TPCANStatus error code</returns>
 public static TPCANStatus Read(
     TPCANHandle Channel,
     out TPCANMsg MessageBuffer)
 {
     return Read(Channel, out MessageBuffer, IntPtr.Zero);
 }
Exemple #19
0
 /// <summary>
 /// Initializes a PCAN Channel
 /// </summary>
 /// <param name="Channel">The handle of a PCAN Channel</param>
 /// <param name="Btr0Btr1">The speed for the communication (BTR0BTR1 code)</param>
 /// <returns>A TPCANStatus error code</returns>
 public static TPCANStatus Initialize(
     TPCANHandle Channel,
     TPCANBaudrate Btr0Btr1)
 {
     return Initialize(Channel, Btr0Btr1, (TPCANType)0, 0, 0);
 }