drivers/can_tcp_win32/can_tcp_win32.cpp
author etisserant
Fri, 08 Feb 2008 14:52:48 +0100
changeset 385 fff25f16c923
parent 384 83793fc7ce48
child 631 08b6b903f84a
permissions -rwxr-xr-x
Cleaned DS-401GUI (definitively removed graph) added options to open directly on the right Input or Output page. Little fixes.
355
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     1
/*
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     2
This file is part of CanFestival, a library implementing CanOpen Stack. 
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     3
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     4
Copyright (C): Edouard TISSERANT
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     5
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     6
See COPYING file for copyrights details.
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     7
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     8
This library is free software; you can redistribute it and/or
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
     9
modify it under the terms of the GNU Lesser General Public
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    10
License as published by the Free Software Foundation; either
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    11
version 2.1 of the License, or (at your option) any later version.
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    12
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    13
This library is distributed in the hope that it will be useful,
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    14
but WITHOUT ANY WARRANTY; without even the implied warranty of
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    16
Lesser General Public License for more details.
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    17
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    18
You should have received a copy of the GNU Lesser General Public
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    19
License along with this library; if not, write to the Free Software
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    21
*/
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    22
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    23
#include "Socket.h"
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    24
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    25
#include <iostream>
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    26
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    27
using namespace std;
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    28
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    29
extern "C" {
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    30
#include "can_driver.h"
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    31
}
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    32
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    33
//------------------------------------------------------------------------
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    34
extern "C"
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    35
   UNS8 canReceive_driver(CAN_HANDLE fd0, Message *m)
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    36
   {
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    37
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    38
      string l = reinterpret_cast<SocketClient*>(fd0)->ReceiveLine();
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    39
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    40
      int res = sscanf(l.c_str(),"{0x%3hx,%1hhd,%1hhd,{0x%2hhx,0x%2hhx,0x%2hhx,0x%2hhx,0x%2hhx,0x%2hhx,0x%2hhx,0x%2hhx}}",
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    41
                &m->cob_id,
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    42
                &m->rtr,
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    43
                &m->len,
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    44
                &m->data[0],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    45
                &m->data[1],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    46
                &m->data[2],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    47
                &m->data[3],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    48
                &m->data[4],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    49
                &m->data[5],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    50
                &m->data[6],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    51
                &m->data[7]
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    52
                );
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    53
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    54
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    55
#if defined DEBUG_MSG_CONSOLE_ON
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    56
  printf("in : ");
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    57
  print_message(m);
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    58
#endif
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    59
   
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    60
      return res==11 ? 0 : 1 ;
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    61
   }
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    62
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    63
extern "C"
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    64
   UNS8 canSend_driver(CAN_HANDLE fd0, Message *m)
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    65
   {
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    66
        char s[1024];        
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    67
        sprintf(s,"{0x%3.3x,%1d,%1d,{0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x,0x%2.2x}}",
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    68
                m->cob_id,
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    69
                m->rtr,
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    70
                m->len,
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    71
                m->data[0],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    72
                m->data[1],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    73
                m->data[2],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    74
                m->data[3],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    75
                m->data[4],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    76
                m->data[5],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    77
                m->data[6],
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    78
                m->data[7]
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    79
                );
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    80
    
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    81
        reinterpret_cast<SocketClient*>(fd0)->SendLine(s);
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    82
#if defined DEBUG_MSG_CONSOLE_ON
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    83
  printf("out : ");
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    84
  print_message(m);
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    85
#endif
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    86
        return 0;
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    87
   }
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    88
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    89
extern "C"
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    90
   CAN_HANDLE canOpen_driver(s_BOARD *board)
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    91
   {
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    92
      Socket* s;
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    93
      try {
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    94
        s = new SocketClient(board->busname, 11898);
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    95
    
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    96
        //s.SendLine("GET / HTTP/1.0");
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    97
        //s.SendLine("Host: www.google.com");
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    98
      } 
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
    99
      catch (const char* _s) {
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   100
        cerr << _s << endl;
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   101
        return NULL;
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   102
      } 
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   103
      catch (std::string _s) {
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   104
        cerr << _s << endl;
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   105
        return NULL;
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   106
      } 
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   107
      catch (...) {
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   108
        cerr << "unhandled exception\n";
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   109
        return NULL;
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   110
      }
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   111
      return (CAN_HANDLE) s;
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   112
   }
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   113
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   114
extern "C"
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   115
   int canClose_driver(CAN_HANDLE inst)
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   116
   {
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   117
   delete reinterpret_cast<SocketClient*>(inst);
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   118
   return 1;
12adbd08e10c TCP broadcasting chat server to exchange CAN messages between CanFestival nodes on windows. This let user simulate a CANopen network on windows.
etisserant
parents:
diff changeset
   119
   }
384
83793fc7ce48 added canChangeBaudRate to the driver interface
groke6
parents: 355
diff changeset
   120
extern "C"
83793fc7ce48 added canChangeBaudRate to the driver interface
groke6
parents: 355
diff changeset
   121
	UNS8 canChangeBaudRate_driver( CAN_HANDLE fd, char* baud)
83793fc7ce48 added canChangeBaudRate to the driver interface
groke6
parents: 355
diff changeset
   122
	{
83793fc7ce48 added canChangeBaudRate to the driver interface
groke6
parents: 355
diff changeset
   123
	cerr << "canChangeBaudRate not yet supported by this driver\n";
83793fc7ce48 added canChangeBaudRate to the driver interface
groke6
parents: 355
diff changeset
   124
	return 0;
83793fc7ce48 added canChangeBaudRate to the driver interface
groke6
parents: 355
diff changeset
   125
	}