# HG changeset patch # User etisserant # Date 1185968883 -7200 # Node ID d635cfc520eeff7d33b0fa4bdb27e910d93a37c9 # Parent d43ebbed895f515a19281d3a8a04b0dd137f4fba Added contribution from Nicolas GRANDEMANGE. DS-401 slave GUI based on wxwidget. diff -r d43ebbed895f -r d635cfc520ee configure --- a/configure Wed Jul 25 18:01:14 2007 +0200 +++ b/configure Wed Aug 01 13:48:03 2007 +0200 @@ -651,6 +651,14 @@ if [ "$SUB_TARGET" = "unix" ]; then MAKEFILES=$MAKEFILES\ +\ examples/DS401_Master/Makefile.in +fi +if [ "$SUB_TARGET" = "unix" ]; then + MAKEFILES=$MAKEFILES\ +\ examples/DS401_Slave_Gui/Makefile.in +fi +if [ "$SUB_TARGET" = "unix" ]; then + MAKEFILES=$MAKEFILES\ \ examples/TestMasterMicroMod/Makefile.in fi diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Master/.cvsignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Master/.cvsignore Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,3 @@ +Makefile +TestMasterMicroMod +DS401_Master diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Master/Makefile.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Master/Makefile.in Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,77 @@ +#! gmake + +# +# Copyright (C) 2006 Laurent Bessard +# +# This file is part of canfestival, a library implementing the canopen +# stack +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +CC = SUB_CC +OPT_CFLAGS = -O2 +CFLAGS = SUB_OPT_CFLAGS +PROG_CFLAGS = SUB_PROG_CFLAGS +EXE_CFLAGS = SUB_EXE_CFLAGS +OS_NAME = SUB_OS_NAME +ARCH_NAME = SUB_ARCH_NAME +PREFIX = SUB_PREFIX +TARGET = SUB_TARGET +CAN_DRIVER = SUB_CAN_DRIVER +TIMERS_DRIVER = SUB_TIMERS_DRIVER + +INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -I../../include/$(TIMERS_DRIVER) + +MASTER_OBJS = TestMaster.o TestMasterMicroMod.o + +OBJS = $(MASTER_OBJS) ../../src/libcanfestival.a ../../drivers/$(TARGET)/libcanfestival_$(TARGET).a + +ifeq ($(TIMERS_DRIVER),timers_xeno) + PROGDEFINES = -DUSE_XENO +endif + +all: DS401_Master + +../../drivers/$(TARGET)/libcanfestival_$(TARGET).a: + $(MAKE) -C ../../drivers/$(TARGET) libcanfestival_$(TARGET).a + + +DS401_Master: TestMaster.c $(OBJS) + $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ $(OBJS) $(EXE_CFLAGS) + + +TestMaster.c: TestMaster.od + $(MAKE) -C ../../objdictgen gnosis + python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c + +%o: %c + $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< + +clean: + rm -f $(MASTER_OBJS) + rm -f DS401_Master + +mrproper: clean + rm -f TestMaster.c + +install: DS401_Master + mkdir -p $(PREFIX)/bin/ + cp $< $(PREFIX)/bin/ + +uninstall: + rm -f $(PREFIX)/bin/DS401_Master + + diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Master/TestMaster.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Master/TestMaster.c Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,566 @@ + +/* File generated by gen_cfile.py. Should not be modified. */ + +#include "TestMaster.h" + +/**************************************************************************/ +/* Declaration of the mapped variables */ +/**************************************************************************/ +UNS8 DO = 0x0; /* Mapped at index 0x2000, subindex 0x00 */ +INTEGER16 AO1 = 0x0; /* Mapped at index 0x2001, subindex 0x00 */ +INTEGER16 AO2 = 0x0; /* Mapped at index 0x2002, subindex 0x00 */ +INTEGER16 AO3 = 0x0; /* Mapped at index 0x2003, subindex 0x00 */ +INTEGER16 AO4 = 0x0; /* Mapped at index 0x2004, subindex 0x00 */ +INTEGER16 AI1 = 0x0; /* Mapped at index 0x2005, subindex 0x00 */ +INTEGER16 AI2 = 0x0; /* Mapped at index 0x2006, subindex 0x00 */ +INTEGER16 AI3 = 0x0; /* Mapped at index 0x2007, subindex 0x00 */ +INTEGER16 AI4 = 0x0; /* Mapped at index 0x2008, subindex 0x00 */ +INTEGER16 AI5 = 0x0; /* Mapped at index 0x2009, subindex 0x00 */ +INTEGER16 AI6 = 0x0; /* Mapped at index 0x200A, subindex 0x00 */ +INTEGER16 AI7 = 0x0; /* Mapped at index 0x200B, subindex 0x00 */ +INTEGER16 AI8 = 0x0; /* Mapped at index 0x200C, subindex 0x00 */ +UNS8 DI1 = 0x0; /* Mapped at index 0x200F, subindex 0x00 */ +UNS8 DI2 = 0x0; /* Mapped at index 0x2010, subindex 0x00 */ +UNS8 DI3 = 0x0; /* Mapped at index 0x2011, subindex 0x00 */ +UNS8 DI4 = 0x0; /* Mapped at index 0x2012, subindex 0x00 */ +UNS8 DI5 = 0x0; /* Mapped at index 0x2013, subindex 0x00 */ +UNS8 DI6 = 0x0; /* Mapped at index 0x2014, subindex 0x00 */ +UNS8 DI7 = 0x0; /* Mapped at index 0x2015, subindex 0x00 */ +UNS8 DI8 = 0x0; /* Mapped at index 0x2016, subindex 0x00 */ + +/**************************************************************************/ +/* Declaration of the value range types */ +/**************************************************************************/ + +UNS32 TestMaster_valueRangeTest (UNS8 typeValue, void * value) +{ + switch (typeValue) { + } + return 0; +} + +/**************************************************************************/ +/* The node id */ +/**************************************************************************/ +/* node_id default value.*/ +UNS8 TestMaster_bDeviceNodeId = 0x01; + +/**************************************************************************/ +/* Array of message processing information */ + +const UNS8 TestMaster_iam_a_slave = 0; + +TIMER_HANDLE TestMaster_heartBeatTimers[1] = {TIMER_NONE,}; + +/* +$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ + + OBJECT DICTIONARY + +$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ +*/ + +/* index 0x1000 : Device Type. */ + UNS32 TestMaster_obj1000 = 0x191; /* 401 */ + subindex TestMaster_Index1000[] = + { + { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1000 } + }; + +/* index 0x1001 : Error Register. */ + UNS8 TestMaster_obj1001 = 0x0; /* 0 */ + subindex TestMaster_Index1001[] = + { + { RO, uint8, sizeof (UNS8), (void*)&TestMaster_obj1001 } + }; + +/* index 0x1005 : SYNC COB ID. */ + UNS32 TestMaster_obj1005 = 0x40000080; /* 1073741952 */ + ODCallback_t TestMaster_Index1005_callbacks[] = + { + NULL, + }; + subindex TestMaster_Index1005[] = + { + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1005 } + }; + +/* index 0x1006 : Communication / Cycle Period. */ + UNS32 TestMaster_obj1006 = 0xC350; /* 50000 */ + ODCallback_t TestMaster_Index1006_callbacks[] = + { + NULL, + }; + subindex TestMaster_Index1006[] = + { + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1006 } + }; + +/* index 0x1016 : Consumer Heartbeat Time. */ + UNS8 TestMaster_highestSubIndex_obj1016 = 1; /* number of subindex - 1*/ + UNS32 TestMaster_obj1016[] = + { + 0x4005DC /* 4195804 */ + }; + subindex TestMaster_Index1016[] = + { + { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1016 }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1016[0] } + }; + +/* index 0x1017 : Producer Heartbeat Time */ + UNS16 TestMaster_obj1017 = 0x0; /* 0 */ + +/* index 0x1018 : Identity. */ + UNS8 TestMaster_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/ + UNS32 TestMaster_obj1018_Vendor_ID = 0x0; /* 0 */ + UNS32 TestMaster_obj1018_Product_Code = 0x0; /* 0 */ + UNS32 TestMaster_obj1018_Revision_Number = 0x0; /* 0 */ + UNS32 TestMaster_obj1018_Serial_Number = 0x0; /* 0 */ + subindex TestMaster_Index1018[] = + { + { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1018 }, + { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Vendor_ID }, + { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Product_Code }, + { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Revision_Number }, + { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Serial_Number } + }; + +/* index 0x1280 : Client SDO 1 Parameter. */ + UNS8 TestMaster_highestSubIndex_obj1280 = 3; /* number of subindex - 1*/ + UNS32 TestMaster_obj1280_COB_ID_Client_to_Server_Transmit_SDO = 0x640; /* 1600 */ + UNS32 TestMaster_obj1280_COB_ID_Server_to_Client_Receive_SDO = 0x5C0; /* 1472 */ + INTEGER32 TestMaster_obj1280_Node_ID_of_the_SDO_Server = 0x40; /* 64 */ + subindex TestMaster_Index1280[] = + { + { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1280 }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1280_COB_ID_Client_to_Server_Transmit_SDO }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1280_COB_ID_Server_to_Client_Receive_SDO }, + { RW, int32, sizeof (INTEGER32), (void*)&TestMaster_obj1280_Node_ID_of_the_SDO_Server } + }; + +/* index 0x1400 : Receive PDO 1 Parameter. */ + UNS8 TestMaster_highestSubIndex_obj1400 = 5; /* number of subindex - 1*/ + UNS32 TestMaster_obj1400_COB_ID_used_by_PDO = 0x1C0; /* 448 */ + UNS8 TestMaster_obj1400_Transmission_Type = 0x1; /* 1 */ + UNS16 TestMaster_obj1400_Inhibit_Time = 0x0; /* 0 */ + UNS8 TestMaster_obj1400_Compatibility_Entry = 0x0; /* 0 */ + UNS16 TestMaster_obj1400_Event_Timer = 0x0; /* 0 */ + subindex TestMaster_Index1400[] = + { + { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1400 }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1400_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1400_Transmission_Type }, + { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1400_Inhibit_Time }, + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1400_Compatibility_Entry }, + { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1400_Event_Timer } + }; + +/* index 0x1401 : Receive PDO 2 Parameter. */ + UNS8 TestMaster_highestSubIndex_obj1401 = 5; /* number of subindex - 1*/ + UNS32 TestMaster_obj1401_COB_ID_used_by_PDO = 0x2C0; /* 704 */ + UNS8 TestMaster_obj1401_Transmission_Type = 0x1; /* 1 */ + UNS16 TestMaster_obj1401_Inhibit_Time = 0x0; /* 0 */ + UNS8 TestMaster_obj1401_Compatibility_Entry = 0x0; /* 0 */ + UNS16 TestMaster_obj1401_Event_Timer = 0x0; /* 0 */ + subindex TestMaster_Index1401[] = + { + { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1401 }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1401_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1401_Transmission_Type }, + { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1401_Inhibit_Time }, + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1401_Compatibility_Entry }, + { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1401_Event_Timer } + }; + +/* index 0x1402 : Receive PDO 3 Parameter. */ + UNS8 TestMaster_highestSubIndex_obj1402 = 5; /* number of subindex - 1*/ + UNS32 TestMaster_obj1402_COB_ID_used_by_PDO = 0x3C0; /* 960 */ + UNS8 TestMaster_obj1402_Transmission_Type = 0x1; /* 1 */ + UNS16 TestMaster_obj1402_Inhibit_Time = 0x0; /* 0 */ + UNS8 TestMaster_obj1402_Compatibility_Entry = 0x0; /* 0 */ + UNS16 TestMaster_obj1402_Event_Timer = 0x0; /* 0 */ + subindex TestMaster_Index1402[] = + { + { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1402 }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1402_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1402_Transmission_Type }, + { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1402_Inhibit_Time }, + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1402_Compatibility_Entry }, + { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1402_Event_Timer } + }; + +/* index 0x1600 : Receive PDO 1 Mapping. */ + UNS8 TestMaster_highestSubIndex_obj1600 = 8; /* number of subindex - 1*/ + UNS32 TestMaster_obj1600[] = + { + 0x200F0001, /* 537853953 */ + 0x20100001, /* 537919489 */ + 0x20110001, /* 537985025 */ + 0x20120001, /* 538050561 */ + 0x20130001, /* 538116097 */ + 0x20140001, /* 538181633 */ + 0x20150001, /* 538247169 */ + 0x20160001 /* 538312705 */ + }; + subindex TestMaster_Index1600[] = + { + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1600 }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[0] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[1] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[2] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[3] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[4] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[5] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[6] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[7] } + }; + +/* index 0x1601 : Receive PDO 2 Mapping. */ + UNS8 TestMaster_highestSubIndex_obj1601 = 4; /* number of subindex - 1*/ + UNS32 TestMaster_obj1601[] = + { + 0x20050010, /* 537198608 */ + 0x20060010, /* 537264144 */ + 0x20070010, /* 537329680 */ + 0x20080010 /* 537395216 */ + }; + subindex TestMaster_Index1601[] = + { + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1601 }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1601[0] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1601[1] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1601[2] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1601[3] } + }; + +/* index 0x1602 : Receive PDO 3 Mapping. */ + UNS8 TestMaster_highestSubIndex_obj1602 = 4; /* number of subindex - 1*/ + UNS32 TestMaster_obj1602[] = + { + 0x20090010, /* 537460752 */ + 0x200A0010, /* 537526288 */ + 0x200B0010, /* 537591824 */ + 0x200C0010 /* 537657360 */ + }; + subindex TestMaster_Index1602[] = + { + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1602 }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1602[0] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1602[1] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1602[2] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1602[3] } + }; + +/* index 0x1800 : Transmit PDO 1 Parameter. */ + UNS8 TestMaster_highestSubIndex_obj1800 = 5; /* number of subindex - 1*/ + UNS32 TestMaster_obj1800_COB_ID_used_by_PDO = 0x240; /* 576 */ + UNS8 TestMaster_obj1800_Transmission_Type = 0x1; /* 1 */ + UNS16 TestMaster_obj1800_Inhibit_Time = 0x0; /* 0 */ + UNS8 TestMaster_obj1800_Compatibility_Entry = 0x0; /* 0 */ + UNS16 TestMaster_obj1800_Event_Timer = 0x0; /* 0 */ + subindex TestMaster_Index1800[] = + { + { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1800 }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1800_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1800_Transmission_Type }, + { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1800_Inhibit_Time }, + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1800_Compatibility_Entry }, + { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1800_Event_Timer } + }; + +/* index 0x1801 : Transmit PDO 2 Parameter. */ + UNS8 TestMaster_highestSubIndex_obj1801 = 5; /* number of subindex - 1*/ + UNS32 TestMaster_obj1801_COB_ID_used_by_PDO = 0x340; /* 832 */ + UNS8 TestMaster_obj1801_Transmission_Type = 0x1; /* 1 */ + UNS16 TestMaster_obj1801_Inhibit_Time = 0x0; /* 0 */ + UNS8 TestMaster_obj1801_Compatibility_Entry = 0x0; /* 0 */ + UNS16 TestMaster_obj1801_Event_Timer = 0x0; /* 0 */ + subindex TestMaster_Index1801[] = + { + { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1801 }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1801_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1801_Transmission_Type }, + { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1801_Inhibit_Time }, + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1801_Compatibility_Entry }, + { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1801_Event_Timer } + }; + +/* index 0x1A00 : Transmit PDO 1 Mapping. */ + UNS8 TestMaster_highestSubIndex_obj1A00 = 1; /* number of subindex - 1*/ + UNS32 TestMaster_obj1A00[] = + { + 0x20000008 /* 536870920 */ + }; + subindex TestMaster_Index1A00[] = + { + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1A00 }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1A00[0] } + }; + +/* index 0x1A01 : Transmit PDO 2 Mapping. */ + UNS8 TestMaster_highestSubIndex_obj1A01 = 4; /* number of subindex - 1*/ + UNS32 TestMaster_obj1A01[] = + { + 0x20010010, /* 536936464 */ + 0x20020010, /* 537002000 */ + 0x20030010, /* 537067536 */ + 0x20040010 /* 537133072 */ + }; + subindex TestMaster_Index1A01[] = + { + { RW, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1A01 }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1A01[0] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1A01[1] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1A01[2] }, + { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1A01[3] } + }; + +/* index 0x2000 : Mapped variable DO */ + subindex TestMaster_Index2000[] = + { + { RW, uint8, sizeof (UNS8), (void*)&DO } + }; + +/* index 0x2001 : Mapped variable AO1 */ + subindex TestMaster_Index2001[] = + { + { RW, int16, sizeof (INTEGER16), (void*)&AO1 } + }; + +/* index 0x2002 : Mapped variable AO2 */ + subindex TestMaster_Index2002[] = + { + { RW, int16, sizeof (INTEGER16), (void*)&AO2 } + }; + +/* index 0x2003 : Mapped variable AO3 */ + subindex TestMaster_Index2003[] = + { + { RW, int16, sizeof (INTEGER16), (void*)&AO3 } + }; + +/* index 0x2004 : Mapped variable AO4 */ + subindex TestMaster_Index2004[] = + { + { RW, int16, sizeof (INTEGER16), (void*)&AO4 } + }; + +/* index 0x2005 : Mapped variable AI1 */ + subindex TestMaster_Index2005[] = + { + { RW, int16, sizeof (INTEGER16), (void*)&AI1 } + }; + +/* index 0x2006 : Mapped variable AI2 */ + subindex TestMaster_Index2006[] = + { + { RW, int16, sizeof (INTEGER16), (void*)&AI2 } + }; + +/* index 0x2007 : Mapped variable AI3 */ + subindex TestMaster_Index2007[] = + { + { RW, int16, sizeof (INTEGER16), (void*)&AI3 } + }; + +/* index 0x2008 : Mapped variable AI4 */ + subindex TestMaster_Index2008[] = + { + { RW, int16, sizeof (INTEGER16), (void*)&AI4 } + }; + +/* index 0x2009 : Mapped variable AI5 */ + subindex TestMaster_Index2009[] = + { + { RW, int16, sizeof (INTEGER16), (void*)&AI5 } + }; + +/* index 0x200A : Mapped variable AI6 */ + subindex TestMaster_Index200A[] = + { + { RW, int16, sizeof (INTEGER16), (void*)&AI6 } + }; + +/* index 0x200B : Mapped variable AI7 */ + subindex TestMaster_Index200B[] = + { + { RW, int16, sizeof (INTEGER16), (void*)&AI7 } + }; + +/* index 0x200C : Mapped variable AI8 */ + subindex TestMaster_Index200C[] = + { + { RW, int16, sizeof (INTEGER16), (void*)&AI8 } + }; + +/* index 0x200F : Mapped variable DI1 */ + subindex TestMaster_Index200F[] = + { + { RW, boolean, sizeof (UNS8), (void*)&DI1 } + }; + +/* index 0x2010 : Mapped variable DI2 */ + subindex TestMaster_Index2010[] = + { + { RW, boolean, sizeof (UNS8), (void*)&DI2 } + }; + +/* index 0x2011 : Mapped variable DI3 */ + subindex TestMaster_Index2011[] = + { + { RW, boolean, sizeof (UNS8), (void*)&DI3 } + }; + +/* index 0x2012 : Mapped variable DI4 */ + subindex TestMaster_Index2012[] = + { + { RW, boolean, sizeof (UNS8), (void*)&DI4 } + }; + +/* index 0x2013 : Mapped variable DI5 */ + subindex TestMaster_Index2013[] = + { + { RW, boolean, sizeof (UNS8), (void*)&DI5 } + }; + +/* index 0x2014 : Mapped variable DI6 */ + subindex TestMaster_Index2014[] = + { + { RW, boolean, sizeof (UNS8), (void*)&DI6 } + }; + +/* index 0x2015 : Mapped variable DI7 */ + subindex TestMaster_Index2015[] = + { + { RW, boolean, sizeof (UNS8), (void*)&DI7 } + }; + +/* index 0x2016 : Mapped variable DI8 */ + subindex TestMaster_Index2016[] = + { + { RW, boolean, sizeof (UNS8), (void*)&DI8 } + }; + +const indextable TestMaster_objdict[] = +{ + { (subindex*)TestMaster_Index1000,sizeof(TestMaster_Index1000)/sizeof(TestMaster_Index1000[0]), 0x1000}, + { (subindex*)TestMaster_Index1001,sizeof(TestMaster_Index1001)/sizeof(TestMaster_Index1001[0]), 0x1001}, + { (subindex*)TestMaster_Index1005,sizeof(TestMaster_Index1005)/sizeof(TestMaster_Index1005[0]), 0x1005}, + { (subindex*)TestMaster_Index1006,sizeof(TestMaster_Index1006)/sizeof(TestMaster_Index1006[0]), 0x1006}, + { (subindex*)TestMaster_Index1016,sizeof(TestMaster_Index1016)/sizeof(TestMaster_Index1016[0]), 0x1016}, + { (subindex*)TestMaster_Index1018,sizeof(TestMaster_Index1018)/sizeof(TestMaster_Index1018[0]), 0x1018}, + { (subindex*)TestMaster_Index1280,sizeof(TestMaster_Index1280)/sizeof(TestMaster_Index1280[0]), 0x1280}, + { (subindex*)TestMaster_Index1400,sizeof(TestMaster_Index1400)/sizeof(TestMaster_Index1400[0]), 0x1400}, + { (subindex*)TestMaster_Index1401,sizeof(TestMaster_Index1401)/sizeof(TestMaster_Index1401[0]), 0x1401}, + { (subindex*)TestMaster_Index1402,sizeof(TestMaster_Index1402)/sizeof(TestMaster_Index1402[0]), 0x1402}, + { (subindex*)TestMaster_Index1600,sizeof(TestMaster_Index1600)/sizeof(TestMaster_Index1600[0]), 0x1600}, + { (subindex*)TestMaster_Index1601,sizeof(TestMaster_Index1601)/sizeof(TestMaster_Index1601[0]), 0x1601}, + { (subindex*)TestMaster_Index1602,sizeof(TestMaster_Index1602)/sizeof(TestMaster_Index1602[0]), 0x1602}, + { (subindex*)TestMaster_Index1800,sizeof(TestMaster_Index1800)/sizeof(TestMaster_Index1800[0]), 0x1800}, + { (subindex*)TestMaster_Index1801,sizeof(TestMaster_Index1801)/sizeof(TestMaster_Index1801[0]), 0x1801}, + { (subindex*)TestMaster_Index1A00,sizeof(TestMaster_Index1A00)/sizeof(TestMaster_Index1A00[0]), 0x1A00}, + { (subindex*)TestMaster_Index1A01,sizeof(TestMaster_Index1A01)/sizeof(TestMaster_Index1A01[0]), 0x1A01}, + { (subindex*)TestMaster_Index2000,sizeof(TestMaster_Index2000)/sizeof(TestMaster_Index2000[0]), 0x2000}, + { (subindex*)TestMaster_Index2001,sizeof(TestMaster_Index2001)/sizeof(TestMaster_Index2001[0]), 0x2001}, + { (subindex*)TestMaster_Index2002,sizeof(TestMaster_Index2002)/sizeof(TestMaster_Index2002[0]), 0x2002}, + { (subindex*)TestMaster_Index2003,sizeof(TestMaster_Index2003)/sizeof(TestMaster_Index2003[0]), 0x2003}, + { (subindex*)TestMaster_Index2004,sizeof(TestMaster_Index2004)/sizeof(TestMaster_Index2004[0]), 0x2004}, + { (subindex*)TestMaster_Index2005,sizeof(TestMaster_Index2005)/sizeof(TestMaster_Index2005[0]), 0x2005}, + { (subindex*)TestMaster_Index2006,sizeof(TestMaster_Index2006)/sizeof(TestMaster_Index2006[0]), 0x2006}, + { (subindex*)TestMaster_Index2007,sizeof(TestMaster_Index2007)/sizeof(TestMaster_Index2007[0]), 0x2007}, + { (subindex*)TestMaster_Index2008,sizeof(TestMaster_Index2008)/sizeof(TestMaster_Index2008[0]), 0x2008}, + { (subindex*)TestMaster_Index2009,sizeof(TestMaster_Index2009)/sizeof(TestMaster_Index2009[0]), 0x2009}, + { (subindex*)TestMaster_Index200A,sizeof(TestMaster_Index200A)/sizeof(TestMaster_Index200A[0]), 0x200A}, + { (subindex*)TestMaster_Index200B,sizeof(TestMaster_Index200B)/sizeof(TestMaster_Index200B[0]), 0x200B}, + { (subindex*)TestMaster_Index200C,sizeof(TestMaster_Index200C)/sizeof(TestMaster_Index200C[0]), 0x200C}, + { (subindex*)TestMaster_Index200F,sizeof(TestMaster_Index200F)/sizeof(TestMaster_Index200F[0]), 0x200F}, + { (subindex*)TestMaster_Index2010,sizeof(TestMaster_Index2010)/sizeof(TestMaster_Index2010[0]), 0x2010}, + { (subindex*)TestMaster_Index2011,sizeof(TestMaster_Index2011)/sizeof(TestMaster_Index2011[0]), 0x2011}, + { (subindex*)TestMaster_Index2012,sizeof(TestMaster_Index2012)/sizeof(TestMaster_Index2012[0]), 0x2012}, + { (subindex*)TestMaster_Index2013,sizeof(TestMaster_Index2013)/sizeof(TestMaster_Index2013[0]), 0x2013}, + { (subindex*)TestMaster_Index2014,sizeof(TestMaster_Index2014)/sizeof(TestMaster_Index2014[0]), 0x2014}, + { (subindex*)TestMaster_Index2015,sizeof(TestMaster_Index2015)/sizeof(TestMaster_Index2015[0]), 0x2015}, + { (subindex*)TestMaster_Index2016,sizeof(TestMaster_Index2016)/sizeof(TestMaster_Index2016[0]), 0x2016}, +}; + +const indextable * TestMaster_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks) +{ + int i; + *callbacks = NULL; + switch(wIndex){ + case 0x1000: i = 0;break; + case 0x1001: i = 1;break; + case 0x1005: i = 2;*callbacks = TestMaster_Index1005_callbacks; break; + case 0x1006: i = 3;*callbacks = TestMaster_Index1006_callbacks; break; + case 0x1016: i = 4;break; + case 0x1018: i = 5;break; + case 0x1280: i = 6;break; + case 0x1400: i = 7;break; + case 0x1401: i = 8;break; + case 0x1402: i = 9;break; + case 0x1600: i = 10;break; + case 0x1601: i = 11;break; + case 0x1602: i = 12;break; + case 0x1800: i = 13;break; + case 0x1801: i = 14;break; + case 0x1A00: i = 15;break; + case 0x1A01: i = 16;break; + case 0x2000: i = 17;break; + case 0x2001: i = 18;break; + case 0x2002: i = 19;break; + case 0x2003: i = 20;break; + case 0x2004: i = 21;break; + case 0x2005: i = 22;break; + case 0x2006: i = 23;break; + case 0x2007: i = 24;break; + case 0x2008: i = 25;break; + case 0x2009: i = 26;break; + case 0x200A: i = 27;break; + case 0x200B: i = 28;break; + case 0x200C: i = 29;break; + case 0x200F: i = 30;break; + case 0x2010: i = 31;break; + case 0x2011: i = 32;break; + case 0x2012: i = 33;break; + case 0x2013: i = 34;break; + case 0x2014: i = 35;break; + case 0x2015: i = 36;break; + case 0x2016: i = 37;break; + default: + *errorCode = OD_NO_SUCH_OBJECT; + return NULL; + } + *errorCode = OD_SUCCESSFUL; + return &TestMaster_objdict[i]; +} + +/* + * To count at which received SYNC a PDO must be sent. + * Even if no pdoTransmit are defined, at least one entry is computed + * for compilations issues. + */ +s_PDO_status TestMaster_PDO_status[2] = {s_PDO_staus_Initializer,s_PDO_staus_Initializer}; + +quick_index TestMaster_firstIndex = { + 0, /* SDO_SVR */ + 6, /* SDO_CLT */ + 7, /* PDO_RCV */ + 10, /* PDO_RCV_MAP */ + 13, /* PDO_TRS */ + 15 /* PDO_TRS_MAP */ +}; + +quick_index TestMaster_lastIndex = { + 0, /* SDO_SVR */ + 6, /* SDO_CLT */ + 9, /* PDO_RCV */ + 12, /* PDO_RCV_MAP */ + 14, /* PDO_TRS */ + 16 /* PDO_TRS_MAP */ +}; + +UNS16 TestMaster_ObjdictSize = sizeof(TestMaster_objdict)/sizeof(TestMaster_objdict[0]); + +CO_Data TestMaster_Data = CANOPEN_NODE_DATA_INITIALIZER(TestMaster); + diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Master/TestMaster.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Master/TestMaster.h Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,37 @@ + +/* File generated by gen_cfile.py. Should not be modified. */ + +#ifndef TESTMASTER_H +#define TESTMASTER_H + +#include "data.h" + +/* Prototypes of function provided by object dictionnary */ +UNS32 TestMaster_valueRangeTest (UNS8 typeValue, void * value); +const indextable * TestMaster_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks); + +/* Master node data struct */ +extern CO_Data TestMaster_Data; +extern UNS8 DO; /* Mapped at index 0x2000, subindex 0x00*/ +extern INTEGER16 AO1; /* Mapped at index 0x2001, subindex 0x00*/ +extern INTEGER16 AO2; /* Mapped at index 0x2002, subindex 0x00*/ +extern INTEGER16 AO3; /* Mapped at index 0x2003, subindex 0x00*/ +extern INTEGER16 AO4; /* Mapped at index 0x2004, subindex 0x00*/ +extern INTEGER16 AI1; /* Mapped at index 0x2005, subindex 0x00*/ +extern INTEGER16 AI2; /* Mapped at index 0x2006, subindex 0x00*/ +extern INTEGER16 AI3; /* Mapped at index 0x2007, subindex 0x00*/ +extern INTEGER16 AI4; /* Mapped at index 0x2008, subindex 0x00*/ +extern INTEGER16 AI5; /* Mapped at index 0x2009, subindex 0x00*/ +extern INTEGER16 AI6; /* Mapped at index 0x200A, subindex 0x00*/ +extern INTEGER16 AI7; /* Mapped at index 0x200B, subindex 0x00*/ +extern INTEGER16 AI8; /* Mapped at index 0x200C, subindex 0x00*/ +extern UNS8 DI1; /* Mapped at index 0x200F, subindex 0x00*/ +extern UNS8 DI2; /* Mapped at index 0x2010, subindex 0x00*/ +extern UNS8 DI3; /* Mapped at index 0x2011, subindex 0x00*/ +extern UNS8 DI4; /* Mapped at index 0x2012, subindex 0x00*/ +extern UNS8 DI5; /* Mapped at index 0x2013, subindex 0x00*/ +extern UNS8 DI6; /* Mapped at index 0x2014, subindex 0x00*/ +extern UNS8 DI7; /* Mapped at index 0x2015, subindex 0x00*/ +extern UNS8 DI8; /* Mapped at index 0x2016, subindex 0x00*/ + +#endif // TESTMASTER_H diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Master/TestMaster.od --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Master/TestMaster.od Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,1079 @@ + + + + + +TestMaster + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DO + + + + + + + DO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AO1 + + + + + + + AO1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AO2 + + + + + + + AO2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AO3 + + + + + + + AO3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AO4 + + + + + + + AO4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AI1 + + + + + + + AI1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AI2 + + + + + + + AI2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AI3 + + + + + + + AI3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AI4 + + + + + + + AI4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AI5 + + + + + + + AI5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AI6 + + + + + + + AI6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AI7 + + + + + + + AI7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AI8 + + + + + + + AI8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DI1 + + + + + + + DI1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DI2 + + + + + + + DI2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DI3 + + + + + + + DI3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DI4 + + + + + + + DI4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DI5 + + + + + + + DI5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DI6 + + + + + + + DI6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DI7 + + + + + + + DI7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DI8 + + + + + + + DI8 + + + + + + + + + + + +master + + diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Master/TestMasterMicroMod.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Master/TestMasterMicroMod.c Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,510 @@ +/* +This file is part of CanFestival, a library implementing CanOpen Stack. + +Copyright (C): Edouard TISSERANT and Francis DUPIN + +See COPYING file for copyrights details. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#if defined(WIN32) && !defined(__CYGWIN__) +#include +#include "getopt.h" +void pause(void) +{ + system("PAUSE"); +} +#else +#include +#include +#include +#include +#include +#endif + +#include "canfestival.h" +#include "TestMasterMicroMod.h" +#include "TestMaster.h" +UNS8 slavenodeid; + + +/*****************************************************************************/ +void TestMaster_heartbeatError(UNS8 heartbeatID) +{ + eprintf("TestMaster_heartbeatError %d\n", heartbeatID); +} + +/******************************************************** + * ConfigureSlaveNode is responsible to + * - setup master RPDO 1 to receive TPDO 1 from id 0x40 + * - setup master TPDO 1 to send RPDO 1 to id 0x40 + ********************************************************/ +void TestMaster_initialisation() +{ + UNS32 PDO1_COBID = 0x0180 + slavenodeid; + UNS32 PDO2_COBID = 0x0200 + slavenodeid; + UNS8 size = sizeof(UNS32); + + eprintf("TestMaster_initialisation\n"); + + /***************************************** + * Define RPDOs to match slave ID=0x40 TPDOs* + *****************************************/ + writeLocalDict( &TestMaster_Data, /*CO_Data* d*/ + 0x1400, /*UNS16 index*/ + 0x01, /*UNS8 subind*/ + &PDO1_COBID, /*void * pSourceData,*/ + &size, /* UNS8 * pExpectedSize*/ + RW); /* UNS8 checkAccess */ + + + /***************************************** + * Define TPDOs to match slave ID=0x40 RPDOs* + *****************************************/ + writeLocalDict( &TestMaster_Data, /*CO_Data* d*/ + 0x1800, /*UNS16 index*/ + 0x01, /*UNS8 subind*/ + &PDO2_COBID, /*void * pSourceData,*/ + &size, /* UNS8 * pExpectedSize*/ + RW); /* UNS8 checkAccess */ +} + +static init_step = 0; + +/*Froward declaration*/ +static void ConfigureSlaveNode(CO_Data* d, UNS8 nodeId); + +/**/ +static void CheckSDOAndContinue(CO_Data* d, UNS8 nodeId) +{ + UNS32 abortCode; + + if(getWriteResultNetworkDict (d, nodeId, &abortCode) != SDO_FINISHED) + eprintf("Master : Failed in initializing slave %2.2x, step %d, AbortCode :%4.4x \n", nodeId, init_step, abortCode); + + /* Finalise last SDO transfer with this node */ + closeSDOtransfer(&TestMaster_Data, nodeId, SDO_CLIENT); + + ConfigureSlaveNode(d, nodeId); +} + +/******************************************************** + * ConfigureSlaveNode is responsible to + * - setup slave TPDO 1 transmit time + * - setup slave TPDO 2 transmit time + * - setup slave Heartbeat Producer time + * - switch to operational mode + * - send NMT to slave + ******************************************************** + * This an example of : + * Network Dictionary Access (SDO) with Callback + * Slave node state change request (NMT) + ******************************************************** + * This is called first by TestMaster_preOperational + * then it called again each time a SDO exchange is + * finished. + ********************************************************/ +static void ConfigureSlaveNode(CO_Data* d, UNS8 nodeId) +{ + UNS8 res; + eprintf("Master : ConfigureSlaveNode %2.2x\n", nodeId); + printf("nodeid slave=%x\n",nodeId); + switch(++init_step){ + case 1: + { /*disable Slave's TPDO 1 */ + UNS32 TPDO_COBId = 0x80000180 + nodeId; + + eprintf("Master : disable slave %2.2x TPDO 1 \n", nodeId); + res = writeNetworkDictCallBack (d, /*CO_Data* d*/ + /**TestSlave_Data.bDeviceNodeId, UNS8 nodeId*/ + nodeId, /*UNS8 nodeId*/ + 0x1800, /*UNS16 index*/ + 0x01, /*UNS8 subindex*/ + 4, /*UNS8 count*/ + 0, /*UNS8 dataType*/ + &TPDO_COBId,/*void *data*/ + CheckSDOAndContinue); /*SDOCallback_t Callback*/ + } + break; + + case 2: + { /*setup Slave's TPDO 1 to be transmitted on SYNC*/ + UNS8 Transmission_Type = 0x01; + + eprintf("Master : set slave %2.2x TPDO 1 transmit type\n", nodeId); + res = writeNetworkDictCallBack (d, /*CO_Data* d*/ + /**TestSlave_Data.bDeviceNodeId, UNS8 nodeId*/ + nodeId, /*UNS8 nodeId*/ + 0x1800, /*UNS16 index*/ + 0x02, /*UNS8 subindex*/ + 1, /*UNS8 count*/ + 0, /*UNS8 dataType*/ + &Transmission_Type,/*void *data*/ + CheckSDOAndContinue); /*SDOCallback_t Callback*/ + } + break; + + case 3: + { /*re-enable Slave's TPDO 1 */ + UNS32 TPDO_COBId = 0x00000180 + nodeId; + + eprintf("Master : re-enable slave %2.2x TPDO 1\n", nodeId); + res = writeNetworkDictCallBack (d, /*CO_Data* d*/ + /**TestSlave_Data.bDeviceNodeId, UNS8 nodeId*/ + nodeId, /*UNS8 nodeId*/ + 0x1800, /*UNS16 index*/ + 0x01, /*UNS8 subindex*/ + 4, /*UNS8 count*/ + 0, /*UNS8 dataType*/ + &TPDO_COBId,/*void *data*/ + CheckSDOAndContinue); /*SDOCallback_t Callback*/ + } + break; + + case 4: + { /*disable Slave's TPDO 2 */ + UNS32 TPDO_COBId = 0x80000200 + nodeId; + + eprintf("Master : disable slave %2.2x RPDO 1\n", nodeId); + res = writeNetworkDictCallBack (d, /*CO_Data* d*/ + /**TestSlave_Data.bDeviceNodeId, UNS8 nodeId*/ + nodeId, /*UNS8 nodeId*/ + 0x1400, /*UNS16 index*/ + 0x01, /*UNS8 subindex*/ + 4, /*UNS8 count*/ + 0, /*UNS8 dataType*/ + &TPDO_COBId,/*void *data*/ + CheckSDOAndContinue); /*SDOCallback_t Callback*/ + } + break; + + + case 5: + { + UNS8 Transmission_Type = 0x01; + + eprintf("Master : set slave %2.2x RPDO 1 receive type\n", nodeId); + res = writeNetworkDictCallBack (d, /*CO_Data* d*/ + /**TestSlave_Data.bDeviceNodeId, UNS8 nodeId*/ + nodeId, /*UNS8 nodeId*/ + 0x1400, /*UNS16 index*/ + 0x02, /*UNS8 subindex*/ + 1, /*UNS8 count*/ + 0, /*UNS8 dataType*/ + &Transmission_Type,/*void *data*/ + CheckSDOAndContinue); /*SDOCallback_t Callback*/ + } + break; + + case 6: + { /*re-enable Slave's TPDO 1 */ + UNS32 TPDO_COBId = 0x00000200 + nodeId; + + eprintf("Master : re-enable %2.2x RPDO 1\n", nodeId); + res = writeNetworkDictCallBack (d, /*CO_Data* d*/ + /**TestSlave_Data.bDeviceNodeId, UNS8 nodeId*/ + nodeId, /*UNS8 nodeId*/ + 0x1400, /*UNS16 index*/ + 0x01, /*UNS8 subindex*/ + 4, /*UNS8 count*/ + 0, /*UNS8 dataType*/ + &TPDO_COBId,/*void *data*/ + CheckSDOAndContinue); /*SDOCallback_t Callback*/ + } + break; + + case 7: + { + UNS16 Heartbeat_Producer_Time = 0x03E8; + eprintf("Master : set slave %2.2x heartbeat producer time \n", nodeId); + res = writeNetworkDictCallBack (d, /*CO_Data* d*/ + /**TestSlave_Data.bDeviceNodeId, UNS8 nodeId*/ + nodeId, /*UNS8 nodeId*/ + 0x1017, /*UNS16 index*/ + 0x00, /*UNS8 subindex*/ + 2, /*UNS8 count*/ + 0, /*UNS8 dataType*/ + &Heartbeat_Producer_Time,/*void *data*/ + CheckSDOAndContinue); /*SDOCallback_t Callback*/ + } + break; + + case 8: + { /*disable Slave's TPDO 2 */ + UNS32 TPDO_COBId = 0x80000280 + nodeId; + + eprintf("Master : disable slave %2.2x TPDO 2 \n", nodeId); + res = writeNetworkDictCallBack (d, /*CO_Data* d*/ + /**TestSlave_Data.bDeviceNodeId, UNS8 nodeId*/ + nodeId, /*UNS8 nodeId*/ + 0x1801, /*UNS16 index*/ + 0x01, /*UNS8 subindex*/ + 4, /*UNS8 count*/ + 0, /*UNS8 dataType*/ + &TPDO_COBId,/*void *data*/ + CheckSDOAndContinue); /*SDOCallback_t Callback*/ + } + break; + + case 9: + { /*disable Slave's TPDO 3 */ + UNS32 TPDO_COBId = 0x80000380 + nodeId; + + eprintf("Master : disable slave %2.2x TPDO 3 \n", nodeId); + res = writeNetworkDictCallBack (d, /*CO_Data* d*/ + /**TestSlave_Data.bDeviceNodeId, UNS8 nodeId*/ + nodeId, /*UNS8 nodeId*/ + 0x1802, /*UNS16 index*/ + 0x01, /*UNS8 subindex*/ + 4, /*UNS8 count*/ + 0, /*UNS8 dataType*/ + &TPDO_COBId,/*void *data*/ + CheckSDOAndContinue); /*SDOCallback_t Callback*/ + } + break; + + case 10: + { /*disable Slave's TPDO 2 */ + UNS32 TPDO_COBId = 0x80000480 + nodeId; + + eprintf("Master : disable slave %2.2x TPDO 4 \n", nodeId); + res = writeNetworkDictCallBack (d, /*CO_Data* d*/ + /**TestSlave_Data.bDeviceNodeId, UNS8 nodeId*/ + nodeId, /*UNS8 nodeId*/ + 0x1803, /*UNS16 index*/ + 0x01, /*UNS8 subindex*/ + 4, /*UNS8 count*/ + 0, /*UNS8 dataType*/ + &TPDO_COBId,/*void *data*/ + CheckSDOAndContinue); /*SDOCallback_t Callback*/ + } + break; + + case 11: + /* Put the master in operational mode */ + setState(d, Operational); + + /* Ask slave node to go in operational mode */ + masterSendNMTstateChange (d, nodeId, NMT_Start_Node); + } + +} + +void TestMaster_preOperational() +{ + + eprintf("TestMaster_preOperational\n"); + ConfigureSlaveNode(&TestMaster_Data, slavenodeid); + +} + +void TestMaster_operational() +{ + eprintf("TestMaster_operational\n"); +} + +void TestMaster_stopped() +{ + eprintf("TestMaster_stopped\n"); +} + +void TestMaster_post_sync() +{ + DO++; + + AO1 = AI1 / 2; + AO2 = AI2 / 2; + AO3 = AI3 / 2; + AO4 = AI4 / 2; + eprintf("MicroMod Digital Out: %2.2x\n",DO); + eprintf("MicroMod Analogue Out1: %d\n",AO1); + eprintf("MicroMod Analogue Out2: %d\n",AO2); + eprintf("MicroMod Analogue Out3: %d\n",AO3); + eprintf("MicroMod Analogue Out4: %d\n",AO4); + eprintf("MicroMod Digital In (by bit): DI1: %2.2x DI2: %2.2x DI3: %2.2x DI4: %2.2x DI5: %2.2x DI6: %2.2x DI7: %2.2x DI8: %2.2x\n",DI1,DI2,DI3,DI4,DI5,DI6,DI7,DI8); + eprintf("MicroMod Analogue In1: %d\n", AI1); + eprintf("MicroMod Analogue In2: %d\n", AI2); + eprintf("MicroMod Analogue In3: %d\n", AI3); + eprintf("MicroMod Analogue In4: %d\n", AI4); + eprintf("MicroMod Analogue In5: %d\n", AI5); + eprintf("MicroMod Analogue In6: %d\n", AI6); + eprintf("MicroMod Analogue In7: %d\n", AI7); + eprintf("MicroMod Analogue In8: %d\n", AI8); +} + +void TestMaster_post_TPDO() +{ +// eprintf("TestMaster_post_TPDO\n"); +} + +//s_BOARD SlaveBoard = {"0", "500K"}; +s_BOARD MasterBoard = {"32", "125K"}; + +#if !defined(WIN32) || defined(__CYGWIN__) +void catch_signal(int sig) +{ + signal(SIGTERM, catch_signal); + signal(SIGINT, catch_signal); + + eprintf("Got Signal %d\n",sig); +} +#endif + +void help() +{ + printf("**************************************************************\n"); + printf("* TestMasterMicroMod *\n"); + printf("* *\n"); + printf("* A simple example for PC. *\n"); + printf("* A CanOpen master that control a MicroMod module: *\n"); + printf("* - setup module TPDO 1 transmit type *\n"); + printf("* - setup module RPDO 1 transmit type *\n"); + printf("* - setup module hearbeatbeat period *\n"); + printf("* - disable others TPDOs *\n"); + printf("* - set state to operational *\n"); + printf("* - send periodic SYNC *\n"); + printf("* - send periodic RPDO 1 to Micromod (digital output) *\n"); + printf("* - listen Micromod's TPDO 1 (digital input) *\n"); + printf("* - Mapping RPDO 1 bit per bit (digital input) *\n"); + printf("* *\n"); + printf("* Usage: *\n"); + printf("* ./TestMasterMicroMod [OPTIONS] *\n"); + printf("* *\n"); + printf("* OPTIONS: *\n"); + printf("* -l : Can library [\"libcanfestival_can_virtual.so\"] *\n"); + printf("* *\n"); + printf("* Slave: *\n"); + printf("* -i : Slave Node id format [0x01 , 0x7F] *\n"); + printf("* *\n"); + printf("* Master: *\n"); + printf("* -m : bus name [\"1\"] *\n"); + printf("* -M : 1M,500K,250K,125K,100K,50K,20K,10K *\n"); + printf("* *\n"); + printf("**************************************************************\n"); +} + +/*************************** INIT *****************************************/ +void InitNodes(CO_Data* d, UNS32 id) +{ + /****************************** INITIALISATION MASTER *******************************/ + if(MasterBoard.baudrate){ + /* Defining the node Id */ + //setNodeId(&TestMaster_Data, 0x01); + + /* init */ + setState(&TestMaster_Data, Initialisation); + } +} + +/****************************************************************************/ +/*************************** MAIN *****************************************/ +/****************************************************************************/ +int main(int argc,char **argv) +{ + + int c; + extern char *optarg; + char* LibraryPath="libcanfestival_can_virtual.so"; + char *snodeid; + while ((c = getopt(argc, argv, "-m:s:M:S:l:i:")) != EOF) + { + switch(c) + { + case 'm' : + if (optarg[0] == 0) + { + help(); + exit(1); + } + MasterBoard.busname = optarg; + break; + case 'M' : + if (optarg[0] == 0) + { + help(); + exit(1); + } + MasterBoard.baudrate = optarg; + break; + case 'l' : + if (optarg[0] == 0) + { + help(); + exit(1); + } + LibraryPath = optarg; + break; + case 'i' : + if (optarg[0] == 0) + { + help(); + exit(1); + } + snodeid = optarg; + sscanf(snodeid,"%x",&slavenodeid); + break; + default: + help(); + exit(1); + } + } + +#if !defined(WIN32) || defined(__CYGWIN__) + /* install signal handler for manual break */ + signal(SIGTERM, catch_signal); + signal(SIGINT, catch_signal); +#endif + +#ifndef NOT_USE_DYNAMIC_LOADING + LoadCanDriver(LibraryPath); +#endif + + TestMaster_Data.heartbeatError = TestMaster_heartbeatError; + TestMaster_Data.initialisation = TestMaster_initialisation; + TestMaster_Data.preOperational = TestMaster_preOperational; + TestMaster_Data.operational = TestMaster_operational; + TestMaster_Data.stopped = TestMaster_stopped; + TestMaster_Data.post_sync = TestMaster_post_sync; + TestMaster_Data.post_TPDO = TestMaster_post_TPDO; + + if(!canOpen(&MasterBoard,&TestMaster_Data)){ + eprintf("Cannot open Master Board\n"); + goto fail_master; + } + + // Start timer thread + StartTimerLoop(&InitNodes); + + // wait Ctrl-C + pause(); + eprintf("Finishing.\n"); + + // Reset the slave node for next use (will stop emitting heartbeat) + masterSendNMTstateChange (&TestMaster_Data, slavenodeid, NMT_Reset_Node); + + // Stop master + setState(&TestMaster_Data, Stopped); + + // Stop timer thread + StopTimerLoop(); + +fail_master: + if(MasterBoard.baudrate) canClose(&TestMaster_Data); + + return 0; +} + + diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Master/TestMasterMicroMod.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Master/TestMasterMicroMod.h Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,59 @@ +/* +This file is part of CanFestival, a library implementing CanOpen Stack. + +Copyright (C): Edouard TISSERANT and Francis DUPIN + +See COPYING file for copyrights details. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +#ifdef USE_XENO +#define eprintf(...) +#else +#define eprintf(...) printf (__VA_ARGS__) +#endif +//void print_message(Message *m); + +/*UNS8 canSend(CAN_HANDLE fd0, Message *m);*/ + +#include "canfestival.h" + +/* +#define CAN_FIFO_LENGTH 100 + +#define DECLARE_A_CAN_FIFO \ +static Message FIFO[CAN_FIFO_LENGTH];\ +static int FIFO_First = 0;\ +static int FIFO_Last = 0;\ +\ +static void PutInFIFO(Message *m)\ +{\ + FIFO[FIFO_Last++] = *m;\ + FIFO_Last %= CAN_FIFO_LENGTH;\ +}\ +\ +static void GetFromFIFO(Message *m)\ +{\ + *m = FIFO[FIFO_First++];\ + FIFO_First %= CAN_FIFO_LENGTH;\ +}\ +\ +static void TransmitMessage(CO_Data* d, UNS32 id)\ +{\ + Message m;\ + GetFromFIFO(&m);\ + canDispatch(d, &m);\ +} +*/ diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Master/TestMasterMicroMod.vcproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Master/TestMasterMicroMod.vcproj Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Master/getopt.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Master/getopt.c Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,1260 @@ +/* from http://www.pwilson.net/getopt.html */ + +/* Getopt for GNU. + NOTE: getopt is now part of the C library, so if you don't know what + "Keep this file name-space clean" means, talk to drepper@gnu.org + before changing it! + Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This tells Alpha OSF/1 not to define a getopt prototype in . + Ditto for AIX 3.2 and . */ +#ifndef _NO_PROTO +# define _NO_PROTO +#endif + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if !defined __STDC__ || !__STDC__ +/* This is a separate conditional since some stdc systems + reject `defined (const)'. */ +# ifndef const +# define const +# endif +#endif + +#include + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#define GETOPT_INTERFACE_VERSION 2 +#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 +# include +# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION +# define ELIDE_CODE +# endif +#endif + +#ifndef ELIDE_CODE + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +/* Don't include stdlib.h for non-GNU C libraries because some of them + contain conflicting prototypes for getopt. */ +# include +# include +#endif /* GNU C library. */ + +#ifdef VMS +# include +# if HAVE_STRING_H - 0 +# include +# endif +#endif + +#ifndef _ +/* This is for other GNU distributions with internationalized messages. */ +# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC +# include +# ifndef _ +# define _(msgid) gettext (msgid) +# endif +# else +# define _(msgid) (msgid) +# endif +# if defined _LIBC && defined USE_IN_LIBIO +# include +# endif +#endif + +/* This version of `getopt' appears to the caller like standard Unix `getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As `getopt' works, it permutes the elements of ARGV so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Setting the environment variable POSIXLY_CORRECT disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include "getopt.h" + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +/* 1003.2 says this must be 1 before any call. */ +int optind = 1; + +/* Formerly, initialization of getopt depended on optind==0, which + causes problems with re-calling getopt as programs generally don't + know that. */ + +int __getopt_initialized; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static char *nextchar; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +int optopt = '?'; + +/* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + POSIXLY_CORRECT is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable POSIXLY_CORRECT, or using `+' as the first character + of the list of option characters. + + PERMUTE is the default. We permute the contents of ARGV as we scan, + so that eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code 1. + Using `-' as the first character of the list of option characters + selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return -1 with `optind' != ARGC. */ + +static enum +{ + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER +} ordering; + +/* Value of POSIXLY_CORRECT environment variable. */ +static char *posixly_correct; + +#ifdef __GNU_LIBRARY__ +/* We want to avoid inclusion of string.h with non-GNU libraries + because there are many ways it can cause trouble. + On some systems, it contains special magic macros that don't work + in GCC. */ +# include +# define my_index strchr +#else + +# if HAVE_STRING_H || WIN32 /* Pete Wilson mod 7/28/02 */ +# include +# else +# include +# endif + +/* Avoid depending on library functions or files + whose names are inconsistent. */ + +#ifndef getenv +extern char *getenv (); +#endif + +static char * +my_index (str, chr) + const char *str; + int chr; +{ + while (*str) + { + if (*str == chr) + return (char *) str; + str++; + } + return 0; +} + +/* If using GCC, we can safely declare strlen this way. + If not using GCC, it is ok not to declare it. */ +#ifdef __GNUC__ +/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. + That was relevant to code that was here before. */ +# if (!defined __STDC__ || !__STDC__) && !defined strlen +/* gcc with -traditional declares the built-in strlen to return int, + and has done so at least since version 2.4.5. -- rms. */ +extern int strlen (const char *); +# endif /* not __STDC__ */ +#endif /* __GNUC__ */ + +#endif /* not __GNU_LIBRARY__ */ + +/* Handle permutation of arguments. */ + +/* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + +static int first_nonopt; +static int last_nonopt; + +#ifdef _LIBC +/* Stored original parameters. + XXX This is no good solution. We should rather copy the args so + that we can compare them later. But we must not use malloc(3). */ +extern int __libc_argc; +extern char **__libc_argv; + +/* Bash 2.0 gives us an environment variable containing flags + indicating ARGV elements that should not be considered arguments. */ + +# ifdef USE_NONOPTION_FLAGS +/* Defined in getopt_init.c */ +extern char *__getopt_nonoption_flags; + +static int nonoption_flags_max_len; +static int nonoption_flags_len; +# endif + +# ifdef USE_NONOPTION_FLAGS +# define SWAP_FLAGS(ch1, ch2) \ + if (nonoption_flags_len > 0) \ + { \ + char __tmp = __getopt_nonoption_flags[ch1]; \ + __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ + __getopt_nonoption_flags[ch2] = __tmp; \ + } +# else +# define SWAP_FLAGS(ch1, ch2) +# endif +#else /* !_LIBC */ +# define SWAP_FLAGS(ch1, ch2) +#endif /* _LIBC */ + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +#if defined __STDC__ && __STDC__ +static void exchange (char **); +#endif + +static void +exchange (argv) + char **argv; +{ + int bottom = first_nonopt; + int middle = last_nonopt; + int top = optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + /* First make sure the handling of the `__getopt_nonoption_flags' + string can work normally. Our top argument must be in the range + of the string. */ + if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) + { + /* We must extend the array. The user plays games with us and + presents new arguments. */ + char *new_str = malloc (top + 1); + if (new_str == NULL) + nonoption_flags_len = nonoption_flags_max_len = 0; + else + { + memset (__mempcpy (new_str, __getopt_nonoption_flags, + nonoption_flags_max_len), + '\0', top + 1 - nonoption_flags_max_len); + nonoption_flags_max_len = top + 1; + __getopt_nonoption_flags = new_str; + } + } +#endif + + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + SWAP_FLAGS (bottom + i, middle + i); + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } + + /* Update records for the slots the non-options now occupy. */ + + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; +} + +/* Initialize the internal data when the first call is made. */ + +#if defined __STDC__ && __STDC__ +static const char *_getopt_initialize (int, char *const *, const char *); +#endif +static const char * +_getopt_initialize (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + first_nonopt = last_nonopt = optind; + + nextchar = NULL; + + posixly_correct = getenv ("POSIXLY_CORRECT"); + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (posixly_correct != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + if (posixly_correct == NULL + && argc == __libc_argc && argv == __libc_argv) + { + if (nonoption_flags_max_len == 0) + { + if (__getopt_nonoption_flags == NULL + || __getopt_nonoption_flags[0] == '\0') + nonoption_flags_max_len = -1; + else + { + const char *orig_str = __getopt_nonoption_flags; + int len = nonoption_flags_max_len = strlen (orig_str); + if (nonoption_flags_max_len < argc) + nonoption_flags_max_len = argc; + __getopt_nonoption_flags = + (char *) malloc (nonoption_flags_max_len); + if (__getopt_nonoption_flags == NULL) + nonoption_flags_max_len = -1; + else + memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), + '\0', nonoption_flags_max_len - len); + } + } + nonoption_flags_len = nonoption_flags_max_len; + } + else + nonoption_flags_len = 0; +#endif + + return optstring; +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns -1. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set `opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in `optarg', otherwise `optarg' is set to zero. + + If OPTSTRING starts with `-' or `+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with `--' instead of `-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a `=', or else the in next ARGV-element. + When `getopt' finds a long-named option, it returns 0 if that option's + `flag' field is nonzero, the value of the option's `val' field + if the `flag' field is zero. + + The elements of ARGV aren't really const, because we permute them. + But we pretend they're const in the prototype to be compatible + with other systems. + + LONGOPTS is a vector of `struct option' terminated by an + element containing a name which is zero. + + LONGIND returns the index in LONGOPT of the long-named option found. + It is only valid when a long-named option has been found by the most + recent call. + + If LONG_ONLY is nonzero, '-' as well as '--' can introduce + long-named options. */ + +int +_getopt_internal (argc, argv, optstring, longopts, longind, long_only) + int argc; + char *const *argv; + const char *optstring; + const struct option *longopts; + int *longind; + int long_only; +{ + int print_errors = opterr; + if (optstring[0] == ':') + print_errors = 0; + + if (argc < 1) + return -1; + + optarg = NULL; + + if (optind == 0 || !__getopt_initialized) + { + if (optind == 0) + optind = 1; /* Don't scan ARGV[0], the program name. */ + optstring = _getopt_initialize (argc, argv, optstring); + __getopt_initialized = 1; + } + + /* Test whether ARGV[optind] points to a non-option argument. + Either it does not have option syntax, or there is an environment flag + from the shell indicating it is not an option. The later information + is only used when the used in the GNU libc. */ +#if defined _LIBC && defined USE_NONOPTION_FLAGS +# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ + || (optind < nonoption_flags_len \ + && __getopt_nonoption_flags[optind] == '1')) +#else +# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') +#endif + + if (nextchar == NULL || *nextchar == '\0') + { + /* Advance to the next ARGV-element. */ + + /* Give FIRST_NONOPT and LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (last_nonopt > optind) + last_nonopt = optind; + if (first_nonopt > optind) + first_nonopt = optind; + + if (ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc && NONOPTION_P) + optind++; + last_nonopt = optind; + } + + /* The special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (optind != argc && !strcmp (argv[optind], "--")) + { + optind++; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return -1; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if (NONOPTION_P) + { + if (ordering == REQUIRE_ORDER) + return -1; + optarg = argv[optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Skip the initial punctuation. */ + + nextchar = (argv[optind] + 1 + + (longopts != NULL && argv[optind][1] == '-')); + } + + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + + if (longopts != NULL + && (argv[optind][1] == '-' + || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = -1; + int option_index; + + for (nameend = nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) + == (unsigned int) strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) + /* Second or later nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); +#endif + } + nextchar += strlen (nextchar); + optind++; + optopt = 0; + return '?'; + } + + if (pfound != NULL) + { + option_index = indfound; + optind++; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; +#endif + + if (argv[optind - 1][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("\ +%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#else + fprintf (stderr, _("\ +%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("\ +%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], + pfound->name); +#else + fprintf (stderr, _("\ +%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], pfound->name); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#endif + } + + nextchar += strlen (nextchar); + + optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); +#endif + } + nextchar += strlen (nextchar); + optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[optind][1] == '-' + || my_index (optstring, *nextchar) == NULL) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; +#endif + + if (argv[optind][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#else + fprintf (stderr, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#else + fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#endif + } + nextchar = (char *) ""; + optind++; + optopt = 0; + return '?'; + } + } + + /* Look at and handle the next short option-character. */ + + { + char c = *nextchar++; + char *temp = my_index (optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == '\0') + ++optind; + + if (temp == NULL || c == ':') + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; +#endif + + if (posixly_correct) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: illegal option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); +#endif + } + else + { +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: invalid option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#endif + } + optopt = c; + return '?'; + } + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';') + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (print_errors) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("%s: option requires an argument -- %c\n"), + argv[0], c); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("%s: option requires an argument -- %c\n"), + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + + /* optarg is now the argument, see if it's in the + table of longopts. */ + + for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second or later nonexact match found. */ + ambig = 1; + } + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); +#endif + } + nextchar += strlen (nextchar); + optind++; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + + nextchar += strlen (nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("\ +%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); +#endif + } + nextchar += strlen (nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + nextchar = NULL; + return 'W'; /* Let the application handle it. */ + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != '\0') + { + optarg = nextchar; + optind++; + } + else + optarg = NULL; + nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (print_errors) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, + _("%s: option requires an argument -- %c\n"), + argv[0], c); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, + _("%s: option requires an argument -- %c\n"), + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = NULL; + } + } + return c; + } +} + +int +getopt (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + return _getopt_internal (argc, argv, optstring, + (const struct option *) 0, + (int *) 0, + 0); +} + +#endif /* Not ELIDE_CODE. */ + + +/* Compile with -DTEST to make an executable for use in testing + the above definition of `getopt'. */ + +/* #define TEST */ /* Pete Wilson mod 7/28/02 */ +#ifdef TEST + +#ifndef exit /* Pete Wilson mod 7/28/02 */ + int exit(int); /* Pete Wilson mod 7/28/02 */ +#endif /* Pete Wilson mod 7/28/02 */ + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + + c = getopt (argc, argv, "abc:d:0123456789"); + if (c == -1) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Master/getopt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Master/getopt.h Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,191 @@ +/* from http://www.pwilson.net/getopt.html */ + +/* getopt.h */ +/* Declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001 Free Software + Foundation, Inc. This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute + it and/or modify it under the terms of the GNU Lesser + General Public License as published by the Free Software + Foundation; either version 2.1 of the License, or + (at your option) any later version. + + The GNU C Library is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with the GNU C Library; if not, write + to the Free Software Foundation, Inc., 59 Temple Place, + Suite 330, Boston, MA 02111-1307 USA. */ + + + + + +#ifndef _GETOPT_H + +#ifndef __need_getopt +# define _GETOPT_H 1 +#endif + +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include , but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include , which will pull in for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message `getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +#ifndef __need_getopt +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of `struct option' terminated by an element containing a name which is + zero. + + The field `has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field `flag' is not NULL, it points to a variable that is set + to the value given in the field `val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an `int' to + a compiled-in constant, such as set a value from `optarg', set the + option's `flag' field to zero and its `val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero `flag' field, `getopt' + returns the contents of the `val' field. */ + +struct option +{ +# if (defined __STDC__ && __STDC__) || defined __cplusplus + const char *name; +# else + char *name; +# endif + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; + +/* Names for the values of the `has_arg' field of `struct option'. */ + +# define no_argument 0 +# define required_argument 1 +# define optional_argument 2 +#endif /* need getopt */ + + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, `optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in `optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU `getopt'. + + The argument `--' causes premature termination of argument + scanning, explicitly telling `getopt' that there are no more + options. + + If OPTS begins with `--', then non-option arguments are treated as + arguments to the option '\0'. This behavior is specific to the GNU + `getopt'. */ + +#if (defined __STDC__ && __STDC__) || defined __cplusplus +# ifdef __GNU_LIBRARY__ +/* Many other libraries have conflicting prototypes for getopt, with + differences in the consts, in stdlib.h. To avoid compilation + errors, only prototype getopt for the GNU C library. */ +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); +# else /* not __GNU_LIBRARY__ */ +extern int getopt (); +# endif /* __GNU_LIBRARY__ */ + +# ifndef __need_getopt +extern int getopt_long (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind); +extern int getopt_long_only (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind); + +/* Internal only. Users should not call this directly. */ +extern int _getopt_internal (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only); +# endif +#else /* not __STDC__ */ +extern int getopt (); +# ifndef __need_getopt +extern int getopt_long (); +extern int getopt_long_only (); + +extern int _getopt_internal (); +# endif +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +/* Make sure we later can get all the definitions and declarations. */ +#undef __need_getopt + +#endif /* getopt.h */ + diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/.cvsignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/.cvsignore Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,8 @@ +Makefile +TestMasterSlave +result.txt +TestMasterSlave.exe +TestMasterSalve.vcproj.KONG.edouard.user +Release +*.depend +DS401_Slave_Gui diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/CallBack.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/CallBack.cpp Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,80 @@ +/* +This file is part of CanFestival, a library implementing CanOpen Stack. + +Copyright (C): Edouard TISSERANT and Francis DUPIN + +See COPYING file for copyrights details. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +#include +#include +#include +#include + +#include "CallBack.h" +#include "main.h" +extern "C" + { + #include "ObjDict.h" + } + + +extern wxTextCtrl *textLog; + +/*****************************************************************************/ +void Call_heartbeatError(UNS8 heartbeatID) +{ + *textLog << wxT("HeartbeatError\n"); +} + +void Call_initialisation() +{ + *textLog << wxT("Initialisation\n"); +} + +void Call_preOperational() +{ + *textLog << wxT("PreOperational\n"); +} + +void Call_operational() +{ + *textLog << wxT("Operational\n"); +} + +void Call_stopped() +{ + *textLog << wxT("Stopped\n"); +} + +void Call_post_sync() +{ + *textLog << wxT("Post_sync\n"); + printf("POST SYNC:\n"); + printf(" Write_Outputs: %x \n Analogue_Output1: %d \n Analogue_Output2: %d \n", Write_Outputs_8_Bit[0], Write_Analogue_Output_16_Bit[0], Write_Analogue_Output_16_Bit[1]); + printf(" Read_Input: %x \n Analogue_Input1: %d \n Analogue_Input2: %d \n", Read_Inputs_8_Bit[0], Read_Analogue_Input_16_Bit[0], Read_Analogue_Input_16_Bit[1]); +} + +void Call_post_TPDO() +{ + *textLog << wxT("Post_TPDO\n"); +} + +void Call_storeODSubIndex(UNS16 wIndex, UNS8 bSubindex) +{ + printf("StoreODSubIndex : %4.4x %2.2x\n", wIndex, bSubindex); + *textLog << wxT("StoreODSubIndex :\n"); +} diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/CallBack.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/CallBack.h Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,22 @@ +#ifndef CALLBACK_H_ +#define CALLBACK_H_ + +extern "C" + { + #include "ObjDict.h" + } + +void Call_heartbeatError(UNS8); + +UNS8 Call_canSend(Message *); + +void Call_initialisation(void); +void Call_preOperational(void); +void Call_operational(void); +void Call_stopped(void); + +void Call_post_sync(void); +void Call_post_TPDO(void); +void Call_storeODSubIndex(UNS16 wIndex, UNS8 bSubindex); + +#endif /*CALLBACK_H_*/ diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/Makefile.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/Makefile.in Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,101 @@ +#! gmake + +# +# Copyright (C) 2006 Laurent Bessard +# +# This file is part of canfestival, a library implementing the canopen +# stack +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +CC = SUB_CC +OPT_CFLAGS = -O2 +CFLAGS = SUB_OPT_CFLAGS +PROG_CFLAGS = SUB_PROG_CFLAGS +EXE_CFLAGS = SUB_EXE_CFLAGS +OS_NAME = SUB_OS_NAME +ARCH_NAME = SUB_ARCH_NAME +PREFIX = SUB_PREFIX +TARGET = SUB_TARGET +CAN_DRIVER = SUB_CAN_DRIVER +TIMERS_DRIVER = SUB_TIMERS_DRIVER + + +# DƩtermine le nom du fichier exƩcutable. +EXEC = main +# DƩtermine la liste des fichiers sources. +SRCS = $(wildcard *.cpp) +# DƩtermine le nom du fichier qui contiendra les dƩpendances. +DEPFILE = .depend +# Construit la liste des fichiers temporaires Ơ partir de la liste des fichiers +# sources. + +CPP_OBJS = $(SRCS:%.cpp=%.o) + + +INCLUDES = -I../../include -I../../include/$(TARGET) -I../../include/$(CAN_DRIVER) -I../../include/$(TIMERS_DRIVER) + +OBJS = ObjDict.o ../../src/libcanfestival.a ../../drivers/$(TARGET)/libcanfestival_$(TARGET).a + +ifeq ($(TIMERS_DRIVER),timers_xeno) + PROGDEFINES = -DUSE_XENO +endif + +all: DS401_Slave_Gui + +../../drivers/$(TARGET)/libcanfestival_$(TARGET).a: + $(MAKE) -C ../../drivers/$(TARGET) libcanfestival_$(TARGET).a + + +DS401_Slave_Gui: ObjDict.c $(OBJS) $(CPP_OBJS) + $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) `wx-config --libs` $(OBJS) $(CPP_OBJS) $(EXE_CFLAGS) -o $@ + +%o: %c + $(CC) -c $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) $< -o $@ + +ObjDict.c: ObjDict.od + $(MAKE) -C ../../objdictgen gnosis + python ../../objdictgen/objdictgen.py ObjDict.od ObjDict.c + +.cpp.o: + g++ -c $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) `wx-config --cxxflags` $< -o $@ + +clean: + rm -f $(MASTER_OBJS) + rm -f DS401_Slave_Gui + rm -f *~ *.o \#* + +mrproper: clean + rm -f ObjDict.c + rm -f ObjDict.h + $(RM) $(EXEC) $(DEPEND_FILE) + +install: DS401_Slave_Gui + mkdir -p $(PREFIX)/bin/ + cp $< $(PREFIX)/bin/ + +uninstall: + rm -f $(PREFIX)/bin/DS401_Slave_Gui + +$(EXEC): $(OBJS) + g++ $(OBJS) `wx-config --libs` -o $(EXEC) + +-include $(DEPFILE) + + + + + diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/ObjDict.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/ObjDict.c Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,709 @@ + +/* File generated by gen_cfile.py. Should not be modified. */ + +#include "ObjDict.h" + +/**************************************************************************/ +/* Declaration of the mapped variables */ +/**************************************************************************/ +UNS8 Read_Inputs_8_Bit[] = /* Mapped at index 0x6000, subindex 0x01 - 0x01 */ + { + 0x0 /* 0 */ + }; +UNS8 Polarity_Input_8_Bit[] = /* Mapped at index 0x6002, subindex 0x01 - 0x01 */ + { + 0x0 /* 0 */ + }; +UNS8 Write_Outputs_8_Bit[] = /* Mapped at index 0x6200, subindex 0x01 - 0x01 */ + { + 0x0 /* 0 */ + }; +UNS8 Change_Polarity_Outputs_8_Bit[] = /* Mapped at index 0x6202, subindex 0x01 - 0x01 */ + { + 0x0 /* 0 */ + }; +UNS8 Error_Mode_Outputs_8_Bit[] = /* Mapped at index 0x6206, subindex 0x01 - 0x01 */ + { + 0x0 /* 0 */ + }; +UNS8 Error_Value_Outputs_8_Bit[] = /* Mapped at index 0x6207, subindex 0x01 - 0x01 */ + { + 0x0 /* 0 */ + }; +INTEGER16 Read_Analogue_Input_16_Bit[] = /* Mapped at index 0x6401, subindex 0x01 - 0x08 */ + { + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0 /* 0 */ + }; +INTEGER16 Write_Analogue_Output_16_Bit[] = /* Mapped at index 0x6411, subindex 0x01 - 0x04 */ + { + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0 /* 0 */ + }; +UNS8 Analogue_Input_Global_Interrupt_Enable = 0x0; /* Mapped at index 0x6423, subindex 0x00 */ +UNS32 Analogue_Input_Interrupt_Delta_Unsigned[] = /* Mapped at index 0x6426, subindex 0x01 - 0x08 */ + { + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0 /* 0 */ + }; +UNS8 Analogue_Output_Error_Mode[] = /* Mapped at index 0x6443, subindex 0x01 - 0x04 */ + { + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0 /* 0 */ + }; +INTEGER32 Analogue_Output_Error_Value_Integer[] = /* Mapped at index 0x6444, subindex 0x01 - 0x04 */ + { + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0 /* 0 */ + }; + +/**************************************************************************/ +/* Declaration of the value range types */ +/**************************************************************************/ + +UNS32 ObjDict_valueRangeTest (UNS8 typeValue, void * value) +{ + switch (typeValue) { + } + return 0; +} + +/**************************************************************************/ +/* The node id */ +/**************************************************************************/ +/* node_id default value.*/ +UNS8 ObjDict_bDeviceNodeId = 0x40; + +/**************************************************************************/ +/* Array of message processing information */ + +const UNS8 ObjDict_iam_a_slave = 1; + +TIMER_HANDLE ObjDict_heartBeatTimers[3] = {TIMER_NONE,}; + +/* +$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ + + OBJECT DICTIONARY + +$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ +*/ + +/* index 0x1000 : Device Type. */ + UNS32 ObjDict_obj1000 = 0xF0191; /* 983441 */ + subindex ObjDict_Index1000[] = + { + { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1000 } + }; + +/* index 0x1001 : Error Register. */ + UNS8 ObjDict_obj1001 = 0x0; /* 0 */ + subindex ObjDict_Index1001[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_obj1001 } + }; + +/* index 0x1002 : Manufacturer Status Register. */ + UNS32 ObjDict_obj1002 = 0x0; /* 0 */ + subindex ObjDict_Index1002[] = + { + { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1002 } + }; + +/* index 0x1005 : SYNC COB ID. */ + UNS32 ObjDict_obj1005 = 0x80; /* 128 */ + ODCallback_t ObjDict_Index1005_callbacks[] = + { + NULL, + }; + subindex ObjDict_Index1005[] = + { + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1005 } + }; + +/* index 0x1006 : Communication / Cycle Period */ + UNS32 ObjDict_obj1006 = 0x0; /* 0 */ + +/* index 0x1008 : Manufacturer Device Name. */ + UNS8 ObjDict_obj1008[10] = ""; + subindex ObjDict_Index1008[] = + { + { RO, visible_string, 0, (void*)&ObjDict_obj1008 } + }; + +/* index 0x1009 : Manufacturer Hardware Version. */ + UNS8 ObjDict_obj1009[10] = ""; + subindex ObjDict_Index1009[] = + { + { RO, visible_string, 0, (void*)&ObjDict_obj1009 } + }; + +/* index 0x100A : Manufacturer Software Version. */ + UNS8 ObjDict_obj100A[10] = ""; + subindex ObjDict_Index100A[] = + { + { RO, visible_string, 0, (void*)&ObjDict_obj100A } + }; + +/* index 0x100C : Guard Time. */ + UNS16 ObjDict_obj100C = 0x0; /* 0 */ + subindex ObjDict_Index100C[] = + { + { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj100C } + }; + +/* index 0x100D : Life Time Factor. */ + UNS8 ObjDict_obj100D = 0x0; /* 0 */ + subindex ObjDict_Index100D[] = + { + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj100D } + }; + +/* index 0x1010 : Store parameters. */ + UNS8 ObjDict_highestSubIndex_obj1010 = 1; /* number of subindex - 1*/ + UNS32 ObjDict_obj1010_Save_All_Parameters = 0x0; /* 0 */ + subindex ObjDict_Index1010[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1010 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1010_Save_All_Parameters } + }; + +/* index 0x1011 : Restore Default Parameters. */ + UNS8 ObjDict_highestSubIndex_obj1011 = 1; /* number of subindex - 1*/ + UNS32 ObjDict_obj1011_Restore_All_Default_Parameters = 0x0; /* 0 */ + subindex ObjDict_Index1011[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1011 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1011_Restore_All_Default_Parameters } + }; + +/* index 0x1016 : Consumer Heartbeat Time. */ + UNS8 ObjDict_highestSubIndex_obj1016 = 3; /* number of subindex - 1*/ + UNS32 ObjDict_obj1016[] = + { + 0x0, /* 0 */ + 0x0, /* 0 */ + 0x0 /* 0 */ + }; + subindex ObjDict_Index1016[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1016 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1016[0] }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1016[1] }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1016[2] } + }; + +/* index 0x1017 : Producer Heartbeat Time. */ + UNS16 ObjDict_obj1017 = 0x0; /* 0 */ + ODCallback_t ObjDict_Index1017_callbacks[] = + { + NULL, + }; + subindex ObjDict_Index1017[] = + { + { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1017 } + }; + +/* index 0x1018 : Identity. */ + UNS8 ObjDict_highestSubIndex_obj1018 = 3; /* number of subindex - 1*/ + UNS32 ObjDict_obj1018_Vendor_ID = 0x175; /* 373 */ + UNS32 ObjDict_obj1018_Product_Code = 0x100000; /* 1048576 */ + UNS32 ObjDict_obj1018_Revision_Number = 0x10001; /* 65537 */ + subindex ObjDict_Index1018[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1018 }, + { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Vendor_ID }, + { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Product_Code }, + { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Revision_Number } + }; + +/* index 0x1020 : Verify Configuration. */ + UNS8 ObjDict_highestSubIndex_obj1020 = 2; /* number of subindex - 1*/ + UNS32 ObjDict_obj1020_Configuration_Date = 0x0; /* 0 */ + UNS32 ObjDict_obj1020_Configuration_Time = 0x0; /* 0 */ + subindex ObjDict_Index1020[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1020 }, + { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1020_Configuration_Date }, + { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1020_Configuration_Time } + }; + +/* index 0x1200 : Server SDO Parameter. */ + UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ + UNS32 ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x640; /* 1600 */ + UNS32 ObjDict_obj1200_COB_ID_Server_to_Client_Transmit_SDO = 0x5C0; /* 1472 */ + subindex ObjDict_Index1200[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1200 }, + { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO }, + { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1200_COB_ID_Server_to_Client_Transmit_SDO } + }; + +/* index 0x1400 : Receive PDO 1 Parameter. */ + UNS8 ObjDict_highestSubIndex_obj1400 = 2; /* number of subindex - 1*/ + UNS32 ObjDict_obj1400_COB_ID_used_by_PDO = 0x240; /* 576 */ + UNS8 ObjDict_obj1400_Transmission_Type = 0x1; /* 1 */ + subindex ObjDict_Index1400[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1400 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1400_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1400_Transmission_Type } + }; + +/* index 0x1401 : Receive PDO 2 Parameter. */ + UNS8 ObjDict_highestSubIndex_obj1401 = 2; /* number of subindex - 1*/ + UNS32 ObjDict_obj1401_COB_ID_used_by_PDO = 0x340; /* 832 */ + UNS8 ObjDict_obj1401_Transmission_Type = 0x1; /* 1 */ + subindex ObjDict_Index1401[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1401 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1401_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1401_Transmission_Type } + }; + +/* index 0x1402 : Receive PDO 3 Parameter. */ + UNS8 ObjDict_highestSubIndex_obj1402 = 2; /* number of subindex - 1*/ + UNS32 ObjDict_obj1402_COB_ID_used_by_PDO = 0x80000440; /* 2147484736 */ + UNS8 ObjDict_obj1402_Transmission_Type = 0x1; /* 1 */ + subindex ObjDict_Index1402[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1402 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1402_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1402_Transmission_Type } + }; + +/* index 0x1403 : Receive PDO 4 Parameter. */ + UNS8 ObjDict_highestSubIndex_obj1403 = 2; /* number of subindex - 1*/ + UNS32 ObjDict_obj1403_COB_ID_used_by_PDO = 0x80000540; /* 2147484992 */ + UNS8 ObjDict_obj1403_Transmission_Type = 0x1; /* 1 */ + subindex ObjDict_Index1403[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1403 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1403_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1403_Transmission_Type } + }; + +/* index 0x1600 : Receive PDO 1 Mapping. */ + UNS8 ObjDict_highestSubIndex_obj1600 = 1; /* number of subindex - 1*/ + UNS32 ObjDict_obj1600[] = + { + 0x62000108 /* 1644167432 */ + }; + subindex ObjDict_Index1600[] = + { + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1600 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1600[0] } + }; + +/* index 0x1601 : Receive PDO 2 Mapping. */ + UNS8 ObjDict_highestSubIndex_obj1601 = 4; /* number of subindex - 1*/ + UNS32 ObjDict_obj1601[] = + { + 0x64110110, /* 1678835984 */ + 0x64110210, /* 1678836240 */ + 0x64110310, /* 1678836496 */ + 0x64110410 /* 1678836752 */ + }; + subindex ObjDict_Index1601[] = + { + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1601 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1601[0] }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1601[1] }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1601[2] }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1601[3] } + }; + +/* index 0x1800 : Transmit PDO 1 Parameter. */ + UNS8 ObjDict_highestSubIndex_obj1800 = 5; /* number of subindex - 1*/ + UNS32 ObjDict_obj1800_COB_ID_used_by_PDO = 0x1C0; /* 448 */ + UNS8 ObjDict_obj1800_Transmission_Type = 0x1; /* 1 */ + UNS16 ObjDict_obj1800_Inhibit_Time = 0x0; /* 0 */ + UNS8 ObjDict_obj1800_Compatibility_Entry = 0x0; /* 0 */ + UNS16 ObjDict_obj1800_Event_Timer = 0x0; /* 0 */ + subindex ObjDict_Index1800[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1800 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1800_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1800_Transmission_Type }, + { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1800_Inhibit_Time }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1800_Compatibility_Entry }, + { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1800_Event_Timer } + }; + +/* index 0x1801 : Transmit PDO 2 Parameter. */ + UNS8 ObjDict_highestSubIndex_obj1801 = 5; /* number of subindex - 1*/ + UNS32 ObjDict_obj1801_COB_ID_used_by_PDO = 0x2C0; /* 704 */ + UNS8 ObjDict_obj1801_Transmission_Type = 0x1; /* 1 */ + UNS16 ObjDict_obj1801_Inhibit_Time = 0x0; /* 0 */ + UNS8 ObjDict_obj1801_Compatibility_Entry = 0x0; /* 0 */ + UNS16 ObjDict_obj1801_Event_Timer = 0x0; /* 0 */ + subindex ObjDict_Index1801[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1801 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1801_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1801_Transmission_Type }, + { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1801_Inhibit_Time }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1801_Compatibility_Entry }, + { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1801_Event_Timer } + }; + +/* index 0x1802 : Transmit PDO 3 Parameter. */ + UNS8 ObjDict_highestSubIndex_obj1802 = 5; /* number of subindex - 1*/ + UNS32 ObjDict_obj1802_COB_ID_used_by_PDO = 0x3C0; /* 960 */ + UNS8 ObjDict_obj1802_Transmission_Type = 0x1; /* 1 */ + UNS16 ObjDict_obj1802_Inhibit_Time = 0x0; /* 0 */ + UNS8 ObjDict_obj1802_Compatibility_Entry = 0x0; /* 0 */ + UNS16 ObjDict_obj1802_Event_Timer = 0x0; /* 0 */ + subindex ObjDict_Index1802[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1802 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1802_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1802_Transmission_Type }, + { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1802_Inhibit_Time }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1802_Compatibility_Entry }, + { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1802_Event_Timer } + }; + +/* index 0x1803 : Transmit PDO 4 Parameter. */ + UNS8 ObjDict_highestSubIndex_obj1803 = 5; /* number of subindex - 1*/ + UNS32 ObjDict_obj1803_COB_ID_used_by_PDO = 0x800004C0; /* 2147484864 */ + UNS8 ObjDict_obj1803_Transmission_Type = 0x1; /* 1 */ + UNS16 ObjDict_obj1803_Inhibit_Time = 0x0; /* 0 */ + UNS8 ObjDict_obj1803_Compatibility_Entry = 0x0; /* 0 */ + UNS16 ObjDict_obj1803_Event_Timer = 0x0; /* 0 */ + subindex ObjDict_Index1803[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1803 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1803_COB_ID_used_by_PDO }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1803_Transmission_Type }, + { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1803_Inhibit_Time }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1803_Compatibility_Entry }, + { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1803_Event_Timer } + }; + +/* index 0x1A00 : Transmit PDO 1 Mapping. */ + UNS8 ObjDict_highestSubIndex_obj1A00 = 1; /* number of subindex - 1*/ + UNS32 ObjDict_obj1A00[] = + { + 0x60000108 /* 1610613000 */ + }; + subindex ObjDict_Index1A00[] = + { + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1A00 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A00[0] } + }; + +/* index 0x1A01 : Transmit PDO 2 Mapping. */ + UNS8 ObjDict_highestSubIndex_obj1A01 = 4; /* number of subindex - 1*/ + UNS32 ObjDict_obj1A01[] = + { + 0x64010110, /* 1677787408 */ + 0x64010210, /* 1677787664 */ + 0x64010310, /* 1677787920 */ + 0x64010410 /* 1677788176 */ + }; + subindex ObjDict_Index1A01[] = + { + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1A01 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A01[0] }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A01[1] }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A01[2] }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A01[3] } + }; + +/* index 0x1A02 : Transmit PDO 3 Mapping. */ + UNS8 ObjDict_highestSubIndex_obj1A02 = 4; /* number of subindex - 1*/ + UNS32 ObjDict_obj1A02[] = + { + 0x64010510, /* 1677788432 */ + 0x64010610, /* 1677788688 */ + 0x64010710, /* 1677788944 */ + 0x64010810 /* 1677789200 */ + }; + subindex ObjDict_Index1A02[] = + { + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1A02 }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A02[0] }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A02[1] }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A02[2] }, + { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A02[3] } + }; + +/* index 0x1F50 : Download Program Data. */ + UNS8 ObjDict_highestSubIndex_obj1F50 = 3; /* number of subindex - 1*/ + UNS8 ObjDict_obj1F50_Compatibility_Entry = 0x0; /* 0 */ + UNS8 ObjDict_obj1F50_Compatibility = 0x0; /* 0 */ + UNS8* ObjDict_obj1F50_Download_Program_Data_HW_Settings = ""; + subindex ObjDict_Index1F50[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1F50 }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1F50_Compatibility_Entry }, + { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1F50_Compatibility }, + { RW, domain, 0, (void*)&ObjDict_obj1F50_Download_Program_Data_HW_Settings } + }; + +/* index 0x6000 : Mapped variable Read Inputs 8 Bit */ + UNS8 ObjDict_highestSubIndex_obj6000 = 1; /* number of subindex - 1*/ + subindex ObjDict_Index6000[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj6000 }, + { RO, uint8, sizeof (UNS8), (void*)&Read_Inputs_8_Bit[0] } + }; + +/* index 0x6002 : Mapped variable Polarity Input 8 Bit */ + UNS8 ObjDict_highestSubIndex_obj6002 = 1; /* number of subindex - 1*/ + subindex ObjDict_Index6002[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj6002 }, + { RW, uint8, sizeof (UNS8), (void*)&Polarity_Input_8_Bit[0] } + }; + +/* index 0x6200 : Mapped variable Write Outputs 8 Bit */ + UNS8 ObjDict_highestSubIndex_obj6200 = 1; /* number of subindex - 1*/ + subindex ObjDict_Index6200[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj6200 }, + { RW, uint8, sizeof (UNS8), (void*)&Write_Outputs_8_Bit[0] } + }; + +/* index 0x6202 : Mapped variable Change Polarity Outputs 8 Bit */ + UNS8 ObjDict_highestSubIndex_obj6202 = 1; /* number of subindex - 1*/ + subindex ObjDict_Index6202[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj6202 }, + { RW, uint8, sizeof (UNS8), (void*)&Change_Polarity_Outputs_8_Bit[0] } + }; + +/* index 0x6206 : Mapped variable Error Mode Outputs 8 Bit */ + UNS8 ObjDict_highestSubIndex_obj6206 = 1; /* number of subindex - 1*/ + subindex ObjDict_Index6206[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj6206 }, + { RW, uint8, sizeof (UNS8), (void*)&Error_Mode_Outputs_8_Bit[0] } + }; + +/* index 0x6207 : Mapped variable Error Value Outputs 8 Bit */ + UNS8 ObjDict_highestSubIndex_obj6207 = 1; /* number of subindex - 1*/ + subindex ObjDict_Index6207[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj6207 }, + { RW, uint8, sizeof (UNS8), (void*)&Error_Value_Outputs_8_Bit[0] } + }; + +/* index 0x6401 : Mapped variable Read Analogue Input 16 Bit */ + UNS8 ObjDict_highestSubIndex_obj6401 = 8; /* number of subindex - 1*/ + subindex ObjDict_Index6401[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj6401 }, + { RO, int16, sizeof (INTEGER16), (void*)&Read_Analogue_Input_16_Bit[0] }, + { RO, int16, sizeof (INTEGER16), (void*)&Read_Analogue_Input_16_Bit[1] }, + { RO, int16, sizeof (INTEGER16), (void*)&Read_Analogue_Input_16_Bit[2] }, + { RO, int16, sizeof (INTEGER16), (void*)&Read_Analogue_Input_16_Bit[3] }, + { RO, int16, sizeof (INTEGER16), (void*)&Read_Analogue_Input_16_Bit[4] }, + { RO, int16, sizeof (INTEGER16), (void*)&Read_Analogue_Input_16_Bit[5] }, + { RO, int16, sizeof (INTEGER16), (void*)&Read_Analogue_Input_16_Bit[6] }, + { RO, int16, sizeof (INTEGER16), (void*)&Read_Analogue_Input_16_Bit[7] } + }; + +/* index 0x6411 : Mapped variable Write Analogue Output 16 Bit */ + UNS8 ObjDict_highestSubIndex_obj6411 = 4; /* number of subindex - 1*/ + subindex ObjDict_Index6411[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj6411 }, + { RW, int16, sizeof (INTEGER16), (void*)&Write_Analogue_Output_16_Bit[0] }, + { RW, int16, sizeof (INTEGER16), (void*)&Write_Analogue_Output_16_Bit[1] }, + { RW, int16, sizeof (INTEGER16), (void*)&Write_Analogue_Output_16_Bit[2] }, + { RW, int16, sizeof (INTEGER16), (void*)&Write_Analogue_Output_16_Bit[3] } + }; + +/* index 0x6423 : Mapped variable Analogue Input Global Interrupt Enable */ + subindex ObjDict_Index6423[] = + { + { RW, boolean, sizeof (UNS8), (void*)&Analogue_Input_Global_Interrupt_Enable } + }; + +/* index 0x6426 : Mapped variable Analogue Input Interrupt Delta Unsigned */ + UNS8 ObjDict_highestSubIndex_obj6426 = 8; /* number of subindex - 1*/ + subindex ObjDict_Index6426[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj6426 }, + { RW, uint32, sizeof (UNS32), (void*)&Analogue_Input_Interrupt_Delta_Unsigned[0] }, + { RW, uint32, sizeof (UNS32), (void*)&Analogue_Input_Interrupt_Delta_Unsigned[1] }, + { RW, uint32, sizeof (UNS32), (void*)&Analogue_Input_Interrupt_Delta_Unsigned[2] }, + { RW, uint32, sizeof (UNS32), (void*)&Analogue_Input_Interrupt_Delta_Unsigned[3] }, + { RW, uint32, sizeof (UNS32), (void*)&Analogue_Input_Interrupt_Delta_Unsigned[4] }, + { RW, uint32, sizeof (UNS32), (void*)&Analogue_Input_Interrupt_Delta_Unsigned[5] }, + { RW, uint32, sizeof (UNS32), (void*)&Analogue_Input_Interrupt_Delta_Unsigned[6] }, + { RW, uint32, sizeof (UNS32), (void*)&Analogue_Input_Interrupt_Delta_Unsigned[7] } + }; + +/* index 0x6443 : Mapped variable Analogue Output Error Mode */ + UNS8 ObjDict_highestSubIndex_obj6443 = 4; /* number of subindex - 1*/ + subindex ObjDict_Index6443[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj6443 }, + { RW, uint8, sizeof (UNS8), (void*)&Analogue_Output_Error_Mode[0] }, + { RW, uint8, sizeof (UNS8), (void*)&Analogue_Output_Error_Mode[1] }, + { RW, uint8, sizeof (UNS8), (void*)&Analogue_Output_Error_Mode[2] }, + { RW, uint8, sizeof (UNS8), (void*)&Analogue_Output_Error_Mode[3] } + }; + +/* index 0x6444 : Mapped variable Analogue Output Error Value Integer */ + UNS8 ObjDict_highestSubIndex_obj6444 = 4; /* number of subindex - 1*/ + subindex ObjDict_Index6444[] = + { + { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj6444 }, + { RW, int32, sizeof (INTEGER32), (void*)&Analogue_Output_Error_Value_Integer[0] }, + { RW, int32, sizeof (INTEGER32), (void*)&Analogue_Output_Error_Value_Integer[1] }, + { RW, int32, sizeof (INTEGER32), (void*)&Analogue_Output_Error_Value_Integer[2] }, + { RW, int32, sizeof (INTEGER32), (void*)&Analogue_Output_Error_Value_Integer[3] } + }; + +const indextable ObjDict_objdict[] = +{ + { (subindex*)ObjDict_Index1000,sizeof(ObjDict_Index1000)/sizeof(ObjDict_Index1000[0]), 0x1000}, + { (subindex*)ObjDict_Index1001,sizeof(ObjDict_Index1001)/sizeof(ObjDict_Index1001[0]), 0x1001}, + { (subindex*)ObjDict_Index1002,sizeof(ObjDict_Index1002)/sizeof(ObjDict_Index1002[0]), 0x1002}, + { (subindex*)ObjDict_Index1005,sizeof(ObjDict_Index1005)/sizeof(ObjDict_Index1005[0]), 0x1005}, + { (subindex*)ObjDict_Index1008,sizeof(ObjDict_Index1008)/sizeof(ObjDict_Index1008[0]), 0x1008}, + { (subindex*)ObjDict_Index1009,sizeof(ObjDict_Index1009)/sizeof(ObjDict_Index1009[0]), 0x1009}, + { (subindex*)ObjDict_Index100A,sizeof(ObjDict_Index100A)/sizeof(ObjDict_Index100A[0]), 0x100A}, + { (subindex*)ObjDict_Index100C,sizeof(ObjDict_Index100C)/sizeof(ObjDict_Index100C[0]), 0x100C}, + { (subindex*)ObjDict_Index100D,sizeof(ObjDict_Index100D)/sizeof(ObjDict_Index100D[0]), 0x100D}, + { (subindex*)ObjDict_Index1010,sizeof(ObjDict_Index1010)/sizeof(ObjDict_Index1010[0]), 0x1010}, + { (subindex*)ObjDict_Index1011,sizeof(ObjDict_Index1011)/sizeof(ObjDict_Index1011[0]), 0x1011}, + { (subindex*)ObjDict_Index1016,sizeof(ObjDict_Index1016)/sizeof(ObjDict_Index1016[0]), 0x1016}, + { (subindex*)ObjDict_Index1017,sizeof(ObjDict_Index1017)/sizeof(ObjDict_Index1017[0]), 0x1017}, + { (subindex*)ObjDict_Index1018,sizeof(ObjDict_Index1018)/sizeof(ObjDict_Index1018[0]), 0x1018}, + { (subindex*)ObjDict_Index1020,sizeof(ObjDict_Index1020)/sizeof(ObjDict_Index1020[0]), 0x1020}, + { (subindex*)ObjDict_Index1200,sizeof(ObjDict_Index1200)/sizeof(ObjDict_Index1200[0]), 0x1200}, + { (subindex*)ObjDict_Index1400,sizeof(ObjDict_Index1400)/sizeof(ObjDict_Index1400[0]), 0x1400}, + { (subindex*)ObjDict_Index1401,sizeof(ObjDict_Index1401)/sizeof(ObjDict_Index1401[0]), 0x1401}, + { (subindex*)ObjDict_Index1402,sizeof(ObjDict_Index1402)/sizeof(ObjDict_Index1402[0]), 0x1402}, + { (subindex*)ObjDict_Index1403,sizeof(ObjDict_Index1403)/sizeof(ObjDict_Index1403[0]), 0x1403}, + { (subindex*)ObjDict_Index1600,sizeof(ObjDict_Index1600)/sizeof(ObjDict_Index1600[0]), 0x1600}, + { (subindex*)ObjDict_Index1601,sizeof(ObjDict_Index1601)/sizeof(ObjDict_Index1601[0]), 0x1601}, + { (subindex*)ObjDict_Index1800,sizeof(ObjDict_Index1800)/sizeof(ObjDict_Index1800[0]), 0x1800}, + { (subindex*)ObjDict_Index1801,sizeof(ObjDict_Index1801)/sizeof(ObjDict_Index1801[0]), 0x1801}, + { (subindex*)ObjDict_Index1802,sizeof(ObjDict_Index1802)/sizeof(ObjDict_Index1802[0]), 0x1802}, + { (subindex*)ObjDict_Index1803,sizeof(ObjDict_Index1803)/sizeof(ObjDict_Index1803[0]), 0x1803}, + { (subindex*)ObjDict_Index1A00,sizeof(ObjDict_Index1A00)/sizeof(ObjDict_Index1A00[0]), 0x1A00}, + { (subindex*)ObjDict_Index1A01,sizeof(ObjDict_Index1A01)/sizeof(ObjDict_Index1A01[0]), 0x1A01}, + { (subindex*)ObjDict_Index1A02,sizeof(ObjDict_Index1A02)/sizeof(ObjDict_Index1A02[0]), 0x1A02}, + { (subindex*)ObjDict_Index1F50,sizeof(ObjDict_Index1F50)/sizeof(ObjDict_Index1F50[0]), 0x1F50}, + { (subindex*)ObjDict_Index6000,sizeof(ObjDict_Index6000)/sizeof(ObjDict_Index6000[0]), 0x6000}, + { (subindex*)ObjDict_Index6002,sizeof(ObjDict_Index6002)/sizeof(ObjDict_Index6002[0]), 0x6002}, + { (subindex*)ObjDict_Index6200,sizeof(ObjDict_Index6200)/sizeof(ObjDict_Index6200[0]), 0x6200}, + { (subindex*)ObjDict_Index6202,sizeof(ObjDict_Index6202)/sizeof(ObjDict_Index6202[0]), 0x6202}, + { (subindex*)ObjDict_Index6206,sizeof(ObjDict_Index6206)/sizeof(ObjDict_Index6206[0]), 0x6206}, + { (subindex*)ObjDict_Index6207,sizeof(ObjDict_Index6207)/sizeof(ObjDict_Index6207[0]), 0x6207}, + { (subindex*)ObjDict_Index6401,sizeof(ObjDict_Index6401)/sizeof(ObjDict_Index6401[0]), 0x6401}, + { (subindex*)ObjDict_Index6411,sizeof(ObjDict_Index6411)/sizeof(ObjDict_Index6411[0]), 0x6411}, + { (subindex*)ObjDict_Index6423,sizeof(ObjDict_Index6423)/sizeof(ObjDict_Index6423[0]), 0x6423}, + { (subindex*)ObjDict_Index6426,sizeof(ObjDict_Index6426)/sizeof(ObjDict_Index6426[0]), 0x6426}, + { (subindex*)ObjDict_Index6443,sizeof(ObjDict_Index6443)/sizeof(ObjDict_Index6443[0]), 0x6443}, + { (subindex*)ObjDict_Index6444,sizeof(ObjDict_Index6444)/sizeof(ObjDict_Index6444[0]), 0x6444}, +}; + +const indextable * ObjDict_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks) +{ + int i; + *callbacks = NULL; + switch(wIndex){ + case 0x1000: i = 0;break; + case 0x1001: i = 1;break; + case 0x1002: i = 2;break; + case 0x1005: i = 3;*callbacks = ObjDict_Index1005_callbacks; break; + case 0x1008: i = 4;break; + case 0x1009: i = 5;break; + case 0x100A: i = 6;break; + case 0x100C: i = 7;break; + case 0x100D: i = 8;break; + case 0x1010: i = 9;break; + case 0x1011: i = 10;break; + case 0x1016: i = 11;break; + case 0x1017: i = 12;*callbacks = ObjDict_Index1017_callbacks; break; + case 0x1018: i = 13;break; + case 0x1020: i = 14;break; + case 0x1200: i = 15;break; + case 0x1400: i = 16;break; + case 0x1401: i = 17;break; + case 0x1402: i = 18;break; + case 0x1403: i = 19;break; + case 0x1600: i = 20;break; + case 0x1601: i = 21;break; + case 0x1800: i = 22;break; + case 0x1801: i = 23;break; + case 0x1802: i = 24;break; + case 0x1803: i = 25;break; + case 0x1A00: i = 26;break; + case 0x1A01: i = 27;break; + case 0x1A02: i = 28;break; + case 0x1F50: i = 29;break; + case 0x6000: i = 30;break; + case 0x6002: i = 31;break; + case 0x6200: i = 32;break; + case 0x6202: i = 33;break; + case 0x6206: i = 34;break; + case 0x6207: i = 35;break; + case 0x6401: i = 36;break; + case 0x6411: i = 37;break; + case 0x6423: i = 38;break; + case 0x6426: i = 39;break; + case 0x6443: i = 40;break; + case 0x6444: i = 41;break; + default: + *errorCode = OD_NO_SUCH_OBJECT; + return NULL; + } + *errorCode = OD_SUCCESSFUL; + return &ObjDict_objdict[i]; +} + +/* + * To count at which received SYNC a PDO must be sent. + * Even if no pdoTransmit are defined, at least one entry is computed + * for compilations issues. + */ +s_PDO_status ObjDict_PDO_status[4] = {s_PDO_staus_Initializer,s_PDO_staus_Initializer,s_PDO_staus_Initializer,s_PDO_staus_Initializer}; + +quick_index ObjDict_firstIndex = { + 15, /* SDO_SVR */ + 0, /* SDO_CLT */ + 16, /* PDO_RCV */ + 20, /* PDO_RCV_MAP */ + 22, /* PDO_TRS */ + 26 /* PDO_TRS_MAP */ +}; + +quick_index ObjDict_lastIndex = { + 15, /* SDO_SVR */ + 0, /* SDO_CLT */ + 19, /* PDO_RCV */ + 21, /* PDO_RCV_MAP */ + 25, /* PDO_TRS */ + 28 /* PDO_TRS_MAP */ +}; + +UNS16 ObjDict_ObjdictSize = sizeof(ObjDict_objdict)/sizeof(ObjDict_objdict[0]); + +CO_Data ObjDict_Data = CANOPEN_NODE_DATA_INITIALIZER(ObjDict); + diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/ObjDict.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/ObjDict.h Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,28 @@ + +/* File generated by gen_cfile.py. Should not be modified. */ + +#ifndef OBJDICT_H +#define OBJDICT_H + +#include "data.h" + +/* Prototypes of function provided by object dictionnary */ +UNS32 ObjDict_valueRangeTest (UNS8 typeValue, void * value); +const indextable * ObjDict_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks); + +/* Master node data struct */ +extern CO_Data ObjDict_Data; +extern UNS8 Read_Inputs_8_Bit[1]; /* Mapped at index 0x6000, subindex 0x01 - 0x01 */ +extern UNS8 Polarity_Input_8_Bit[1]; /* Mapped at index 0x6002, subindex 0x01 - 0x01 */ +extern UNS8 Write_Outputs_8_Bit[1]; /* Mapped at index 0x6200, subindex 0x01 - 0x01 */ +extern UNS8 Change_Polarity_Outputs_8_Bit[1]; /* Mapped at index 0x6202, subindex 0x01 - 0x01 */ +extern UNS8 Error_Mode_Outputs_8_Bit[1]; /* Mapped at index 0x6206, subindex 0x01 - 0x01 */ +extern UNS8 Error_Value_Outputs_8_Bit[1]; /* Mapped at index 0x6207, subindex 0x01 - 0x01 */ +extern INTEGER16 Read_Analogue_Input_16_Bit[8]; /* Mapped at index 0x6401, subindex 0x01 - 0x08 */ +extern INTEGER16 Write_Analogue_Output_16_Bit[4]; /* Mapped at index 0x6411, subindex 0x01 - 0x04 */ +extern UNS8 Analogue_Input_Global_Interrupt_Enable; /* Mapped at index 0x6423, subindex 0x00*/ +extern UNS32 Analogue_Input_Interrupt_Delta_Unsigned[8]; /* Mapped at index 0x6426, subindex 0x01 - 0x08 */ +extern UNS8 Analogue_Output_Error_Mode[4]; /* Mapped at index 0x6443, subindex 0x01 - 0x04 */ +extern INTEGER32 Analogue_Output_Error_Value_Integer[4]; /* Mapped at index 0x6444, subindex 0x01 - 0x04 */ + +#endif // OBJDICT_H diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/ObjDict.od --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/ObjDict.od Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,5430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Compatibility + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +slave + +ObjDict + diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/TestSlaveGui.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/TestSlaveGui.cpp Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,133 @@ +/* +This file is part of CanFestival, a library implementing CanOpen Stack. + +Copyright (C): Edouard TISSERANT and Francis DUPIN + +See COPYING file for copyrights details. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + + +#include +#include +#include +#include + +#if defined(WIN32) && !defined(__CYGWIN__) + #include + + extern "C" { + #include "getopt.h" + } + + void pause(void) + { + system("PAUSE"); + } +#else + #include + #include + #include + #include + #include +#endif + +//#include +//#include +extern "C" + { + #include "canfestival.h" + } +#include "CallBack.h" +#include "TestSlaveGui.h" +#include "main.h" + +extern wxTextCtrl *textLog; +extern int node_id_ext; + +UNS32 OnMasterMap1Update(CO_Data* d, const indextable * unsused_indextable, UNS8 unsused_bSubindex) +{ + return 0; +} + +s_BOARD MasterBoard = {"1", "125K"}; + +#if !defined(WIN32) || defined(__CYGWIN__) +void catch_signal(int sig) +{ + signal(SIGTERM, catch_signal); + signal(SIGINT, catch_signal); + printf("Got Signal %d\n",sig); +} +#endif + +//*************************** INIT ***************************************** +void InitNodes(CO_Data* d, UNS32 id) +{ + //****************************** INITIALISATION SLAVE ******************************* + /* Defining the node Id */ + setNodeId(&ObjDict_Data, node_id_ext); + /* init */ + setState(&ObjDict_Data, Initialisation); +} + +//**************************************************************************** +//*************************** MAIN ***************************************** +//**************************************************************************** +int main_can(s_BOARD SlaveBoard, char* LibraryPath) +{ + printf("Bus name: %s Freq: %s Driver: %s\n", SlaveBoard.busname, SlaveBoard.baudrate, LibraryPath); + + #if !defined(WIN32) || defined(__CYGWIN__) + signal(SIGTERM, catch_signal); + signal(SIGINT, catch_signal); + #endif + + #ifndef NOT_USE_DYNAMIC_LOADING + LoadCanDriver(LibraryPath); + #endif + // Open CAN devices + + ObjDict_Data.heartbeatError = Call_heartbeatError; + ObjDict_Data.initialisation = Call_initialisation; + ObjDict_Data.preOperational = Call_preOperational; + ObjDict_Data.operational = Call_operational; + ObjDict_Data.stopped = Call_stopped; + ObjDict_Data.post_sync = Call_post_sync; + ObjDict_Data.post_TPDO = Call_post_TPDO; + ObjDict_Data.storeODSubIndex = Call_storeODSubIndex; + + if(!canOpen(&SlaveBoard,&ObjDict_Data)) + { + printf("Cannot open Slave Board (%s,%s)\n",SlaveBoard.busname, SlaveBoard.baudrate); + return (1); + } + // Start timer thread + //printf("nodeid slave=%x\n",node_id_ext); + StartTimerLoop(&InitNodes); + return 0; +} + +void stop_slave() +{ + StopTimerLoop(); + // Close CAN devices (and can threads) + // Stop master + setState(&ObjDict_Data, Stopped); + //canClose(&ObjDict_Data); + //canClose(&TestMaster_Data); + return; +} diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/TestSlaveGui.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/TestSlaveGui.h Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,9 @@ +#ifndef TESTSLAVEGUI_H_ +#define TESTSLAVEGUI_H_ + + #include "canfestival.h" + + int main_can(s_BOARD SlaveBoard, char* LibraryPath); + void stop_slave(); + +#endif /*TESTSLAVEGUI_H_*/ diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/TestSlaveGui.vcproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/TestSlaveGui.vcproj Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/getopt.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/getopt.c Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,1260 @@ +/* from http://www.pwilson.net/getopt.html */ + +/* Getopt for GNU. + NOTE: getopt is now part of the C library, so if you don't know what + "Keep this file name-space clean" means, talk to drepper@gnu.org + before changing it! + Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This tells Alpha OSF/1 not to define a getopt prototype in . + Ditto for AIX 3.2 and . */ +#ifndef _NO_PROTO +# define _NO_PROTO +#endif + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if !defined __STDC__ || !__STDC__ +/* This is a separate conditional since some stdc systems + reject `defined (const)'. */ +# ifndef const +# define const +# endif +#endif + +#include + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#define GETOPT_INTERFACE_VERSION 2 +#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 +# include +# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION +# define ELIDE_CODE +# endif +#endif + +#ifndef ELIDE_CODE + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +/* Don't include stdlib.h for non-GNU C libraries because some of them + contain conflicting prototypes for getopt. */ +# include +# include +#endif /* GNU C library. */ + +#ifdef VMS +# include +# if HAVE_STRING_H - 0 +# include +# endif +#endif + +#ifndef _ +/* This is for other GNU distributions with internationalized messages. */ +# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC +# include +# ifndef _ +# define _(msgid) gettext (msgid) +# endif +# else +# define _(msgid) (msgid) +# endif +# if defined _LIBC && defined USE_IN_LIBIO +# include +# endif +#endif + +/* This version of `getopt' appears to the caller like standard Unix `getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As `getopt' works, it permutes the elements of ARGV so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Setting the environment variable POSIXLY_CORRECT disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include "getopt.h" + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +/* 1003.2 says this must be 1 before any call. */ +int optind = 1; + +/* Formerly, initialization of getopt depended on optind==0, which + causes problems with re-calling getopt as programs generally don't + know that. */ + +int __getopt_initialized; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static char *nextchar; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +int optopt = '?'; + +/* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + POSIXLY_CORRECT is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable POSIXLY_CORRECT, or using `+' as the first character + of the list of option characters. + + PERMUTE is the default. We permute the contents of ARGV as we scan, + so that eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code 1. + Using `-' as the first character of the list of option characters + selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return -1 with `optind' != ARGC. */ + +static enum +{ + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER +} ordering; + +/* Value of POSIXLY_CORRECT environment variable. */ +static char *posixly_correct; + +#ifdef __GNU_LIBRARY__ +/* We want to avoid inclusion of string.h with non-GNU libraries + because there are many ways it can cause trouble. + On some systems, it contains special magic macros that don't work + in GCC. */ +# include +# define my_index strchr +#else + +# if HAVE_STRING_H || WIN32 /* Pete Wilson mod 7/28/02 */ +# include +# else +# include +# endif + +/* Avoid depending on library functions or files + whose names are inconsistent. */ + +#ifndef getenv +extern char *getenv (); +#endif + +static char * +my_index (str, chr) + const char *str; + int chr; +{ + while (*str) + { + if (*str == chr) + return (char *) str; + str++; + } + return 0; +} + +/* If using GCC, we can safely declare strlen this way. + If not using GCC, it is ok not to declare it. */ +#ifdef __GNUC__ +/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. + That was relevant to code that was here before. */ +# if (!defined __STDC__ || !__STDC__) && !defined strlen +/* gcc with -traditional declares the built-in strlen to return int, + and has done so at least since version 2.4.5. -- rms. */ +extern int strlen (const char *); +# endif /* not __STDC__ */ +#endif /* __GNUC__ */ + +#endif /* not __GNU_LIBRARY__ */ + +/* Handle permutation of arguments. */ + +/* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + +static int first_nonopt; +static int last_nonopt; + +#ifdef _LIBC +/* Stored original parameters. + XXX This is no good solution. We should rather copy the args so + that we can compare them later. But we must not use malloc(3). */ +extern int __libc_argc; +extern char **__libc_argv; + +/* Bash 2.0 gives us an environment variable containing flags + indicating ARGV elements that should not be considered arguments. */ + +# ifdef USE_NONOPTION_FLAGS +/* Defined in getopt_init.c */ +extern char *__getopt_nonoption_flags; + +static int nonoption_flags_max_len; +static int nonoption_flags_len; +# endif + +# ifdef USE_NONOPTION_FLAGS +# define SWAP_FLAGS(ch1, ch2) \ + if (nonoption_flags_len > 0) \ + { \ + char __tmp = __getopt_nonoption_flags[ch1]; \ + __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ + __getopt_nonoption_flags[ch2] = __tmp; \ + } +# else +# define SWAP_FLAGS(ch1, ch2) +# endif +#else /* !_LIBC */ +# define SWAP_FLAGS(ch1, ch2) +#endif /* _LIBC */ + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +#if defined __STDC__ && __STDC__ +static void exchange (char **); +#endif + +static void +exchange (argv) + char **argv; +{ + int bottom = first_nonopt; + int middle = last_nonopt; + int top = optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + /* First make sure the handling of the `__getopt_nonoption_flags' + string can work normally. Our top argument must be in the range + of the string. */ + if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) + { + /* We must extend the array. The user plays games with us and + presents new arguments. */ + char *new_str = malloc (top + 1); + if (new_str == NULL) + nonoption_flags_len = nonoption_flags_max_len = 0; + else + { + memset (__mempcpy (new_str, __getopt_nonoption_flags, + nonoption_flags_max_len), + '\0', top + 1 - nonoption_flags_max_len); + nonoption_flags_max_len = top + 1; + __getopt_nonoption_flags = new_str; + } + } +#endif + + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + SWAP_FLAGS (bottom + i, middle + i); + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } + + /* Update records for the slots the non-options now occupy. */ + + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; +} + +/* Initialize the internal data when the first call is made. */ + +#if defined __STDC__ && __STDC__ +static const char *_getopt_initialize (int, char *const *, const char *); +#endif +static const char * +_getopt_initialize (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + first_nonopt = last_nonopt = optind; + + nextchar = NULL; + + posixly_correct = getenv ("POSIXLY_CORRECT"); + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (posixly_correct != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + if (posixly_correct == NULL + && argc == __libc_argc && argv == __libc_argv) + { + if (nonoption_flags_max_len == 0) + { + if (__getopt_nonoption_flags == NULL + || __getopt_nonoption_flags[0] == '\0') + nonoption_flags_max_len = -1; + else + { + const char *orig_str = __getopt_nonoption_flags; + int len = nonoption_flags_max_len = strlen (orig_str); + if (nonoption_flags_max_len < argc) + nonoption_flags_max_len = argc; + __getopt_nonoption_flags = + (char *) malloc (nonoption_flags_max_len); + if (__getopt_nonoption_flags == NULL) + nonoption_flags_max_len = -1; + else + memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), + '\0', nonoption_flags_max_len - len); + } + } + nonoption_flags_len = nonoption_flags_max_len; + } + else + nonoption_flags_len = 0; +#endif + + return optstring; +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns -1. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set `opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in `optarg', otherwise `optarg' is set to zero. + + If OPTSTRING starts with `-' or `+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with `--' instead of `-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a `=', or else the in next ARGV-element. + When `getopt' finds a long-named option, it returns 0 if that option's + `flag' field is nonzero, the value of the option's `val' field + if the `flag' field is zero. + + The elements of ARGV aren't really const, because we permute them. + But we pretend they're const in the prototype to be compatible + with other systems. + + LONGOPTS is a vector of `struct option' terminated by an + element containing a name which is zero. + + LONGIND returns the index in LONGOPT of the long-named option found. + It is only valid when a long-named option has been found by the most + recent call. + + If LONG_ONLY is nonzero, '-' as well as '--' can introduce + long-named options. */ + +int +_getopt_internal (argc, argv, optstring, longopts, longind, long_only) + int argc; + char *const *argv; + const char *optstring; + const struct option *longopts; + int *longind; + int long_only; +{ + int print_errors = opterr; + if (optstring[0] == ':') + print_errors = 0; + + if (argc < 1) + return -1; + + optarg = NULL; + + if (optind == 0 || !__getopt_initialized) + { + if (optind == 0) + optind = 1; /* Don't scan ARGV[0], the program name. */ + optstring = _getopt_initialize (argc, argv, optstring); + __getopt_initialized = 1; + } + + /* Test whether ARGV[optind] points to a non-option argument. + Either it does not have option syntax, or there is an environment flag + from the shell indicating it is not an option. The later information + is only used when the used in the GNU libc. */ +#if defined _LIBC && defined USE_NONOPTION_FLAGS +# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ + || (optind < nonoption_flags_len \ + && __getopt_nonoption_flags[optind] == '1')) +#else +# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') +#endif + + if (nextchar == NULL || *nextchar == '\0') + { + /* Advance to the next ARGV-element. */ + + /* Give FIRST_NONOPT and LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (last_nonopt > optind) + last_nonopt = optind; + if (first_nonopt > optind) + first_nonopt = optind; + + if (ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc && NONOPTION_P) + optind++; + last_nonopt = optind; + } + + /* The special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (optind != argc && !strcmp (argv[optind], "--")) + { + optind++; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return -1; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if (NONOPTION_P) + { + if (ordering == REQUIRE_ORDER) + return -1; + optarg = argv[optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Skip the initial punctuation. */ + + nextchar = (argv[optind] + 1 + + (longopts != NULL && argv[optind][1] == '-')); + } + + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + + if (longopts != NULL + && (argv[optind][1] == '-' + || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = -1; + int option_index; + + for (nameend = nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) + == (unsigned int) strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) + /* Second or later nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); +#endif + } + nextchar += strlen (nextchar); + optind++; + optopt = 0; + return '?'; + } + + if (pfound != NULL) + { + option_index = indfound; + optind++; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; +#endif + + if (argv[optind - 1][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("\ +%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#else + fprintf (stderr, _("\ +%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("\ +%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], + pfound->name); +#else + fprintf (stderr, _("\ +%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], pfound->name); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#endif + } + + nextchar += strlen (nextchar); + + optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); +#endif + } + nextchar += strlen (nextchar); + optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[optind][1] == '-' + || my_index (optstring, *nextchar) == NULL) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; +#endif + + if (argv[optind][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#else + fprintf (stderr, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#else + fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#endif + } + nextchar = (char *) ""; + optind++; + optopt = 0; + return '?'; + } + } + + /* Look at and handle the next short option-character. */ + + { + char c = *nextchar++; + char *temp = my_index (optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == '\0') + ++optind; + + if (temp == NULL || c == ':') + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; +#endif + + if (posixly_correct) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: illegal option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); +#endif + } + else + { +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: invalid option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#endif + } + optopt = c; + return '?'; + } + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';') + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (print_errors) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("%s: option requires an argument -- %c\n"), + argv[0], c); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("%s: option requires an argument -- %c\n"), + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + + /* optarg is now the argument, see if it's in the + table of longopts. */ + + for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second or later nonexact match found. */ + ambig = 1; + } + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); +#endif + } + nextchar += strlen (nextchar); + optind++; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + + nextchar += strlen (nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("\ +%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); +#endif + } + nextchar += strlen (nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + nextchar = NULL; + return 'W'; /* Let the application handle it. */ + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != '\0') + { + optarg = nextchar; + optind++; + } + else + optarg = NULL; + nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (print_errors) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, + _("%s: option requires an argument -- %c\n"), + argv[0], c); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, + _("%s: option requires an argument -- %c\n"), + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = NULL; + } + } + return c; + } +} + +int +getopt (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + return _getopt_internal (argc, argv, optstring, + (const struct option *) 0, + (int *) 0, + 0); +} + +#endif /* Not ELIDE_CODE. */ + + +/* Compile with -DTEST to make an executable for use in testing + the above definition of `getopt'. */ + +/* #define TEST */ /* Pete Wilson mod 7/28/02 */ +#ifdef TEST + +#ifndef exit /* Pete Wilson mod 7/28/02 */ + int exit(int); /* Pete Wilson mod 7/28/02 */ +#endif /* Pete Wilson mod 7/28/02 */ + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + + c = getopt (argc, argv, "abc:d:0123456789"); + if (c == -1) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/getopt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/getopt.h Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,191 @@ +/* from http://www.pwilson.net/getopt.html */ + +/* getopt.h */ +/* Declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001 Free Software + Foundation, Inc. This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute + it and/or modify it under the terms of the GNU Lesser + General Public License as published by the Free Software + Foundation; either version 2.1 of the License, or + (at your option) any later version. + + The GNU C Library is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with the GNU C Library; if not, write + to the Free Software Foundation, Inc., 59 Temple Place, + Suite 330, Boston, MA 02111-1307 USA. */ + + + + + +#ifndef _GETOPT_H + +#ifndef __need_getopt +# define _GETOPT_H 1 +#endif + +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include , but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include , which will pull in for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message `getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +#ifndef __need_getopt +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of `struct option' terminated by an element containing a name which is + zero. + + The field `has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field `flag' is not NULL, it points to a variable that is set + to the value given in the field `val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an `int' to + a compiled-in constant, such as set a value from `optarg', set the + option's `flag' field to zero and its `val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero `flag' field, `getopt' + returns the contents of the `val' field. */ + +struct option +{ +# if (defined __STDC__ && __STDC__) || defined __cplusplus + const char *name; +# else + char *name; +# endif + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; + +/* Names for the values of the `has_arg' field of `struct option'. */ + +# define no_argument 0 +# define required_argument 1 +# define optional_argument 2 +#endif /* need getopt */ + + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, `optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in `optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU `getopt'. + + The argument `--' causes premature termination of argument + scanning, explicitly telling `getopt' that there are no more + options. + + If OPTS begins with `--', then non-option arguments are treated as + arguments to the option '\0'. This behavior is specific to the GNU + `getopt'. */ + +#if (defined __STDC__ && __STDC__) || defined __cplusplus +# ifdef __GNU_LIBRARY__ +/* Many other libraries have conflicting prototypes for getopt, with + differences in the consts, in stdlib.h. To avoid compilation + errors, only prototype getopt for the GNU C library. */ +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); +# else /* not __GNU_LIBRARY__ */ +extern int getopt (); +# endif /* __GNU_LIBRARY__ */ + +# ifndef __need_getopt +extern int getopt_long (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind); +extern int getopt_long_only (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind); + +/* Internal only. Users should not call this directly. */ +extern int _getopt_internal (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only); +# endif +#else /* not __STDC__ */ +extern int getopt (); +# ifndef __need_getopt +extern int getopt_long (); +extern int getopt_long_only (); + +extern int _getopt_internal (); +# endif +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +/* Make sure we later can get all the definitions and declarations. */ +#undef __need_getopt + +#endif /* getopt.h */ + diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/main.cpp Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,777 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "monicone.xpm" + +#include "main.h" +#include "tools.h" +#include "TestSlaveGui.h" +extern "C" { + #include "canfestival.h" + #include "ObjDict.h" +} +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + + +wxTextCtrl *textLog; +int node_id_ext; +MyFrame *frame; +s_BOARD SlaveBoard = {NULL, NULL}; +char* LibraryPath = NULL; +double Gtime = 0; +double y[28][45]; +double hdelta = 0; +double old_max = 5; +double old_min = -5; + +// Declare some IDs. These are arbitrary. +const int BOOKCTRL = 100; +const int FILE_QUIT = wxID_EXIT; +const int HELP_ABOUT = wxID_ABOUT; +const int ADD = 105; +const int REMOVE = 108; +const int QUIT = 109; +const int FREQBOX = 110; +const int START = 112; +const int TEXTBOX1 = 113; +const int STOP = 114; +const int LOAD = 115; +const int INBT1 = 118; +const int INBT2 = 119; +const int INBT3 = 120; +const int INBT4 = 121; +const int INBT5 = 122; +const int INBT6 = 123; +const int INBT7 = 124; +const int INBT8 = 125; +const int INS1 = 126; +const int INS2 = 127; +const int INS3 = 128; +const int INS4 = 129; +const int INS5 = 135; +const int INS6 = 136; +const int INS7 = 137; +const int INS8 = 138; +const int TIMER_ID = 130; +const int INST1 = 131; +const int INST2 = 132; +const int INST3 = 133; +const int INST4 = 134; +const int INST5 = 135; +const int INST6 = 136; +const int INST7 = 137; +const int INST8 = 138; + +// Attach the event handlers. Put this after MyFrame declaration. +BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_BUTTON(STOP, MyFrame::OnStop) + EVT_BUTTON(LOAD, MyFrame::OnLoad) + EVT_BUTTON(START, MyFrame::OnStart) + EVT_TOGGLEBUTTON(INBT1, MyFrame::OnInbt1) + EVT_TOGGLEBUTTON(INBT2, MyFrame::OnInbt2) + EVT_TOGGLEBUTTON(INBT3, MyFrame::OnInbt3) + EVT_TOGGLEBUTTON(INBT4, MyFrame::OnInbt4) + EVT_TOGGLEBUTTON(INBT5, MyFrame::OnInbt5) + EVT_TOGGLEBUTTON(INBT6, MyFrame::OnInbt6) + EVT_TOGGLEBUTTON(INBT7, MyFrame::OnInbt7) + EVT_TOGGLEBUTTON(INBT8, MyFrame::OnInbt8) + EVT_COMMAND_SCROLL(INS1, MyFrame::OnIns1) + EVT_COMMAND_SCROLL(INS2, MyFrame::OnIns2) + EVT_COMMAND_SCROLL(INS3, MyFrame::OnIns3) + EVT_COMMAND_SCROLL(INS4, MyFrame::OnIns4) + EVT_COMMAND_SCROLL(INS5, MyFrame::OnIns5) + EVT_COMMAND_SCROLL(INS6, MyFrame::OnIns6) + EVT_COMMAND_SCROLL(INS7, MyFrame::OnIns7) + EVT_COMMAND_SCROLL(INS8, MyFrame::OnIns8) + EVT_SPINCTRL(INST1, MyFrame::OnInst1) + EVT_SPINCTRL(INST2, MyFrame::OnInst2) + EVT_SPINCTRL(INST3, MyFrame::OnInst3) + EVT_SPINCTRL(INST4, MyFrame::OnInst4) + EVT_SPINCTRL(INST5, MyFrame::OnInst5) + EVT_SPINCTRL(INST6, MyFrame::OnInst6) + EVT_SPINCTRL(INST7, MyFrame::OnInst7) + EVT_SPINCTRL(INST8, MyFrame::OnInst8) + + EVT_LISTBOX(FREQBOX, MyFrame::OnFreqBoxClick) + EVT_MENU(FILE_QUIT, MyFrame::OnQuit) + EVT_BUTTON(QUIT, MyFrame::OnQuit) + EVT_MENU(HELP_ABOUT, MyFrame::OnAbout) + EVT_PAINT(MyFrame::OnPaint) + + EVT_TIMER(TIMER_ID, MyFrame::OnTimer) +END_EVENT_TABLE() + +IMPLEMENT_APP(MyApp) + +bool MyApp::OnInit() +{ + frame = new MyFrame( _T("I-O simulator")); + frame->Show(true); + return true; +} + +MyFrame::MyFrame(const wxString& title) + : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(800, 740), wxDEFAULT_FRAME_STYLE, wxT("frame")) + ,m_timer(this, TIMER_ID) +{ + wxMenu *fileMenu = new wxMenu; + wxMenu *helpMenu = new wxMenu; + wxPanel *panel; + wxButton *quit; + wxButton *load; + wxBoxSizer *mysizer; + wxBoxSizer *mysssizer; + wxBoxSizer *myhsizer; + wxBoxSizer *mybsizer; + wxBoxSizer *myentrysizer; + wxListBox *freqlist; + wxStaticBox *namebox; + wxStaticBox *freqbox; + + SetIcon(wxICON(monicone)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); + helpMenu->Append(HELP_ABOUT, _T("&About...\tF1"), + _T("Show about dialog")); + fileMenu->Append(FILE_QUIT, _T("E&xit\tAlt-X"), + _T("Quit this program")); + wxMenuBar *menuBar = new wxMenuBar(); + menuBar->Append(fileMenu, _T("&File")); + menuBar->Append(helpMenu, _T("&Help")); + SetMenuBar(menuBar); + CreateStatusBar(2); + SetStatusText(_T("Lolitech."), 0); + SetStatusText(_T("Welcome."), 1); + + book = new wxNotebook(this, BOOKCTRL); + + panel = new wxPanel(book); + book->AddPage(panel, _T("Configuration"), true); + mysizer = new wxBoxSizer( wxVERTICAL ); + panel->SetSizer(mysizer); + wxString choices[] = + { + _T("10K"), _T("20K"), _T("50K"), _T("100K"), + _T("125K"), _T("250K"), _T("500K"), _T("1M") + }; + + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Bus driver")), wxHORIZONTAL ); + mysizer->Add(myhsizer, 0, wxEXPAND | wxALL, 5); + load = new wxButton( panel, LOAD, _T("Load can driver")); + myhsizer->Add(load, 0, wxLEFT, 5); + drivername = new wxTextCtrl(panel, wxID_ANY, _T("No driver loaded!!")); + myhsizer->Add(drivername, 1, wxEXPAND | wxALL, 5); + myentrysizer = new wxBoxSizer( wxHORIZONTAL ); + mysizer->Add(myentrysizer, 0, wxEXPAND | wxALL, 5); + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Bus name")), wxHORIZONTAL ); + myentrysizer->Add(myhsizer, 0, wxEXPAND | wxALL, 5); + busname = new wxTextCtrl(panel, wxID_ANY, _T("0")); + myhsizer->Add(busname, 0, wxLEFT, 5); + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Node ID (Hexa)")), wxHORIZONTAL ); + myentrysizer->Add(myhsizer, 0, wxEXPAND | wxALL, 5); + node_id = new wxSpinCtrl(panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 127, 1, _T("wxSpinCtrl")); + myhsizer->Add(node_id, 0, wxRIGHT, 5); + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Baudrate")), wxHORIZONTAL ); + mysizer->Add(myhsizer, wxEXPAND | wxALL, wxEXPAND | wxALL, 5); + freqlist = new wxListBox( panel, FREQBOX, wxDefaultPosition, wxDefaultSize, 8, choices, wxLB_SINGLE | wxLB_HSCROLL); + myhsizer->Add(freqlist, wxEXPAND | wxALL, wxEXPAND | wxALL, 5); + quit = new wxButton( panel, QUIT, _T("QUIT")); + mysizer->Add(quit, 0, wxALL, 5); + + + panel = new wxPanel(book); + book->AddPage(panel, wxT("Inputs"), true); + mysizer = new wxBoxSizer( wxVERTICAL ); + panel->SetSizer(mysizer); + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Read Inputs UNSIGNED8")), wxHORIZONTAL ); + mysizer->Add(myhsizer, 0, wxEXPAND | wxALL, 30); + inbt1 = new wxToggleButton(panel, INBT1, wxT("1")); + inbt2 = new wxToggleButton(panel, INBT2, wxT("2")); + inbt3 = new wxToggleButton(panel, INBT3, wxT("3")); + inbt4 = new wxToggleButton(panel, INBT4, wxT("4")); + inbt5 = new wxToggleButton(panel, INBT5, wxT("5")); + inbt6 = new wxToggleButton(panel, INBT6, wxT("6")); + inbt7 = new wxToggleButton(panel, INBT7, wxT("7")); + inbt8 = new wxToggleButton(panel, INBT8, wxT("8")); + myhsizer->Add(inbt1, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(inbt2, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(inbt3, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(inbt4, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(inbt5, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(inbt6, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(inbt7, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(inbt8, wxEXPAND | wxALL, 0, 5); + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Analogue Inputs INTEGER16")), wxVERTICAL ); + mysizer->Add(myhsizer, wxEXPAND | wxALL, wxEXPAND | wxALL, 30); + mysssizer = new wxBoxSizer( wxHORIZONTAL ); + myhsizer->Add(mysssizer, 0, wxEXPAND | wxALL, 0); + inst1 = new wxSpinCtrl(panel, INST1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -32768, 32767, 0, _T("0")); + inst2 = new wxSpinCtrl(panel, INST2, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -32768, 32767, 0, _T("0")); + inst3 = new wxSpinCtrl(panel, INST3, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -32768, 32767, 0, _T("0")); + inst4 = new wxSpinCtrl(panel, INST4, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -32768, 32767, 0, _T("0")); + inst5 = new wxSpinCtrl(panel, INST5, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -32768, 32767, 0, _T("0")); + inst6 = new wxSpinCtrl(panel, INST6, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -32768, 32767, 0, _T("0")); + inst7 = new wxSpinCtrl(panel, INST7, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -32768, 32767, 0, _T("0")); + inst8 = new wxSpinCtrl(panel, INST8, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -32768, 32767, 0, _T("0")); + mysssizer->Add(inst1, wxALL, 0, 5); + mysssizer->Add(inst2, wxALL, 0, 5); + mysssizer->Add(inst3, wxALL, 0, 5); + mysssizer->Add(inst4, wxALL, 0, 5); + mysssizer->Add(inst5, wxALL, 0, 5); + mysssizer->Add(inst6, wxALL, 0, 5); + mysssizer->Add(inst7, wxALL, 0, 5); + mysssizer->Add(inst8, wxALL, 0, 5); + mysssizer = new wxBoxSizer( wxHORIZONTAL ); + myhsizer->Add(mysssizer, wxEXPAND | wxALL, wxEXPAND | wxALL, 0); + ins1 = new wxSlider(panel, INS1, 0, -32768, 32767, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE, wxDefaultValidator, wxT("slider")); + ins2 = new wxSlider(panel, INS2, 0, -32768, 32767, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE, wxDefaultValidator, wxT("slider")); + ins3 = new wxSlider(panel, INS3, 0, -32768, 32767, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE, wxDefaultValidator, wxT("slider")); + ins4 = new wxSlider(panel, INS4, 0, -32768, 32767, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE, wxDefaultValidator, wxT("slider")); + ins5 = new wxSlider(panel, INS5, 0, -32768, 32767, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE, wxDefaultValidator, wxT("slider")); + ins6 = new wxSlider(panel, INS6, 0, -32768, 32767, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE, wxDefaultValidator, wxT("slider")); + ins7 = new wxSlider(panel, INS7, 0, -32768, 32767, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE, wxDefaultValidator, wxT("slider")); + ins8 = new wxSlider(panel, INS8, 0, -32768, 32767, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE, wxDefaultValidator, wxT("slider")); + mysssizer->Add(ins1, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + mysssizer->Add(ins2, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + mysssizer->Add(ins3, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + mysssizer->Add(ins4, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + mysssizer->Add(ins5, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + mysssizer->Add(ins6, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + mysssizer->Add(ins7, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + mysssizer->Add(ins8, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + quit = new wxButton( panel, QUIT, _T("QUIT")); + mysizer->Add(quit, 0, wxALL, 5); + + panel = new wxPanel(book); + book->AddPage(panel, wxT("Outputs"), true); + mysizer = new wxBoxSizer( wxVERTICAL ); + panel->SetSizer(mysizer); + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Write Outputs UNSIGNED8")), wxHORIZONTAL ); + mysizer->Add(myhsizer, 0, wxEXPAND | wxALL, 30); + outbt1 = new wxToggleButton(panel, wxID_ANY, wxT("1")); + outbt2 = new wxToggleButton(panel, wxID_ANY, wxT("2")); + outbt3 = new wxToggleButton(panel, wxID_ANY, wxT("3")); + outbt4 = new wxToggleButton(panel, wxID_ANY, wxT("4")); + outbt5 = new wxToggleButton(panel, wxID_ANY, wxT("5")); + outbt6 = new wxToggleButton(panel, wxID_ANY, wxT("6")); + outbt7 = new wxToggleButton(panel, wxID_ANY, wxT("7")); + outbt8 = new wxToggleButton(panel, wxID_ANY, wxT("8")); + myhsizer->Add(outbt1, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(outbt2, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(outbt3, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(outbt4, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(outbt5, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(outbt6, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(outbt7, wxEXPAND | wxALL, 0, 5); + myhsizer->Add(outbt8, wxEXPAND | wxALL, 0, 5); + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Analogue Output INTEGER16")), wxVERTICAL ); + mysizer->Add(myhsizer, wxEXPAND | wxALL, wxEXPAND | wxALL, 30); + mysssizer = new wxBoxSizer( wxHORIZONTAL ); + myhsizer->Add(mysssizer, 0, wxEXPAND | wxALL, 0); + outst1 = new wxStaticText(panel, wxID_ANY, wxT("label"), wxDefaultPosition, wxDefaultSize, 0, wxT("staticText")); + outst2 = new wxStaticText(panel, wxID_ANY, wxT("label"), wxDefaultPosition, wxDefaultSize, 0, wxT("staticText")); + outst3 = new wxStaticText(panel, wxID_ANY, wxT("label"), wxDefaultPosition, wxDefaultSize, 0, wxT("staticText")); + outst4 = new wxStaticText(panel, wxID_ANY, wxT("label"), wxDefaultPosition, wxDefaultSize, 0, wxT("staticText")); + mysssizer->Add(outst1, wxEXPAND | wxALL, wxEXPAND | wxALL, 5); + mysssizer->Add(outst2, wxEXPAND | wxALL, wxEXPAND | wxALL, 5); + mysssizer->Add(outst3, wxEXPAND | wxALL, wxEXPAND | wxALL, 5); + mysssizer->Add(outst4, wxEXPAND | wxALL, wxEXPAND | wxALL, 5); + mysssizer = new wxBoxSizer( wxHORIZONTAL ); + myhsizer->Add(mysssizer, wxEXPAND | wxALL, wxEXPAND | wxALL, 0); + outs1 = new wxGauge(panel, wxID_ANY, 65535, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE, wxDefaultValidator, wxT("gauge")); + outs2 = new wxGauge(panel, wxID_ANY, 65535, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE, wxDefaultValidator, wxT("gauge")); + outs3 = new wxGauge(panel, wxID_ANY, 65535, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE, wxDefaultValidator, wxT("gauge")); + outs4 = new wxGauge(panel, wxID_ANY, 65535, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE, wxDefaultValidator, wxT("gauge")); + mysssizer->Add(outs1, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + mysssizer->Add(outs2, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + mysssizer->Add(outs3, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + mysssizer->Add(outs4, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + quit = new wxButton( panel, QUIT, _T("QUIT")); + mysizer->Add(quit, 0, wxALL, 5); + + wxString choice[] = + { + _T("Analogue Out 1"), _T("Analogue Out 2"), + _T("Analogue Out 3"), _T("Analogue Out 4"), + _T("Bool Out 1"), _T("Bool Out 2"), + _T("Bool Out 3"), _T("Bool Out 4"), + _T("Bool Out 5"), _T("Bool Out 6"), + _T("Bool Out 7"), _T("Bool Out 8"), + _T("Analogue Input 1"), _T("Analogue Input 2"), + _T("Analogue Input 3"), _T("Analogue Input 4"), + _T("Analogue Input 5"), _T("Analogue Input 6"), + _T("Analogue Input 7"), _T("Analogue Input 8"), + _T("Bool Input 1"), _T("Bool Input 2"), + _T("Bool Input 3"), _T("Bool Input 4"), + _T("Bool Input 5"), _T("Bool Input 6"), + _T("Bool Input 7"), _T("Bool Input 8"), }; + panel = new wxPanel(book); + book->AddPage(panel, wxT("Graphic"), true); + mysizer = new wxBoxSizer( wxVERTICAL ); + panel->SetSizer(mysizer); + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Graphic")), wxVERTICAL ); + mysizer->Add(myhsizer, 0, wxEXPAND | wxALL, 10); + mygraphpan = new wxPanel(panel, wxID_ANY, wxDefaultPosition, wxSize(0, 350), wxTAB_TRAVERSAL, wxT("Graphic")); + myhsizer->Add(mygraphpan, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + echelle = new wxSlider(panel, wxID_ANY, 44, 44, 1000, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL , wxDefaultValidator, wxT("slider")); + myhsizer->Add(echelle, 0, wxEXPAND | wxALL, 0); + mybsizer = new wxBoxSizer( wxHORIZONTAL ); + mysizer->Add(mybsizer, wxEXPAND | wxALL, wxEXPAND | wxALL, 5); + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Select viewable Inputs")), wxHORIZONTAL ); + mybsizer->Add(myhsizer, wxEXPAND | wxALL, wxEXPAND | wxALL, 10); + inlist = new wxListBox( panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 28, choice, wxLB_EXTENDED | wxLB_HSCROLL); + myhsizer->Add(inlist, wxEXPAND | wxALL, wxEXPAND | wxALL, 5); + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Legende")), wxHORIZONTAL ); + mybsizer->Add(myhsizer, wxEXPAND | wxALL, wxEXPAND | wxALL, 10); + mylegpan = new wxPanel(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, wxT("Legende")); + myhsizer->Add(mylegpan, wxEXPAND | wxALL, wxEXPAND | wxALL, 15); + quit = new wxButton( panel, QUIT, _T("QUIT")); + mysizer->Add(quit, 0, wxALL, 5); + + panel = new wxPanel(book); + book->InsertPage(0, panel, wxT("Control"), true); + mysizer = new wxBoxSizer( wxVERTICAL ); + panel->SetSizer(mysizer); + myhsizer = new wxBoxSizer( wxHORIZONTAL ); + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Control your node")), wxHORIZONTAL ); + mysizer->Add(myhsizer, 0, wxALL, 5); + start = new wxButton( panel, START, _T("START")); + stop = new wxButton( panel, STOP, _T("STOP")); + stop->Enable(false); + myhsizer->Add(start, 0, wxRIGHT, 5); + myhsizer->Add(stop, 0, wxLEFT, 5); + myhsizer = new wxStaticBoxSizer( new wxStaticBox(panel, wxID_ANY, _T("Operation log")), wxHORIZONTAL ); + mysizer->Add(myhsizer, wxALL, wxEXPAND | wxALL, 5); + textLog = new wxTextCtrl( panel, TEXTBOX1, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE, wxDefaultValidator, wxTextCtrlNameStr); + myhsizer->Add(textLog, wxALL, wxEXPAND | wxALL, 5); + quit = new wxButton( panel, QUIT, _T("QUIT")); + mysizer->Add(quit, 0, wxALL, 5); + + for (int i= 0; i < 28; i++) + for (int j = 0; j < 44; j++) + y[i][j] = 0; + m_timer.Start(100); +} + +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) +{ + Close(true); +} + +void MyFrame::OnStart(wxCommandEvent& WXUNUSED(event)) +{ + wxString s; + + if (LibraryPath == NULL) + { + *textLog << wxT("No driver found!! ----------------------------------Initialization [KO]\n"); + return; + } + if (SlaveBoard.baudrate == NULL) + { + *textLog << wxT("No baudrate found!! ----------------------------------Initialization [KO]\n"); + return; + } + + node_id_ext = node_id->GetValue(); + s = busname->GetValue(); + SlaveBoard.busname = wxstr_to_charbuf(s); + *textLog << wxT("-- Bus name: ------> ") << s << wxT("\n"); + *textLog << wxT("-- Node ID: -------> ") << node_id->GetValue() << wxT("\n"); + + if (main_can(SlaveBoard, LibraryPath)) + { + printf("[KO]\n"); + *textLog << wxT("----------------------------------------------------Initialization [KO]\n"); + } + else + { + printf("[OK]\n"); + *textLog << wxT("----------------------------------------------------Initialization [OK]\n"); + stop->Enable(true); + start->Enable(false); + } +} + +void MyFrame::OnStop(wxCommandEvent& WXUNUSED(event)) +{ + + *textLog << wxT("----------------------------------------------------Slave [STOPPED]") << wxT("\n"); + stop_slave(); + stop->Enable(false); + start->Enable(true); + charbuf_free(SlaveBoard.busname); +} + +void MyFrame::OnLoad(wxCommandEvent& WXUNUSED(event)) +{ + wxFileDialog fd(this, wxT("Choose a node configuration file"), wxT(""), wxT("Slave.od"), wxT("*.so")); + + if(fd.ShowModal() == wxID_OK) + { + drivername->Clear(); + drivername->AppendText(fd.GetPath()); + *textLog << wxT("LibraryPath: ") << fd.GetPath() << wxT("\n"); + if (LibraryPath != NULL) + charbuf_free(LibraryPath); + LibraryPath = wxstr_to_charbuf(fd.GetPath()); + printf("path=%s",LibraryPath); + } +} + +void MyFrame::OnInbt1(wxCommandEvent& WXUNUSED(event)) +{ + Read_Inputs_8_Bit[0] = Read_Inputs_8_Bit[0] ^ 0x1; +} +void MyFrame::OnInbt2(wxCommandEvent& WXUNUSED(event)) +{ + Read_Inputs_8_Bit[0] = Read_Inputs_8_Bit[0] ^ 0x2; +} +void MyFrame::OnInbt3(wxCommandEvent& WXUNUSED(event)) +{ + Read_Inputs_8_Bit[0] = Read_Inputs_8_Bit[0] ^ 0x4; +} +void MyFrame::OnInbt4(wxCommandEvent& WXUNUSED(event)) +{ + Read_Inputs_8_Bit[0] = Read_Inputs_8_Bit[0] ^ 0x8; +} +void MyFrame::OnInbt5(wxCommandEvent& WXUNUSED(event)) +{ + Read_Inputs_8_Bit[0] = Read_Inputs_8_Bit[0] ^ 0x10; +} +void MyFrame::OnInbt6(wxCommandEvent& WXUNUSED(event)) +{ + Read_Inputs_8_Bit[0] = Read_Inputs_8_Bit[0] ^ 0x20; +} +void MyFrame::OnInbt7(wxCommandEvent& WXUNUSED(event)) +{ + Read_Inputs_8_Bit[0] = Read_Inputs_8_Bit[0] ^ 0x40; +} +void MyFrame::OnInbt8(wxCommandEvent& WXUNUSED(event)) +{ + Read_Inputs_8_Bit[0] = Read_Inputs_8_Bit[0] ^ 0x80; +} + + + +void MyFrame::OnIns1(wxScrollEvent &event) +{ + Read_Analogue_Input_16_Bit[0] = ins1->GetValue(); + inst1->SetValue(ins1->GetValue()); +} +void MyFrame::OnIns2(wxScrollEvent &event) +{ + Read_Analogue_Input_16_Bit[1] = ins2->GetValue(); + inst2->SetValue(ins2->GetValue()); +} +void MyFrame::OnIns3(wxScrollEvent &event) +{ + Read_Analogue_Input_16_Bit[2] = ins3->GetValue(); + inst3->SetValue(ins3->GetValue()); +} +void MyFrame::OnIns4(wxScrollEvent &event) +{ + Read_Analogue_Input_16_Bit[3] = ins4->GetValue(); + inst4->SetValue(ins4->GetValue()); +} +void MyFrame::OnIns5(wxScrollEvent &event) +{ + Read_Analogue_Input_16_Bit[4] = ins5->GetValue(); + inst5->SetValue(ins5->GetValue()); +} +void MyFrame::OnIns6(wxScrollEvent &event) +{ + Read_Analogue_Input_16_Bit[5] = ins6->GetValue(); + inst6->SetValue(ins6->GetValue()); +} +void MyFrame::OnIns7(wxScrollEvent &event) +{ + Read_Analogue_Input_16_Bit[6] = ins7->GetValue(); + inst7->SetValue(ins7->GetValue()); +} +void MyFrame::OnIns8(wxScrollEvent &event) +{ + Read_Analogue_Input_16_Bit[7] = ins8->GetValue(); + inst8->SetValue(ins8->GetValue()); +} + + +void MyFrame::OnInst1 ( wxSpinEvent &ev ) +{ + Read_Analogue_Input_16_Bit[0] = inst1->GetValue(); + ins1->SetValue(inst1->GetValue()); +} +void MyFrame::OnInst2 ( wxSpinEvent &ev ) +{ + Read_Analogue_Input_16_Bit[1] = inst2->GetValue(); + ins2->SetValue(inst2->GetValue()); +} +void MyFrame::OnInst3 ( wxSpinEvent &ev ) +{ + Read_Analogue_Input_16_Bit[2] = inst3->GetValue(); + ins3->SetValue(inst3->GetValue()); +} +void MyFrame::OnInst4 ( wxSpinEvent &ev ) +{ + Read_Analogue_Input_16_Bit[3] = inst4->GetValue(); + ins4->SetValue(inst4->GetValue()); +} +void MyFrame::OnInst5 ( wxSpinEvent &ev ) +{ + Read_Analogue_Input_16_Bit[4] = inst5->GetValue(); + ins5->SetValue(inst5->GetValue()); +} +void MyFrame::OnInst6 ( wxSpinEvent &ev ) +{ + Read_Analogue_Input_16_Bit[5] = inst6->GetValue(); + ins6->SetValue(inst6->GetValue()); +} +void MyFrame::OnInst7 ( wxSpinEvent &ev ) +{ + Read_Analogue_Input_16_Bit[6] = inst7->GetValue(); + ins7->SetValue(inst7->GetValue()); +} +void MyFrame::OnInst8 ( wxSpinEvent &ev ) +{ + Read_Analogue_Input_16_Bit[7] = inst8->GetValue(); + ins8->SetValue(inst8->GetValue()); +} + + +void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) +{ + wxString msg; + msg.Printf( _T("About.\n\n") + _T("Input-Output simulation by GRANDEMANGE Nicolas for CanFestival!!")); + + wxMessageBox(msg, _T("About !!!"), wxOK | wxICON_INFORMATION, this); +} + + +void MyFrame::OnFreqBoxClick( wxCommandEvent &event ) +{ + wxString wxstr; + + wxstr = event.GetString(); + if (SlaveBoard.baudrate != NULL) + charbuf_free(SlaveBoard.baudrate); + SlaveBoard.baudrate = wxstr_to_charbuf(wxstr); + *textLog << wxT("Baudrate:") << event.GetString() << wxT("\n"); +} + +static int is_set(int i, + wxListBox *inlist, + wxArrayInt in) +{ + inlist->GetSelections(in); + for (int j = 0; j < in.GetCount(); j++) + { + if (i == (in[j] + 1)) + { + return (i); + } + } + return (0); +} + +static int get_bit(UNS8 input, int bit) +{ + if (bit == 1) + return ((input & 0x1) ? 1 : 0); + if (bit == 2) + return ((input & 0x2) ? 1 : 0); + if (bit == 3) + return ((input & 0x4) ? 1 : 0); + if (bit == 4) + return ((input & 0x8) ? 1 : 0); + if (bit == 5) + return ((input & 0x10) ? 1 : 0); + if (bit == 6) + return ((input & 0x20) ? 1 : 0); + if (bit == 7) + return ((input & 0x40) ? 1 : 0); + if (bit == 8) + return ((input & 0x80) ? 1 : 0); + return 0; +} + +void MyFrame::Paint() +{ + double vmax = old_max; + double vmin = old_min; + double vdelta = vmax - vmin; + double vech = ((float)vdelta) / 10.0; + + double hmax = frame->echelle->GetValue(); + double hech = hdelta / 11; + + double d = 300 / vdelta; + double g = 0; + double top = 5; + double left = 50; + + double tmpi = 0; + wxString tmps; + double p = 0; + double q = 0; + int i = 0; + int j = 0; + wxColor col[8] = {wxColor("BLUE"), wxColor("RED"), wxColor("GREEN"), wxColor("GREY"), + wxColor("ORANGE"), wxColor("YELLOW"), wxColor("PINK"), wxColor("BLACK")}; + hdelta = hmax - 0; + g = (Gtime / hdelta) * 44.00; + + wxClientDC MonDc(mygraphpan); + MonDc.Clear(); + + MonDc.SetPen(wxPen(wxColour(200,200,200), 5, wxSOLID)); + MonDc.DrawRectangle((int) left, (int)top, 660, 300); + + MonDc.SetPen(wxPen(wxColor(150,200,150), 2, wxSOLID)); + MonDc.SetFont(wxFont(9, wxSWISS , wxNORMAL, wxNORMAL, false, wxT("Arial Black"))); + for (i=0; i < 11; i++) + { + tmpi = (vmin + (vech * i)); + tmps.Printf(wxT("%d"), (int)tmpi); + MonDc.DrawRotatedText(tmps, 0, (int)(293 - (30 * i) + top), 0); + } + for (i=0; i < 12; i++) + { + tmpi = (hech * i * 100); + if (tmpi < 1000) + tmps.Printf(wxT("%ims"), (int)tmpi); + if (tmpi > 1000) + tmps.Printf(wxT("%is"), (int)(tmpi / 1000)); + MonDc.DrawRotatedText(tmps, (int)((60 * i) + left) - 10, (int)(317 + top), 0); + } + for (j=1; j < 10; j++) + MonDc.DrawLine((int)left, (int)(300 - (30 * j) + top), (int)(left + 660), (int)(300 - (30 * j) + top)); + MonDc.SetPen(wxPen(wxColor(150,200,150), 2, wxSOLID)); + for (j=1; j < 22; j++) + MonDc.DrawLine((int)(30 * j + left), (int)(300 + top), (int)(30 * j + left), (int)(top)); + MonDc.SetPen(wxPen(wxColor(150,170,150), 1, wxSOLID)); + for (j=1; j < 22; j++) + MonDc.DrawLine((int)(30 * j + left - 15), (int)(300 + top), (int)(30 * j + left - 15), (int)(top)); + MonDc.DrawLine((int)(30 * 22 + left - 15), (int)(300 + top), (int)(30 * 22 + left - 15), (int)(top)); + + double m = (- vmin) * d; + MonDc.SetPen(wxPen(wxColor(170,170,150), 3, wxSOLID)); + MonDc.DrawLine((int)(left), (int)(300 + top - m), (int)(left + 660), (int)(300 + top - m)); + + wxClientDC MaLeg(mylegpan); + MaLeg.Clear(); + + MaLeg.SetPen(wxPen(wxColour(150,200,100), 2, wxSOLID)); + MaLeg.SetFont(wxFont(7, wxSWISS , wxNORMAL, wxNORMAL, false, wxT("Arial Black"))); + for (int k=1, tmpi = 0; k < 30; k++) + { + if ((tmpi < 8) && is_set(k, inlist, in)) + { + if (k <= 4) + tmps.Printf(wxT("Analogue Output %d"), k); + if ((k > 4) && (k <= 12)) + tmps.Printf(wxT("Bool Output %d"), k - 4); + if ((k > 12) && (k <= 20)) + tmps.Printf(wxT("Analogue Input %d"), k - 12); + if ((k > 20) && (k <= 28)) + tmps.Printf(wxT("Bool Input %d"), k - 20); + + MaLeg.DrawRotatedText(tmps, 0, 10 * tmpi , 0); + MaLeg.SetPen(wxPen(col[tmpi], 4, wxSOLID)); + MaLeg.DrawLine(100, 10 * tmpi + 6, 115, 10 * tmpi + 6); + //////////////////////////////////////////DAW//////////////////////////////////////// + MonDc.SetPen(wxPen(col[tmpi], 4, wxSOLID)); + if (k <= 4) + y[k - 1][(int)g] = Write_Analogue_Output_16_Bit[k - 1]; + if ((k > 4) && (k <= 12)) + y[k - 1][(int)g] = get_bit(Write_Outputs_8_Bit[0] ,k - 4); + if ((k > 12) && (k <= 20)) + y[k - 1][(int)g] = Read_Analogue_Input_16_Bit[k - 1 -12]; + if ((k > 20) && (k <= 28)) + y[k - 1][(int)g] = get_bit(Read_Inputs_8_Bit[0] ,k - 20); + + if (y[k - 1][(int)g] > old_max) + old_max = y[k - 1][(int)g]; + if (y[k - 1][(int)g] < old_min) + old_min = y[k - 1][(int)g]; + for (j=1; j < (g + 1) ; j++) + { + p = (y[k - 1][j - 1] - vmin) * d; + q = (y[k - 1][j ] - vmin) * d; + MonDc.DrawLine((int)(15 * (j - 1) + left), (int)(300 + top - p), (int)(15 * j + left), (int)(300 + top - q)); + } + ///////////////////////////////////////////////////////////////////////////////////// + tmpi++; + } + } +} + +void actu_output(void) +{ + wxString tmp; + + frame->outbt1->SetValue(get_bit(Write_Outputs_8_Bit[0], 1)); + frame->outbt2->SetValue(get_bit(Write_Outputs_8_Bit[0], 2)); + frame->outbt3->SetValue(get_bit(Write_Outputs_8_Bit[0], 3)); + frame->outbt4->SetValue(get_bit(Write_Outputs_8_Bit[0], 4)); + frame->outbt5->SetValue(get_bit(Write_Outputs_8_Bit[0], 5)); + frame->outbt6->SetValue(get_bit(Write_Outputs_8_Bit[0], 6)); + frame->outbt7->SetValue(get_bit(Write_Outputs_8_Bit[0], 7)); + frame->outbt8->SetValue(get_bit(Write_Outputs_8_Bit[0], 8)); + + frame->outs1->SetValue(Write_Analogue_Output_16_Bit[0] + 32768); + frame->outs2->SetValue(Write_Analogue_Output_16_Bit[1] + 32768); + frame->outs3->SetValue(Write_Analogue_Output_16_Bit[2] + 32768); + frame->outs4->SetValue(Write_Analogue_Output_16_Bit[3] + 32768); + tmp.Printf(wxT(" %i"), Write_Analogue_Output_16_Bit[0]); + frame->outst1->SetLabel(tmp); + tmp.Printf(wxT(" %i"), Write_Analogue_Output_16_Bit[1]); + frame->outst2->SetLabel(tmp); + tmp.Printf(wxT(" %i"), Write_Analogue_Output_16_Bit[2]); + frame->outst3->SetLabel(tmp); + tmp.Printf(wxT(" %i"), Write_Analogue_Output_16_Bit[3]); + frame->outst4->SetLabel(tmp); +} + +void actu(void) +{ + actu_output(); + + Gtime++; + if (Gtime > hdelta) + { + old_max = 5; + old_min = -5; + Gtime = 0; + } + frame->Paint(); +} + +void MyFrame::OnTimer(wxTimerEvent& event) +{ + actu();// do whatever you want to do every second here +} + +void MyFrame::OnPaint( wxPaintEvent &event ) +{ + //Paint(); +} diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/main.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/main.h Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,119 @@ +#ifndef MAIN_H_ +#define MAIN_H_ + +#include +#include +#include +#include +#include +#include +#include + +class MyApp : public wxApp { +public: + virtual bool OnInit(); +}; + +class MyFrame : public wxFrame { +public: + + wxNotebook *book; + wxButton *stop; + wxButton *start; + wxTextCtrl *busname; + wxSpinCtrl *inst1; + wxSpinCtrl *inst2; + wxSpinCtrl *inst3; + wxSpinCtrl *inst4; + wxSpinCtrl *inst5; + wxSpinCtrl *inst6; + wxSpinCtrl *inst7; + wxSpinCtrl *inst8; + wxTextCtrl *drivername; + wxSpinCtrl *node_id; + wxToggleButton *inbt1; + wxToggleButton *inbt2; + wxToggleButton *inbt3; + wxToggleButton *inbt4; + wxToggleButton *inbt5; + wxToggleButton *inbt6; + wxToggleButton *inbt7; + wxToggleButton *inbt8; + wxSlider *ins1; + wxSlider *ins2; + wxSlider *ins3; + wxSlider *ins4; + wxSlider *ins5; + wxSlider *ins6; + wxSlider *ins7; + wxSlider *ins8; + wxToggleButton *outbt1; + wxToggleButton *outbt2; + wxToggleButton *outbt3; + wxToggleButton *outbt4; + wxToggleButton *outbt5; + wxToggleButton *outbt6; + wxToggleButton *outbt7; + wxToggleButton *outbt8; + wxGauge *outs1; + wxGauge *outs2; + wxGauge *outs3; + wxGauge *outs4; + wxStaticText *outst1; + wxStaticText *outst2; + wxStaticText *outst3; + wxStaticText *outst4; + wxSlider *echelle; + wxPanel *mygraphpan; + wxPanel *mylegpan; + wxListBox *inlist; + wxArrayInt in; + wxTimer m_timer; + + MyFrame(const wxString& title); + + void OnListBoxDoubleClick( wxCommandEvent &event ); + void OnInbt1(wxCommandEvent& event); + void OnInbt2(wxCommandEvent& event); + void OnInbt3(wxCommandEvent& event); + void OnInbt4(wxCommandEvent& event); + void OnInbt5(wxCommandEvent& event); + void OnInbt6(wxCommandEvent& event); + void OnInbt7(wxCommandEvent& event); + void OnInbt8(wxCommandEvent& event); + void OnQuit(wxCommandEvent& event); + void OnAdd(wxCommandEvent& event); + void OnRemove(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + void OnStart(wxCommandEvent& WXUNUSED(event)); + void OnStop(wxCommandEvent& WXUNUSED(event)); + void OnFreqBoxClick(wxCommandEvent& WXUNUSED(event)); + void OnLoad(wxCommandEvent& WXUNUSED(event)); + void OnPaint(wxPaintEvent& WXUNUSED(event)); + void OnIns1(wxScrollEvent &event); + void OnIns2(wxScrollEvent &event); + void OnIns3(wxScrollEvent &event); + void OnIns4(wxScrollEvent &event); + void OnIns5(wxScrollEvent &event); + void OnIns6(wxScrollEvent &event); + void OnIns7(wxScrollEvent &event); + void OnIns8(wxScrollEvent &event); + void OnInst1( wxSpinEvent &ev ); + void OnInst2( wxSpinEvent &ev ); + void OnInst3( wxSpinEvent &ev ); + void OnInst4( wxSpinEvent &ev ); + void OnInst5( wxSpinEvent &ev ); + void OnInst6( wxSpinEvent &ev ); + void OnInst7( wxSpinEvent &ev ); + void OnInst8( wxSpinEvent &ev ); + void Paint(); + void OnTimer(wxTimerEvent& event); +private: + DECLARE_EVENT_TABLE() +}; + +void actu(void); +void actu_output(void); + + +#endif /*MAIN_H_*/ diff -r d43ebbed895f -r d635cfc520ee examples/DS401_Slave_Gui/monicone.xpm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/DS401_Slave_Gui/monicone.xpm Wed Aug 01 13:48:03 2007 +0200 @@ -0,0 +1,6339 @@ +/* XPM */ +static char * monicone_xpm[] = { +"127 126 6210 2", +" c None", +". c #020200", +"+ c #020500", +"@ c #000201", +"# c #000503", +"$ c #000102", +"% c #00080A", +"& c #000103", +"* c #000002", +"= c #000000", +"- c #000105", +"; c #000004", +"> c #020005", +", c #020003", +"' c #070005", +") c #000008", +"! c #00000A", +"~ c #000009", +"{ c #010007", +"] c #050007", +"^ c #060008", +"/ c #000016", +"( c #00000E", +"_ c #000010", +": c #000113", +"< c #010012", +"[ c #010010", +"} c #030011", +"| c #04000F", +"1 c #04000E", +"2 c #03000C", +"3 c #04000B", +"4 c #02000C", +"5 c #0B0C00", +"6 c #000117", +"7 c #000015", +"8 c #000724", +"9 c #000627", +"0 c #000525", +"a c #000524", +"b c #000421", +"c c #00011E", +"d c #00001D", +"e c #03001B", +"f c #020018", +"g c #000212", +"h c #000211", +"i c #000210", +"j c #00000F", +"k c #101300", +"l c #000200", +"m c #040500", +"n c #00011C", +"o c #000019", +"p c #000625", +"q c #000C36", +"r c #001045", +"s c #00124A", +"t c #000F43", +"u c #000C3C", +"v c #000D39", +"w c #000A37", +"x c #000632", +"y c #00032F", +"z c #00042A", +"A c #000523", +"B c #000420", +"C c #00041E", +"D c #000115", +"E c #000316", +"F c #000313", +"G c #000616", +"H c #080900", +"I c #080800", +"J c #010100", +"K c #000230", +"L c #000526", +"M c #000022", +"N c #00082F", +"O c #00113E", +"P c #00164E", +"Q c #001D67", +"R c #001B60", +"S c #001D5F", +"T c #001A5D", +"U c #001860", +"V c #001861", +"W c #001258", +"X c #000F4E", +"Y c #000D43", +"Z c #000935", +"` c #00082E", +" . c #000020", +".. c #000827", +"+. c #000622", +"@. c #00051B", +"#. c #000617", +"$. c #000315", +"%. c #010000", +"&. c #060500", +"*. c #030000", +"=. c #030300", +"-. c #00030E", +";. c #000933", +">. c #000D3B", +",. c #001249", +"'. c #001958", +"). c #001C58", +"!. c #002676", +"~. c #002678", +"{. c #00277A", +"]. c #002780", +"^. c #002680", +"/. c #002179", +"(. c #001D71", +"_. c #00186B", +":. c #001665", +"<. c #000939", +"[. c #000B3A", +"}. c #000027", +"|. c #000024", +"1. c #000629", +"2. c #000621", +"3. c #000013", +"4. c #00000D", +"5. c #010006", +"6. c #010002", +"7. c #000411", +"8. c #000E34", +"9. c #001654", +"0. c #001A5F", +"a. c #00226B", +"b. c #00246B", +"c. c #002572", +"d. c #002E8A", +"e. c #003398", +"f. c #003090", +"g. c #002D8E", +"h. c #002C8B", +"i. c #00298A", +"j. c #002888", +"k. c #002385", +"l. c #001D7C", +"m. c #001973", +"n. c #001156", +"o. c #000E53", +"p. c #000C40", +"q. c #000C3F", +"r. c #000936", +"s. c #000423", +"t. c #000018", +"u. c #00000B", +"v. c #030004", +"w. c #060004", +"x. c #040001", +"y. c #020001", +"z. c #000100", +"A. c #050800", +"B. c #030002", +"C. c #060007", +"D. c #020006", +"E. c #010005", +"F. c #000405", +"G. c #000403", +"H. c #00010E", +"I. c #000B35", +"J. c #001862", +"K. c #001E6F", +"L. c #00216F", +"M. c #002976", +"N. c #00307D", +"O. c #003684", +"P. c #004197", +"Q. c #00469F", +"R. c #004191", +"S. c #003A87", +"T. c #003F92", +"U. c #0044A2", +"V. c #0043A4", +"W. c #003894", +"X. c #002C7C", +"Y. c #00195C", +"Z. c #001C63", +"`. c #001F68", +" + c #001F64", +".+ c #001B56", +"++ c #00184C", +"@+ c #001645", +"#+ c #000D32", +"$+ c #000017", +"%+ c #01000E", +"&+ c #000007", +"*+ c #010004", +"=+ c #050004", +"-+ c #010700", +";+ c #030500", +">+ c #040400", +",+ c #060000", +"'+ c #000300", +")+ c #0C1700", +"!+ c #0E0200", +"~+ c #080000", +"{+ c #0C000A", +"]+ c #0C000F", +"^+ c #06000C", +"/+ c #06000E", +"(+ c #090013", +"_+ c #04000D", +":+ c #00030A", +"<+ c #000A0B", +"[+ c #000C09", +"}+ c #000B16", +"|+ c #000E3F", +"1+ c #001264", +"2+ c #001A6D", +"3+ c #00216C", +"4+ c #00317C", +"5+ c #00428D", +"6+ c #004E92", +"7+ c #005998", +"8+ c #00619A", +"9+ c #00679D", +"0+ c #0069A2", +"a+ c #0069A5", +"b+ c #0067A7", +"c+ c #005CA0", +"d+ c #004F91", +"e+ c #003F7A", +"f+ c #002654", +"g+ c #002851", +"h+ c #002C58", +"i+ c #003161", +"j+ c #003B72", +"k+ c #003C75", +"l+ c #003974", +"m+ c #003774", +"n+ c #002A5F", +"o+ c #001237", +"p+ c #000322", +"q+ c #000920", +"r+ c #000213", +"s+ c #040005", +"t+ c #000501", +"u+ c #000400", +"v+ c #000D00", +"w+ c #011600", +"x+ c #000500", +"y+ c #020D00", +"z+ c #020800", +"A+ c #070A00", +"B+ c #010300", +"C+ c #010C00", +"D+ c #140900", +"E+ c #040000", +"F+ c #01000B", +"G+ c #030010", +"H+ c #040012", +"I+ c #0D001A", +"J+ c #0A0018", +"K+ c #050016", +"L+ c #000314", +"M+ c #000511", +"N+ c #00131A", +"O+ c #001B31", +"P+ c #001E58", +"Q+ c #001F60", +"R+ c #002362", +"S+ c #00327E", +"T+ c #004B9F", +"U+ c #0058A7", +"V+ c #0070B8", +"W+ c #009BE8", +"X+ c #00B7FF", +"Y+ c #00B5F5", +"Z+ c #00AAE3", +"`+ c #00A1DA", +" @ c #009FDD", +".@ c #009FE5", +"+@ c #0093E4", +"@@ c #0085D4", +"#@ c #0061A9", +"$@ c #005595", +"%@ c #004C83", +"&@ c #004576", +"*@ c #004573", +"=@ c #003967", +"-@ c #003461", +";@ c #003765", +">@ c #002D5D", +",@ c #002149", +"'@ c #00163A", +")@ c #000C27", +"!@ c #000012", +"~@ c #000005", +"{@ c #050009", +"]@ c #06000A", +"^@ c #030009", +"/@ c #000308", +"(@ c #00080B", +"_@ c #000404", +":@ c #000502", +"<@ c #00130F", +"[@ c #000903", +"}@ c #000600", +"|@ c #000B03", +"1@ c #040700", +"2@ c #10000D", +"3@ c #000205", +"4@ c #000302", +"5@ c #000604", +"6@ c #00140F", +"7@ c #000E0A", +"8@ c #000609", +"9@ c #000D15", +"0@ c #010011", +"a@ c #0B001A", +"b@ c #10001E", +"c@ c #0C0022", +"d@ c #010021", +"e@ c #000726", +"f@ c #001633", +"g@ c #00274E", +"h@ c #004076", +"i@ c #004F8E", +"j@ c #005CA9", +"k@ c #0070C9", +"l@ c #007CDC", +"m@ c #008BED", +"n@ c #00A7F7", +"o@ c #00B8FB", +"p@ c #00B9F5", +"q@ c #00B1EB", +"r@ c #00AEE1", +"s@ c #00AFE3", +"t@ c #0092FF", +"u@ c #0081E0", +"v@ c #007ED4", +"w@ c #007ED0", +"x@ c #0067A8", +"y@ c #00487B", +"z@ c #002F5E", +"A@ c #002352", +"B@ c #00143D", +"C@ c #00072F", +"D@ c #040020", +"E@ c #040013", +"F@ c #06000D", +"G@ c #02000A", +"H@ c #02000E", +"I@ c #000B20", +"J@ c #00071D", +"K@ c #00031B", +"L@ c #000319", +"M@ c #00081C", +"N@ c #000B1B", +"O@ c #00020C", +"P@ c #000107", +"Q@ c #000A17", +"R@ c #00050F", +"S@ c #00040E", +"T@ c #00141D", +"U@ c #00101C", +"V@ c #000112", +"W@ c #000D1D", +"X@ c #000D16", +"Y@ c #001A1A", +"Z@ c #000F0B", +"`@ c #00130D", +" # c #001A1B", +".# c #000615", +"+# c #050018", +"@# c #0C0023", +"## c #07002A", +"$# c #001541", +"%# c #002D5B", +"&# c #004775", +"*# c #006E9F", +"=# c #006D99", +"-# c #007AB0", +";# c #009BE3", +"># c #008FD9", +",# c #007DC0", +"'# c #008BD4", +")# c #00A4F3", +"!# c #00ACFF", +"~# c #00A9FF", +"{# c #00A7FF", +"]# c #00B4FF", +"^# c #00C3FF", +"/# c #009DF7", +"(# c #006BAC", +"_# c #004C84", +":# c #003568", +"<# c #001B44", +"[# c #000F31", +"}# c #000118", +"|# c #02000F", +"1# c #00050A", +"2# c #000413", +"3# c #00162B", +"4# c #001C37", +"5# c #002044", +"6# c #00254E", +"7# c #002B5E", +"8# c #002F66", +"9# c #002B5D", +"0# c #002C5E", +"a# c #002652", +"b# c #001D3A", +"c# c #001023", +"d# c #000612", +"e# c #001E2C", +"f# c #002132", +"g# c #000C1E", +"h# c #001326", +"i# c #002137", +"j# c #001932", +"k# c #001E3F", +"l# c #002242", +"m# c #00162A", +"n# c #00232E", +"o# c #002524", +"p# c #00342F", +"q# c #001713", +"r# c #00090B", +"s# c #00021A", +"t# c #010026", +"u# c #000A39", +"v# c #001C4B", +"w# c #003C6E", +"x# c #0065A2", +"y# c #008BC3", +"z# c #00AAD1", +"A# c #00859F", +"B# c #007490", +"C# c #0089AF", +"D# c #0097CD", +"E# c #00A2E8", +"F# c #00A1F1", +"G# c #008CDD", +"H# c #00B1FF", +"I# c #00D5FF", +"J# c #00CFFF", +"K# c #00A6F1", +"L# c #008ACA", +"M# c #0081BE", +"N# c #008ED4", +"O# c #00A3FF", +"P# c #0067A9", +"Q# c #003C65", +"R# c #00132E", +"S# c #000619", +"T# c #00121E", +"U# c #00020B", +"V# c #00050C", +"W# c #00222A", +"X# c #003543", +"Y# c #004A65", +"Z# c #005E8D", +"`# c #005D94", +" $ c #005791", +".$ c #005A9E", +"+$ c #0064B0", +"@$ c #005CA4", +"#$ c #0060AB", +"$$ c #005FA3", +"%$ c #004E7F", +"&$ c #004363", +"*$ c #003649", +"=$ c #003C4B", +"-$ c #00394F", +";$ c #001124", +">$ c #00142C", +",$ c #003D5A", +"'$ c #004066", +")$ c #00436F", +"!$ c #003B6A", +"~$ c #003B64", +"{$ c #003858", +"]$ c #004D64", +"^$ c #005563", +"/$ c #005259", +"($ c #003E45", +"_$ c #002B35", +":$ c #00172B", +"<$ c #00102A", +"[$ c #001438", +"}$ c #002856", +"|$ c #004D7E", +"1$ c #0082BB", +"2$ c #00BDFF", +"3$ c #00CCFE", +"4$ c #00D9F8", +"5$ c #00EAFF", +"6$ c #00CDE7", +"7$ c #008FA9", +"8$ c #00607D", +"9$ c #00779A", +"0$ c #009AD4", +"a$ c #00B6FF", +"b$ c #009FF6", +"c$ c #00A5FF", +"d$ c #00B0DD", +"e$ c #00A6CB", +"f$ c #0093B7", +"g$ c #0095C2", +"h$ c #00B4F0", +"i$ c #00CAFF", +"j$ c #00AFF7", +"k$ c #00ADF3", +"l$ c #00A4E5", +"m$ c #008ABF", +"n$ c #005B79", +"o$ c #00374C", +"p$ c #001F2D", +"q$ c #00202A", +"r$ c #00333D", +"s$ c #005564", +"t$ c #00697D", +"u$ c #007492", +"v$ c #007EA8", +"w$ c #0081B4", +"x$ c #007AB6", +"y$ c #007BBE", +"z$ c #007FC8", +"A$ c #0092E7", +"B$ c #0090DF", +"C$ c #0081C7", +"D$ c #0070A6", +"E$ c #006F9C", +"F$ c #006384", +"G$ c #005369", +"H$ c #00495A", +"I$ c #003A50", +"J$ c #003147", +"K$ c #003544", +"L$ c #001F32", +"M$ c #004C63", +"N$ c #006A8D", +"O$ c #0074A4", +"P$ c #006291", +"Q$ c #005F92", +"R$ c #00619B", +"S$ c #005686", +"T$ c #00507A", +"U$ c #004B71", +"V$ c #004A69", +"W$ c #00405D", +"X$ c #003654", +"Y$ c #00304F", +"Z$ c #002C51", +"`$ c #002747", +" % c #003756", +".% c #006289", +"+% c #00A0C8", +"@% c #00DBFF", +"#% c #00F9FF", +"$% c #00E6FF", +"%% c #00EDFF", +"&% c #00D2E5", +"*% c #00C7DA", +"=% c #00CCE8", +"-% c #00BCD9", +";% c #0090AA", +">% c #00718D", +",% c #007191", +"'% c #0080A9", +")% c #0080AE", +"!% c #0085B7", +"~% c #0089BD", +"{% c #0090C4", +"]% c #0097C5", +"^% c #0098C6", +"/% c #009BB5", +"(% c #008484", +"_% c #00A19C", +":% c #00BCC2", +"<% c #00CCE4", +"[% c #00D8FF", +"}% c #00D4FF", +"|% c #00CEFF", +"1% c #00D2FF", +"2% c #00BBF1", +"3% c #00C3F6", +"4% c #00D9FF", +"5% c #00BFE8", +"6% c #0087A3", +"7% c #005567", +"8% c #003B4A", +"9% c #005B6E", +"0% c #007D95", +"a% c #008AA5", +"b% c #0082A1", +"c% c #0083A6", +"d% c #0092BF", +"e% c #009BCE", +"f% c #009CD7", +"g% c #00A9EB", +"h% c #00B0F7", +"i% c #00B0F8", +"j% c #00A5E6", +"k% c #008DC4", +"l% c #007AA6", +"m% c #007399", +"n% c #006F92", +"o% c #006788", +"p% c #004F71", +"q% c #002F46", +"r% c #003752", +"s% c #002643", +"t% c #002940", +"u% c #006C85", +"v% c #00829F", +"w% c #0090B7", +"x% c #008AB9", +"y% c #007DB1", +"z% c #007CB6", +"A% c #0083BF", +"B% c #0072AC", +"C% c #005E92", +"D% c #005489", +"E% c #004678", +"F% c #003F72", +"G% c #003760", +"H% c #00426D", +"I% c #003A5A", +"J% c #00627E", +"K% c #00AFCE", +"L% c #00DEF4", +"M% c #00E1F0", +"N% c #00F2FB", +"O% c #00F2FE", +"P% c #00F1FF", +"Q% c #00D6EE", +"R% c #00CCE3", +"S% c #00DDF2", +"T% c #00D3EA", +"U% c #00BDD4", +"V% c #00BFD5", +"W% c #009CB4", +"X% c #0095AC", +"Y% c #008BA1", +"Z% c #00859B", +"`% c #00899D", +" & c #0092A3", +".& c #009CAB", +"+& c #00A1A7", +"@& c #00DCCA", +"#& c #00FBE1", +"$& c #00FBF2", +"%& c #00E7ED", +"&& c #00E2F7", +"*& c #00DDFE", +"=& c #00DAFF", +"-& c #00E2FF", +";& c #00DCFF", +">& c #00CFF8", +",& c #00C6E9", +"'& c #00C1E3", +")& c #00CAF0", +"!& c #00A3C1", +"~& c #006C7F", +"{& c #005A70", +"]& c #007E9F", +"^& c #0088AC", +"/& c #008BAF", +"(& c #009EC8", +"_& c #00C4F7", +":& c #00BFF0", +"<& c #00B1E3", +"[& c #00CBFF", +"}& c #00E8FF", +"|& c #00BDF7", +"1& c #00A5DD", +"2& c #00A4DE", +"3& c #0087BA", +"4& c #0077A4", +"5& c #0073A2", +"6& c #006793", +"7& c #005A84", +"8& c #004466", +"9& c #003854", +"0& c #003A59", +"a& c #001E41", +"b& c #005C7D", +"c& c #007C99", +"d& c #009DBD", +"e& c #00AECF", +"f& c #00ABD3", +"g& c #00A3D4", +"h& c #009AD1", +"i& c #0097CE", +"j& c #009ED1", +"k& c #008BBC", +"l& c #0086C0", +"m& c #0076BB", +"n& c #005FA9", +"o& c #00529A", +"p& c #004B8B", +"q& c #005188", +"r& c #003B65", +"s& c #007FA1", +"t& c #00B4CE", +"u& c #00D0DC", +"v& c #00E6E9", +"w& c #00E2DB", +"x& c #00D4CC", +"y& c #00D4D5", +"z& c #00D6F7", +"A& c #00DEFF", +"B& c #00CDE5", +"C& c #00D7E7", +"D& c #00E9F2", +"E& c #00E4EA", +"F& c #00F3F4", +"G& c #00F5F4", +"H& c #00E4E0", +"I& c #00DED9", +"J& c #00EAE0", +"K& c #00F8EB", +"L& c #00F1DF", +"M& c #00DECC", +"N& c #00CEC2", +"O& c #00D6CE", +"P& c #00DFDD", +"Q& c #00CACB", +"R& c #00D4D6", +"S& c #00E1E8", +"T& c #00DBE7", +"U& c #00DDED", +"V& c #00D4EB", +"W& c #00CBE8", +"X& c #00C8E8", +"Y& c #00CDF2", +"Z& c #00C7EE", +"`& c #00C2E7", +" * c #00E1FF", +".* c #008FB0", +"+* c #006C96", +"@* c #0095CA", +"#* c #00C7FF", +"$* c #00F3FF", +"%* c #00C6F3", +"&* c #00D2F9", +"** c #00EBFF", +"=* c #00BFEA", +"-* c #00B0E1", +";* c #0087C3", +">* c #0079B7", +",* c #0075B8", +"'* c #006DAE", +")* c #006397", +"!* c #005C87", +"~* c #004D73", +"{* c #004160", +"]* c #00364E", +"^* c #002753", +"/* c #005D8B", +"(* c #0099CB", +"_* c #009EC3", +":* c #00A3C0", +"<* c #00B3D2", +"[* c #00C8F0", +"}* c #00B8F1", +"|* c #00A4D6", +"1* c #00A7D1", +"2* c #00A4D1", +"3* c #009CDA", +"4* c #0082CB", +"5* c #0074C8", +"6* c #006DC7", +"7* c #0061A5", +"8* c #005389", +"9* c #0092BE", +"0* c #00CFF1", +"a* c #00D7E6", +"b* c #00E6E7", +"c* c #00D1CC", +"d* c #00D9CC", +"e* c #00A298", +"f* c #009396", +"g* c #00A7CB", +"h* c #00B5E9", +"i* c #00C0E7", +"j* c #00D5F1", +"k* c #00F2FF", +"l* c #00F7FF", +"m* c #00F2F6", +"n* c #00E9EF", +"o* c #00F2FC", +"p* c #00F6FF", +"q* c #00E5F5", +"r* c #00C6D2", +"s* c #00B6C1", +"t* c #00BDC6", +"u* c #00C6DD", +"v* c #00BBE5", +"w* c #00F0FF", +"x* c #00F8FF", +"y* c #00E6F8", +"z* c #00D6DD", +"A* c #00D6D5", +"B* c #00D1CE", +"C* c #00A9AA", +"D* c #0095A0", +"E* c #007688", +"F* c #007691", +"G* c #00C0E5", +"H* c #00C8F1", +"I* c #007DAE", +"J* c #0079B3", +"K* c #00AAEB", +"L* c #00E7F9", +"M* c #00E0EE", +"N* c #00EBFB", +"O* c #00C5D9", +"P* c #00BFE5", +"Q* c #00B0F9", +"R* c #008FDC", +"S* c #007FCA", +"T* c #0071B8", +"U* c #006DA7", +"V* c #00618E", +"W* c #005C86", +"X* c #00567D", +"Y* c #003D58", +"Z* c #00405C", +"`* c #00356A", +" = c #00355F", +".= c #005787", +"+= c #0075A6", +"@= c #00ADDD", +"#= c #00B8DC", +"$= c #00C2DF", +"%= c #00CDEC", +"&= c #00E5FF", +"*= c #00DDFF", +"== c #00D3FF", +"-= c #00C6F0", +";= c #00B8E6", +">= c #00ADE7", +",= c #009CE9", +"'= c #0090EB", +")= c #007BCA", +"!= c #006CA7", +"~= c #0081B0", +"{= c #00EEFF", +"]= c #00EFF4", +"^= c #00E7E5", +"/= c #00B1AB", +"(= c #00726E", +"_= c #002B2C", +":= c #001621", +"<= c #005670", +"[= c #0080A6", +"}= c #00A4C7", +"|= c #00DBFC", +"1= c #00E1F5", +"2= c #00FDFF", +"3= c #00D0FF", +"4= c #00ABEE", +"5= c #0090D4", +"6= c #0081C4", +"7= c #0076B9", +"8= c #0075BB", +"9= c #0078C4", +"0= c #0072CE", +"a= c #0082DF", +"b= c #00ACF5", +"c= c #00FFFF", +"d= c #00F7F0", +"e= c #00D6C3", +"f= c #008D7D", +"g= c #003635", +"h= c #000C15", +"i= c #00091C", +"j= c #00364F", +"k= c #008EBB", +"l= c #00D0FC", +"m= c #00D2F2", +"n= c #00C6EB", +"o= c #00ACE8", +"p= c #0081BA", +"q= c #00D7CE", +"r= c #00CDFF", +"s= c #00AFF8", +"t= c #0099E7", +"u= c #0088CE", +"v= c #0076AD", +"w= c #0073A5", +"x= c #006591", +"y= c #00628C", +"z= c #004F70", +"A= c #003D55", +"B= c #003259", +"C= c #006EA8", +"D= c #0084BB", +"E= c #0089B5", +"F= c #00A7CD", +"G= c #00C5E7", +"H= c #00E9FF", +"I= c #00ECFF", +"J= c #00DFFF", +"K= c #00B4F1", +"L= c #009BE2", +"M= c #0089D5", +"N= c #0075B2", +"O= c #0077A9", +"P= c #00B4E2", +"Q= c #00D3F0", +"R= c #00D4E1", +"S= c #00FBFF", +"T= c #00E4E1", +"U= c #00B8BA", +"V= c #003B3F", +"W= c #00142A", +"X= c #00647F", +"Y= c #0089A5", +"Z= c #00C1E0", +"`= c #00D5F6", +" - c #00C4E5", +".- c #00E0FF", +"+- c #00D1FF", +"@- c #0090E6", +"#- c #0075D3", +"$- c #006ED7", +"%- c #0072EA", +"&- c #0074F7", +"*- c #0074F4", +"=- c #006DED", +"-- c #005EDE", +";- c #005AC7", +">- c #0077C8", +",- c #00B0F0", +"'- c #00C8B8", +")- c #00655A", +"!- c #00100E", +"~- c #000E15", +"{- c #00081A", +"]- c #000520", +"^- c #005174", +"/- c #00AAD3", +"(- c #00D0EC", +"_- c #009ACE", +":- c #008AB0", +"<- c #00BEFF", +"[- c #008DC5", +"}- c #0087BE", +"|- c #007CB1", +"1- c #006E9C", +"2- c #006995", +"3- c #005D83", +"4- c #004361", +"5- c #003E61", +"6- c #005B83", +"7- c #0092C6", +"8- c #00B8F2", +"9- c #00D4FD", +"0- c #00E4FF", +"a- c #00A6DF", +"b- c #0076A9", +"c- c #006A9F", +"d- c #006D9F", +"e- c #00B9DC", +"f- c #00E9FE", +"g- c #00D8E1", +"h- c #00EEEF", +"i- c #00C8CA", +"j- c #009CA9", +"k- c #002C3C", +"l- c #000723", +"m- c #00213F", +"n- c #00132B", +"o- c #006278", +"p- c #007B91", +"q- c #00C2EA", +"r- c #00BBEA", +"s- c #00B7F8", +"t- c #008AD1", +"u- c #0066B9", +"v- c #005CC3", +"w- c #0054D4", +"x- c #0054F0", +"y- c #0059FF", +"z- c #005DFF", +"A- c #0061FF", +"B- c #0063FF", +"C- c #0061EE", +"D- c #006ED0", +"E- c #007ABD", +"F- c #0099C6", +"G- c #00DCFA", +"H- c #00CFDE", +"I- c #006266", +"J- c #000B1A", +"K- c #000E26", +"L- c #005273", +"M- c #009EC5", +"N- c #00C1DA", +"O- c #00D2EB", +"P- c #00B2D1", +"Q- c #00C5EB", +"R- c #009CB0", +"S- c #00989F", +"T- c #009476", +"U- c #00D1F8", +"V- c #00ADD9", +"W- c #009ED5", +"X- c #0080B3", +"Y- c #007BAD", +"Z- c #0076A4", +"`- c #00658F", +" ; c #00658E", +".; c #005479", +"+; c #005880", +"@; c #003355", +"#; c #004B6B", +"$; c #007FAA", +"%; c #009FCC", +"&; c #00BDEA", +"*; c #00A7DC", +"=; c #007FB1", +"-; c #005C8A", +";; c #00618C", +">; c #00718F", +",; c #009AB3", +"'; c #00B9C5", +"); c #00DDE0", +"!; c #00D9DC", +"~; c #00D1DA", +"{; c #0096AD", +"]; c #005975", +"^; c #000F34", +"/; c #002B49", +"(; c #00748E", +"_; c #008DA7", +":; c #00A5C6", +"<; c #00B3DB", +"[; c #00A5D5", +"}; c #0090CD", +"|; c #006BAE", +"1; c #005CBC", +"2; c #004AC1", +"3; c #003AC5", +"4; c #0035CD", +"5; c #0038CD", +"6; c #003CCE", +"7; c #0046D5", +"8; c #004BDD", +"9; c #0044D3", +"0; c #0054DF", +"a; c #0063CE", +"b; c #006DBA", +"c; c #007BB2", +"d; c #009FD1", +"e; c #00C8FD", +"f; c #009FC9", +"g; c #003E56", +"h; c #000F29", +"i; c #000D2B", +"j; c #003856", +"k; c #00B0D6", +"l; c #00C2DB", +"m; c #00C6DC", +"n; c #00B0C2", +"o; c #0096A1", +"p; c #007178", +"q; c #004748", +"r; c #003330", +"s; c #002925", +"t; c #000E07", +"u; c #002019", +"v; c #003631", +"w; c #004943", +"x; c #007C7C", +"y; c #00DDEF", +"z; c #00A3D3", +"A; c #00A1DE", +"B; c #008CC1", +"C; c #0076A3", +"D; c #007CAD", +"E; c #006189", +"F; c #00628D", +"G; c #004E6F", +"H; c #002E44", +"I; c #00617D", +"J; c #008CAE", +"K; c #00B3DA", +"L; c #00BBDD", +"M; c #00C8E6", +"N; c #00C7E9", +"O; c #00B2DA", +"P; c #007397", +"Q; c #00557C", +"R; c #00436A", +"S; c #003E62", +"T; c #003555", +"U; c #002944", +"V; c #002335", +"W; c #00444E", +"X; c #005F65", +"Y; c #008C8E", +"Z; c #00A9AE", +"`; c #00DEF1", +" > c #00D0F1", +".> c #00B7E8", +"+> c #00709F", +"@> c #006690", +"#> c #00779D", +"$> c #009AC2", +"%> c #00B7E2", +"&> c #00AACF", +"*> c #008AAD", +"=> c #006B92", +"-> c #005481", +";> c #003C76", +">> c #002663", +",> c #001754", +"'> c #001450", +")> c #001A51", +"!> c #002155", +"~> c #002D5C", +"{> c #00346A", +"]> c #003587", +"^> c #003994", +"/> c #004698", +"(> c #005AA8", +"_> c #0064A9", +":> c #006EAB", +"<> c #0097DE", +"[> c #00CCFF", +"}> c #00B8FC", +"|> c #0091C2", +"1> c #0089B3", +"2> c #0091B6", +"3> c #00A4C9", +"4> c #00A8C5", +"5> c #00DDFC", +"6> c #00DCF2", +"7> c #00656A", +"8> c #003837", +"9> c #001313", +"0> c #000A0C", +"a> c #001218", +"b> c #000E16", +"c> c #00010B", +"d> c #000912", +"e> c #000E19", +"f> c #000A15", +"g> c #002630", +"h> c #00505B", +"i> c #00919F", +"j> c #00D4EC", +"k> c #00B5E7", +"l> c #00C9FF", +"m> c #0077A6", +"n> c #0088C0", +"o> c #006790", +"p> c #005981", +"q> c #006999", +"r> c #002A42", +"s> c #003D54", +"t> c #006482", +"u> c #008EB3", +"v> c #00A3C7", +"w> c #00FAFF", +"x> c #007184", +"y> c #00516E", +"z> c #004A6B", +"A> c #004668", +"B> c #003653", +"C> c #00263A", +"D> c #001D2D", +"E> c #001520", +"F> c #001017", +"G> c #00363D", +"H> c #005E68", +"I> c #008494", +"J> c #00BCDB", +"K> c #00D1F7", +"L> c #00CBF7", +"M> c #00C3F9", +"N> c #00BFF4", +"O> c #009BC1", +"P> c #006C88", +"Q> c #003953", +"R> c #002743", +"S> c #001935", +"T> c #000E2C", +"U> c #000823", +"V> c #000821", +"W> c #000C1D", +"X> c #000F1B", +"Y> c #001821", +"Z> c #002032", +"`> c #001F4C", +" , c #00215D", +"., c #001C57", +"+, c #003069", +"@, c #00437E", +"#, c #005590", +"$, c #0080C7", +"%, c #00B3FF", +"&, c #00CBEF", +"*, c #00C2D9", +"=, c #00BECF", +"-, c #00CADD", +";, c #006D72", +">, c #00120E", +",, c #000D06", +"', c #000805", +"), c #001214", +"!, c #000207", +"~, c #03000A", +"{, c #010009", +"], c #00000C", +"^, c #000F19", +"/, c #001E27", +"(, c #002229", +"_, c #004A53", +":, c #008F9C", +"<, c #00DAFA", +"[, c #00F4FF", +"}, c #00B5F3", +"|, c #00B1EA", +"1, c #0093C2", +"2, c #007DA7", +"3, c #0079A7", +"4, c #006C99", +"5, c #006795", +"6, c #00476A", +"7, c #00567B", +"8, c #005671", +"9, c #005469", +"0, c #003C4E", +"a, c #00597A", +"b, c #0078A6", +"c, c #0092C8", +"d, c #00A4DB", +"e, c #00D7FF", +"f, c #00FCFF", +"g, c #00535A", +"h, c #00394C", +"i, c #003241", +"j, c #003340", +"k, c #00313F", +"l, c #002C3A", +"m, c #002E3F", +"n, c #001F2F", +"o, c #001B2D", +"p, c #000F23", +"q, c #000719", +"r, c #003E4D", +"s, c #008A98", +"t, c #00BAC2", +"u, c #00EDF3", +"v, c #00D2FC", +"w, c #00BFF7", +"x, c #0096C6", +"y, c #006283", +"z, c #003F58", +"A, c #001A31", +"B, c #001629", +"C, c #001627", +"D, c #000E1E", +"E, c #00030F", +"F, c #00040D", +"G, c #00040C", +"H, c #00070E", +"I, c #001117", +"J, c #000415", +"K, c #000023", +"L, c #000330", +"M, c #000C37", +"N, c #001439", +"O, c #001536", +"P, c #002645", +"Q, c #004F73", +"R, c #0074A8", +"S, c #00B9FF", +"T, c #00CEF7", +"U, c #00EEF3", +"V, c #00E3D9", +"W, c #007B77", +"X, c #00211B", +"Y, c #000A00", +"Z, c #001005", +"`, c #000800", +" ' c #000F09", +".' c #00100F", +"+' c #00100D", +"@' c #00302E", +"#' c #003038", +"$' c #005262", +"%' c #00BCED", +"&' c #00E3FF", +"*' c #00C6F4", +"=' c #00B5DE", +"-' c #009AC0", +";' c #0082AB", +">' c #0075A7", +",' c #0076B0", +"'' c #006090", +")' c #005F89", +"!' c #007EA6", +"~' c #007995", +"{' c #007086", +"]' c #005E6E", +"^' c #00495C", +"/' c #006C93", +"(' c #0084BC", +"_' c #009ADC", +":' c #00A9ED", +"<' c #00635D", +"[' c #003034", +"}' c #00111E", +"|' c #002234", +"1' c #00353F", +"2' c #002732", +"3' c #001D2C", +"4' c #000215", +"5' c #000218", +"6' c #080016", +"7' c #020011", +"8' c #000A1C", +"9' c #001A27", +"0' c #005C64", +"a' c #00C5C5", +"b' c #00EAE4", +"c' c #00EFF1", +"d' c #007599", +"e' c #00475F", +"f' c #00283E", +"g' c #00172E", +"h' c #000E23", +"i' c #000517", +"j' c #00010C", +"k' c #000710", +"l' c #000D1A", +"m' c #001321", +"n' c #001120", +"o' c #00041B", +"p' c #00001E", +"q' c #000721", +"r' c #002036", +"s' c #003750", +"t' c #004769", +"u' c #005A89", +"v' c #009DD9", +"w' c #00FFFB", +"x' c #00AF9F", +"y' c #004039", +"z' c #00130B", +"A' c #000C08", +"B' c #00110F", +"C' c #00180D", +"D' c #00333C", +"E' c #002A3F", +"F' c #00648F", +"G' c #00B6FB", +"H' c #00D3FB", +"I' c #00C1E4", +"J' c #00ABD0", +"K' c #0097C1", +"L' c #007CB2", +"M' c #0071AB", +"N' c #006093", +"O' c #006594", +"P' c #0094C1", +"Q' c #0099BF", +"R' c #0087A2", +"S' c #00708A", +"T' c #006A8A", +"U' c #008694", +"V' c #007582", +"W' c #005C69", +"X' c #003E51", +"Y' c #006991", +"Z' c #007EB3", +"`' c #0096DA", +" ) c #00AAEF", +".) c #00C0FF", +"+) c #003D3B", +"@) c #001114", +"#) c #001422", +"$) c #002A45", +"%) c #001C30", +"&) c #001325", +"*) c #00071A", +"=) c #00020E", +"-) c #00131E", +";) c #000B13", +">) c #002C33", +",) c #00919C", +"') c #00DAE7", +")) c #00C7D1", +"!) c #006D78", +"~) c #00424C", +"{) c #000F1D", +"]) c #000919", +"^) c #000A1E", +"/) c #00091E", +"() c #00031A", +"_) c #00061D", +":) c #000C23", +"<) c #00112C", +"[) c #001632", +"}) c #001838", +"|) c #001537", +"1) c #000A30", +"2) c #000D3E", +"3) c #000E44", +"4) c #00093D", +"5) c #000F30", +"6) c #00112E", +"7) c #002544", +"8) c #003659", +"9) c #003961", +"0) c #00527A", +"a) c #009BC0", +"b) c #00DCF7", +"c) c #00B5B5", +"d) c #007771", +"e) c #001B19", +"f) c #000505", +"g) c #110002", +"h) c #00040F", +"i) c #000109", +"j) c #00202F", +"k) c #003B5D", +"l) c #0092D0", +"m) c #00D9FC", +"n) c #00C9E8", +"o) c #00BADF", +"p) c #00A4D2", +"q) c #006396", +"r) c #004D7A", +"s) c #007FA4", +"t) c #008CAC", +"u) c #0089A6", +"v) c #008AAA", +"w) c #006889", +"x) c #006385", +"y) c #007979", +"z) c #007474", +"A) c #009494", +"B) c #007D80", +"C) c #004C55", +"D) c #003142", +"E) c #005E80", +"F) c #006D9C", +"G) c #0085C2", +"H) c #0099D7", +"I) c #00ABE7", +"J) c #00C1F8", +"K) c #006564", +"L) c #001415", +"M) c #00151B", +"N) c #001322", +"O) c #000B1E", +"P) c #000E17", +"Q) c #00161B", +"R) c #001E22", +"S) c #001D23", +"T) c #001B22", +"U) c #00505D", +"V) c #008AA4", +"W) c #006374", +"X) c #001D1E", +"Y) c #000E0E", +"Z) c #000A10", +"`) c #000E1B", +" ! c #000A24", +".! c #000927", +"+! c #00092C", +"@! c #000E32", +"#! c #00143E", +"$! c #001B4B", +"%! c #002150", +"&! c #002055", +"*! c #002059", +"=! c #001E55", +"-! c #000B4A", +";! c #001C62", +">! c #001565", +",! c #00195A", +"'! c #001E4A", +")! c #000A2F", +"!! c #00153C", +"~! c #001D48", +"{! c #001A41", +"]! c #005573", +"^! c #00777F", +"/! c #005252", +"(! c #000D12", +"_! c #0C0009", +":! c #010016", +"~ c #005370", +",~ c #00EFFF", +"'~ c #00C8F5", +")~ c #006FA0", +"!~ c #005B8A", +"~~ c #005581", +"{~ c #00486D", +"]~ c #008EB6", +"^~ c #0095B6", +"/~ c #00BFF9", +"(~ c #009ECB", +"_~ c #00697F", +":~ c #00525B", +"<~ c #00646C", +"[~ c #008C98", +"}~ c #00818A", +"|~ c #009CA5", +"1~ c #008E97", +"2~ c #004A58", +"3~ c #003C4F", +"4~ c #00506F", +"5~ c #00658D", +"6~ c #008BC4", +"7~ c #0096CF", +"8~ c #00AEE6", +"9~ c #00B1DF", +"0~ c #00AFD4", +"a~ c #00222C", +"b~ c #00121A", +"c~ c #00020F", +"d~ c #00181D", +"e~ c #002F28", +"f~ c #002820", +"g~ c #001E18", +"h~ c #001414", +"i~ c #002035", +"j~ c #001E3D", +"k~ c #00110B", +"l~ c #000B0F", +"m~ c #000717", +"n~ c #000E48", +"o~ c #001E62", +"p~ c #003081", +"q~ c #003487", +"r~ c #003692", +"s~ c #003696", +"t~ c #003397", +"u~ c #003BA3", +"v~ c #0049BB", +"w~ c #0043B1", +"x~ c #00379E", +"y~ c #003193", +"z~ c #00388C", +"A~ c #00347C", +"B~ c #002A66", +"C~ c #002259", +"D~ c #00154B", +"E~ c #001E50", +"F~ c #000E30", +"G~ c #00455C", +"H~ c #004D5F", +"I~ c #002A38", +"J~ c #070011", +"K~ c #000A2B", +"L~ c #000C2C", +"M~ c #000C2B", +"N~ c #002133", +"O~ c #002A41", +"P~ c #004857", +"Q~ c #00C5F7", +"R~ c #0093C4", +"S~ c #0072A4", +"T~ c #006194", +"U~ c #00557F", +"V~ c #003B5C", +"W~ c #00799C", +"X~ c #008BA8", +"Y~ c #00A5D2", +"Z~ c #00819C", +"`~ c #00374E", +" { c #005872", +".{ c #0085A4", +"+{ c #00718E", +"@{ c #004052", +"#{ c #003B4F", +"${ c #004D6D", +"%{ c #006188", +"&{ c #0075A8", +"*{ c #009CD8", +"={ c #00AAE6", +"-{ c #00B7EC", +";{ c #00B2E4", +">{ c #0089A9", +",{ c #002431", +"'{ c #001B26", +"){ c #000A14", +"!{ c #05000B", +"~{ c #100010", +"{{ c #020016", +"]{ c #001F1A", +"^{ c #001213", +"/{ c #001722", +"({ c #001E30", +"_{ c #00223F", +":{ c #00051D", +"<{ c #00040B", +"[{ c #00090E", +"}{ c #000816", +"|{ c #000836", +"1{ c #000D4D", +"2{ c #001967", +"3{ c #002378", +"4{ c #003192", +"5{ c #003CA2", +"6{ c #003FA2", +"7{ c #0042A2", +"8{ c #0040A5", +"9{ c #003C9E", +"0{ c #003B9A", +"a{ c #0043AD", +"b{ c #0056CA", +"c{ c #0053C4", +"d{ c #0046B9", +"e{ c #0044B2", +"f{ c #0045A4", +"g{ c #003D8A", +"h{ c #003074", +"i{ c #002365", +"j{ c #001456", +"k{ c #00184F", +"l{ c #002C4F", +"m{ c #00425E", +"n{ c #004659", +"o{ c #003244", +"p{ c #000A23", +"q{ c #00070D", +"r{ c #000414", +"s{ c #00162C", +"t{ c #001A35", +"u{ c #001E3E", +"v{ c #001F41", +"w{ c #001C36", +"x{ c #002038", +"y{ c #00233A", +"z{ c #002639", +"A{ c #002535", +"B{ c #002938", +"C{ c #001927", +"D{ c #005A62", +"E{ c #00BBEE", +"F{ c #0096CC", +"G{ c #0076AC", +"H{ c #006495", +"I{ c #005178", +"J{ c #00445F", +"K{ c #006F90", +"L{ c #00839F", +"M{ c #009BBB", +"N{ c #00A2C6", +"O{ c #00A1CB", +"P{ c #00B1DA", +"Q{ c #0092AD", +"R{ c #00747E", +"S{ c #003A54", +"T{ c #00445E", +"U{ c #005C89", +"V{ c #003A56", +"W{ c #003B55", +"X{ c #004D70", +"Y{ c #006D9B", +"Z{ c #008BC2", +"`{ c #00A4DD", +" ] c #009DCD", +".] c #008FBA", +"+] c #005974", +"@] c #000613", +"#] c #09000C", +"$] c #000A13", +"%] c #000C13", +"&] c #00090D", +"*] c #001C27", +"=] c #003E5D", +"-] c #001D33", +";] c #001122", +">] c #000516", +",] c #000320", +"'] c #000D37", +")] c #001051", +"!] c #001971", +"~] c #00278E", +"{] c #0034A5", +"]] c #0041B6", +"^] c #004DC1", +"/] c #004CB9", +"(] c #004CB2", +"_] c #004AAE", +":] c #00419A", +"<] c #003A92", +"[] c #0047A8", +"}] c #0061D3", +"|] c #005FD2", +"1] c #005AD5", +"2] c #005FE3", +"3] c #0061D4", +"4] c #004CA5", +"5] c #003781", +"6] c #00276B", +"7] c #001A60", +"8] c #001E5B", +"9] c #002E53", +"0] c #003C56", +"a] c #005165", +"b] c #004258", +"c] c #00021E", +"d] c #000910", +"e] c #001216", +"f] c #001521", +"g] c #001E37", +"h] c #002B4E", +"i] c #00345B", +"j] c #003A60", +"k] c #003957", +"l] c #003C55", +"m] c #003F55", +"n] c #003442", +"o] c #00B7EE", +"p] c #009CD6", +"q] c #007EB4", +"r] c #006493", +"s] c #002039", +"t] c #004256", +"u] c #006780", +"v] c #00849D", +"w] c #00AED6", +"x] c #008CA2", +"y] c #006B77", +"z] c #004655", +"A] c #005A74", +"B] c #004A81", +"C] c #00385F", +"D] c #003351", +"E] c #004C71", +"F] c #005980", +"G] c #007AA5", +"H] c #0094C8", +"I] c #0084AF", +"J] c #0080AA", +"K] c #007EA7", +"L] c #00536D", +"M] c #002034", +"N] c #001625", +"O] c #07000B", +"P] c #0A0009", +"Q] c #010008", +"R] c #000D14", +"S] c #00171C", +"T] c #001A1C", +"U] c #000B0C", +"V] c #00030C", +"W] c #002635", +"X] c #006376", +"Y] c #005F79", +"Z] c #002948", +"`] c #001B43", +" ^ c #001443", +".^ c #001650", +"+^ c #001E74", +"@^ c #002689", +"#^ c #002B91", +"$^ c #003BAB", +"%^ c #0048B7", +"&^ c #0052C2", +"*^ c #0057C7", +"=^ c #005CCB", +"-^ c #005BC6", +";^ c #004BA7", +">^ c #0048A1", +",^ c #005DC8", +"'^ c #0064CE", +")^ c #0073EE", +"!^ c #0073FC", +"~^ c #006CEF", +"{^ c #007AFF", +"]^ c #003D85", +"^^ c #00337E", +"/^ c #00236A", +"(^ c #001F52", +"_^ c #00375E", +":^ c #006A85", +"<^ c #005D78", +"[^ c #000D29", +"}^ c #001013", +"|^ c #000F0A", +"1^ c #001010", +"2^ c #00151C", +"3^ c #001220", +"4^ c #001429", +"5^ c #002D50", +"6^ c #00365E", +"7^ c #004470", +"8^ c #00456B", +"9^ c #003B5B", +"0^ c #005371", +"a^ c #003E52", +"b^ c #007783", +"c^ c #00C5BF", +"d^ c #00A8DA", +"e^ c #008EC0", +"f^ c #0079AB", +"g^ c #006491", +"h^ c #003F5E", +"i^ c #002237", +"j^ c #003542", +"k^ c #00677C", +"l^ c #0081A0", +"m^ c #0096B8", +"n^ c #009EBF", +"o^ c #007285", +"p^ c #005E66", +"q^ c #007789", +"r^ c #00708C", +"s^ c #008DDC", +"t^ c #00589A", +"u^ c #003762", +"v^ c #003254", +"w^ c #00466C", +"x^ c #006990", +"y^ c #0081A8", +"z^ c #006583", +"A^ c #005472", +"B^ c #003246", +"C^ c #001523", +"D^ c #000D17", +"E^ c #030007", +"F^ c #00060C", +"G^ c #000F12", +"H^ c #000D11", +"I^ c #001E20", +"J^ c #001A19", +"K^ c #00211F", +"L^ c #000E0F", +"M^ c #16000A", +"N^ c #0B000C", +"O^ c #001926", +"P^ c #003844", +"Q^ c #00A0B0", +"R^ c #00839E", +"S^ c #004D7B", +"T^ c #002E65", +"U^ c #002865", +"V^ c #002D79", +"W^ c #003298", +"X^ c #0036A2", +"Y^ c #003CAE", +"Z^ c #0048C0", +"`^ c #0051C8", +" / c #005ACE", +"./ c #005CC2", +"+/ c #005DC0", +"@/ c #0052AD", +"#/ c #0059B7", +"$/ c #0069D2", +"%/ c #006FDD", +"&/ c #0094FF", +"*/ c #007FFF", +"=/ c #0068D0", +"-/ c #0065C7", +";/ c #004D9F", +">/ c #003B86", +",/ c #002B70", +"'/ c #001D51", +")/ c #004870", +"!/ c #004D68", +"~/ c #007C94", +"{/ c #0086A7", +"]/ c #002F4D", +"^/ c #000D26", +"// c #000C11", +"(/ c #000D13", +"_/ c #000F1C", +":/ c #001E44", +"( c #006D89", +",( c #00A1BC", +"'( c #0092AC", +")( c #006086", +"!( c #00102B", +"~( c #001823", +"{( c #00080E", +"]( c #000B34", +"^( c #004290", +"/( c #003566", +"(( c #004376", +"_( c #00578C", +":( c #004465", +"<( c #007090", +"[( c #00BDDE", +"}( c #00D4E3", +"|( c #00CAD7", +"1( c #00A0B8", +"2( c #008DAA", +"3( c #008BB2", +"4( c #00779B", +"5( c #00739A", +"6( c #00324A", +"7( c #001026", +"8( c #000D25", +"9( c #00061E", +"0( c #003249", +"a( c #007595", +"b( c #006781", +"c( c #006F8D", +"d( c #007773", +"e( c #009EA1", +"f( c #008996", +"g( c #0095B3", +"h( c #007AA2", +"i( c #00436C", +"j( c #004575", +"k( c #00224F", +"l( c #00375F", +"m( c #005C7B", +"n( c #006680", +"o( c #006177", +"p( c #00657A", +"q( c #006984", +"r( c #002933", +"s( c #001518", +"t( c #000F13", +"u( c #001014", +"v( c #000106", +"w( c #0A0007", +"x( c #000F1E", +"y( c #002735", +"z( c #008C9D", +"A( c #00B1BE", +"B( c #00BCD7", +"C( c #008FCA", +"D( c #0067AE", +"E( c #00579F", +"F( c #0055A6", +"G( c #0055B2", +"H( c #0056C3", +"I( c #0057C6", +"J( c #0053BB", +"K( c #005AC4", +"L( c #005AC0", +"M( c #005BB7", +"N( c #0053A6", +"O( c #004388", +"P( c #003369", +"Q( c #002C59", +"R( c #002E5F", +"S( c #003F80", +"T( c #0051A5", +"U( c #005FD0", +"V( c #0062D0", +"W( c #0072E1", +"X( c #0078E3", +"Y( c #0068D2", +"Z( c #004BA1", +"`( c #00417B", +" _ c #003861", +"._ c #00BFDA", +"+_ c #009BB3", +"@_ c #008EB9", +"#_ c #003E5B", +"$_ c #00051E", +"%_ c #002554", +"&_ c #00376C", +"*_ c #00487E", +"=_ c #004E7D", +"-_ c #004E74", +";_ c #005A79", +">_ c #0081A3", +",_ c #00E1F7", +"'_ c #008EAE", +")_ c #00708D", +"!_ c #006D86", +"~_ c #005A72", +"{_ c #000F27", +"]_ c #00233C", +"^_ c #000323", +"/_ c #000F32", +"(_ c #000A27", +"__ c #00435E", +":_ c #006D92", +"<_ c #007679", +"[_ c #007C85", +"}_ c #0090A4", +"|_ c #007B9A", +"1_ c #005678", +"2_ c #001740", +"3_ c #003A6A", +"4_ c #002F63", +"5_ c #001345", +"6_ c #00234F", +"7_ c #005580", +"8_ c #005E7C", +"9_ c #006072", +"0_ c #006979", +"a_ c #0091A5", +"b_ c #004450", +"c_ c #001315", +"d_ c #000B0B", +"e_ c #001617", +"f_ c #001115", +"g_ c #001C22", +"h_ c #00161D", +"i_ c #000309", +"j_ c #02000B", +"k_ c #00111F", +"l_ c #000D1E", +"m_ c #006579", +"n_ c #0090A6", +"o_ c #00B1C7", +"p_ c #00B4D3", +"q_ c #00A7E1", +"r_ c #008CCE", +"s_ c #006FAD", +"t_ c #0064A8", +"u_ c #006BC3", +"v_ c #0065C1", +"w_ c #0055AF", +"x_ c #0057B7", +"y_ c #004FA7", +"z_ c #00458E", +"A_ c #00366E", +"B_ c #001847", +"C_ c #000832", +"D_ c #000E2F", +"E_ c #000325", +"F_ c #002354", +"G_ c #003787", +"H_ c #0059CB", +"I_ c #006BDA", +"J_ c #006DD3", +"K_ c #006BD0", +"L_ c #006AD5", +"M_ c #003A75", +"N_ c #0077A5", +"O_ c #00A1C2", +"P_ c #00B7D0", +"Q_ c #00BDD7", +"R_ c #0099C0", +"S_ c #007298", +"T_ c #002139", +"U_ c #000E21", +"V_ c #001C2E", +"W_ c #000E28", +"X_ c #001538", +"Y_ c #002651", +"Z_ c #004C7E", +"`_ c #004E76", +" : c #005675", +".: c #0088AA", +"+: c #00ABC4", +"@: c #006877", +"#: c #000731", +"$: c #03002D", +"%: c #000334", +"&: c #001844", +"*: c #000A2E", +"=: c #005685", +"-: c #00596B", +";: c #006F91", +">: c #004666", +",: c #001940", +"': c #00447B", +"): c #00093E", +"!: c #00205B", +"~: c #00255B", +"{: c #002A59", +"]: c #00476C", +"^: c #00556E", +"/: c #007385", +"(: c #00A1AF", +"_: c #004445", +":: c #000E0C", +"<: c #001614", +"[: c #000A0E", +"}: c #000B11", +"|: c #00121F", +"1: c #00101B", +"2: c #000712", +"3: c #00030B", +"4: c #000610", +"5: c #000C19", +"6: c #004C5B", +"7: c #00849E", +"8: c #009AB7", +"9: c #00B3D4", +"0: c #00B8EB", +"a: c #00A5DF", +"b: c #0083B7", +"c: c #0078B4", +"d: c #0082D2", +"e: c #006CB9", +"f: c #00569E", +"g: c #005AAB", +"h: c #00478D", +"i: c #003064", +"j: c #001C46", +"k: c #001034", +"l: c #000222", +"m: c #00001C", +"n: c #00041D", +"o: c #00041F", +"p: c #000321", +"q: c #000931", +"r: c #001950", +"s: c #003079", +"t: c #0057B9", +"u: c #006AD1", +"v: c #0069CE", +"w: c #006CD7", +"x: c #0054A9", +"y: c #00599C", +"z: c #00A0D8", +"A: c #00AED0", +"B: c #00B0C4", +"C: c #00B6CE", +"D: c #00ACD2", +"E: c #0093BD", +"F: c #007699", +"G: c #00455E", +"H: c #001025", +"I: c #00192A", +"J: c #001C35", +"K: c #00213E", +"L: c #00345C", +"M: c #00416A", +"N: c #002A4B", +"O: c #004D6A", +"P: c #009FC1", +"Q: c #005C67", +"R: c #00073B", +"S: c #090043", +"T: c #010035", +"U: c #000B43", +"V: c #001A44", +"W: c #002344", +"X: c #003055", +"Y: c #00204A", +"Z: c #002661", +"`: c #002069", +" < c #001C64", +".< c #002575", +"+< c #00386B", +"@< c #004064", +"#< c #00A5B8", +"$< c #004C48", +"%< c #001A17", +"&< c #000509", +"*< c #030012", +"=< c #00080C", +"-< c #001B20", +";< c #007B8C", +">< c #008CA5", +",< c #00A9D3", +"'< c #00BAE4", +")< c #00C0EC", +"!< c #00A6D5", +"~< c #0091C3", +"{< c #0091D1", +"]< c #0088D3", +"^< c #006EB5", +"/< c #005697", +"(< c #002F5A", +"_< c #000B2F", +":< c #020013", +"<< c #0B0012", +"[< c #07000E", +"}< c #080018", +"|< c #000123", +"1< c #00002C", +"2< c #000740", +"3< c #004294", +"4< c #006BDC", +"5< c #0071E3", +"6< c #0065CA", +"7< c #0056AD", +"8< c #0076CA", +"9< c #009FDA", +"0< c #00B4D8", +"a< c #00B9CE", +"b< c #00A2B9", +"c< c #009DC6", +"d< c #0090B6", +"e< c #007E9E", +"f< c #00647E", +"g< c #004255", +"h< c #001C2A", +"i< c #001622", +"j< c #001727", +"k< c #001D2F", +"l< c #001E34", +"m< c #005E77", +"n< c #00A7C1", +"o< c #00E3E3", +"p< c #00C9C7", +"q< c #004D67", +"r< c #003265", +"s< c #000A47", +"t< c #00003D", +"u< c #070044", +"v< c #000443", +"w< c #001F54", +"x< c #001C45", +"y< c #030024", +"z< c #002462", +"A< c #001646", +"B< c #00175B", +"C< c #001892", +"D< c #0024A8", +"E< c #0040B8", +"F< c #003C8B", +"G< c #003769", +"H< c #00849A", +"I< c #005E56", +"J< c #00353C", +"K< c #001720", +"L< c #000515", +"M< c #000417", +"N< c #000419", +"O< c #001022", +"P< c #002935", +"Q< c #00515F", +"R< c #007D8F", +"S< c #00879F", +"T< c #00A0C4", +"U< c #00A1C9", +"V< c #00A5D7", +"W< c #00ADDF", +"X< c #00A1C6", +"Y< c #00BEE4", +"Z< c #00BDE9", +"`< c #0092BA", +" [ c #0084B0", +".[ c #00A4EB", +"+[ c #0088D5", +"@[ c #00467B", +"#[ c #000C33", +"$[ c #000528", +"%[ c #06001D", +"&[ c #1C0011", +"*[ c #0B0009", +"=[ c #090012", +"-[ c #040024", +";[ c #00123F", +">[ c #00295D", +",[ c #0065BB", +"'[ c #009DFF", +")[ c #0061A6", +"![ c #0080DE", +"~[ c #0085D8", +"{[ c #00A6EB", +"][ c #00A7D8", +"^[ c #00BCDC", +"/[ c #00B0CB", +"([ c #00A6C4", +"_[ c #00ABCE", +":[ c #009DC3", +"<[ c #0091B4", +"[[ c #00546A", +"}[ c #004153", +"|[ c #002F41", +"1[ c #002D3E", +"2[ c #003A4B", +"3[ c #007795", +"4[ c #00E4E8", +"5[ c #00D5C1", +"6[ c #00636B", +"7[ c #004E50", +"8[ c #004A82", +"9[ c #00328F", +"0[ c #000F55", +"a[ c #000047", +"b[ c #000546", +"c[ c #001C5A", +"d[ c #001C51", +"e[ c #001130", +"f[ c #002157", +"g[ c #002574", +"h[ c #002B9B", +"i[ c #003CC0", +"j[ c #004AA9", +"k[ c #004D96", +"l[ c #0094A1", +"m[ c #005F6C", +"n[ c #005B6F", +"o[ c #005972", +"p[ c #00526B", +"q[ c #005C7A", +"r[ c #006B8A", +"s[ c #007C9E", +"t[ c #008FB1", +"u[ c #009EC4", +"v[ c #00A3CA", +"w[ c #00A5CE", +"x[ c #00A5D6", +"y[ c #00A4CE", +"z[ c #00B0D7", +"A[ c #00B3DD", +"B[ c #0076A2", +"C[ c #002A56", +"D[ c #000A3C", +"E[ c #000C41", +"F[ c #000038", +"G[ c #0B0037", +"H[ c #2A0012", +"I[ c #1C0010", +"J[ c #004457", +"K[ c #009BE4", +"L[ c #0096E2", +"M[ c #0093D9", +"N[ c #0092C5", +"O[ c #009BBE", +"P[ c #00A7BB", +"Q[ c #00A5B5", +"R[ c #00A3BB", +"S[ c #0097B5", +"T[ c #008AAB", +"U[ c #007498", +"V[ c #001A2F", +"W[ c #000A1A", +"X[ c #000A18", +"Y[ c #003845", +"Z[ c #008A9E", +"`[ c #00E5EA", +" } c #00E9E5", +".} c #000208", +"+} c #006C9C", +"@} c #005284", +"#} c #003B79", +"$} c #00003E", +"%} c #001D5C", +"&} c #002260", +"*} c #001343", +"=} c #001A39", +"-} c #002567", +";} c #002F88", +">} c #0037AF", +",} c #0045C9", +"'} c #0051B7", +")} c #004B90", +"!} c #00477C", +"~} c #000829", +"{} c #003A71", +"]} c #00C9E0", +"^} c #00C1DF", +"/} c #007891", +"(} c #005D77", +"_} c #006D8E", +":} c #007295", +"<} c #0090BB", +"[} c #009AC7", +"}} c #0096BF", +"|} c #0096BE", +"1} c #00A2CE", +"2} c #00ADDC", +"3} c #00ACDB", +"4} c #00A6D6", +"5} c #00A4D5", +"6} c #00B8EC", +"7} c #00A4CF", +"8} c #00A4CA", +"9} c #00BBE1", +"0} c #00A6CC", +"a} c #0082A7", +"b} c #0072AA", +"c} c #001E4D", +"d} c #00124B", +"e} c #00003A", +"f} c #01004A", +"g} c #0A0041", +"h} c #2D0014", +"i} c #0F0005", +"j} c #070004", +"k} c #000D0E", +"l} c #002D31", +"m} c #007B88", +"n} c #00A8C6", +"o} c #009FE0", +"p} c #009BEB", +"q} c #0098E5", +"r} c #008EC9", +"s} c #0093BC", +"t} c #009FB4", +"u} c #009FAD", +"v} c #009CB8", +"w} c #006C8C", +"x} c #004764", +"y} c #002540", +"z} c #002E3B", +"A} c #005260", +"B} c #00AFC2", +"C} c #00E4E9", +"D} c #00E8EA", +"E} c #008F93", +"F} c #000810", +"G} c #070008", +"H} c #004D39", +"I} c #007BAA", +"J} c #005B93", +"K} c #002666", +"L} c #001252", +"M} c #001B57", +"N} c #002F79", +"O} c #00162E", +"P} c #001B42", +"Q} c #00276D", +"R} c #002D84", +"S} c #0033A5", +"T} c #003CB7", +"U} c #004EBD", +"V} c #004086", +"W} c #005AB2", +"X} c #00292A", +"Y} c #00041C", +"Z} c #007B8F", +"`} c #00C9BC", +" | c #00B4D4", +".| c #0092B5", +"+| c #006E8F", +"@| c #00577A", +"#| c #00678D", +"$| c #00678C", +"%| c #007A9E", +"&| c #009CC6", +"*| c #00B2DE", +"=| c #00A3CB", +"-| c #009FC7", +";| c #00AFDE", +">| c #00B4E5", +",| c #00A8D8", +"'| c #00ADE3", +")| c #00A4D3", +"!| c #00A8D1", +"~| c #00B3D6", +"{| c #00AAD4", +"]| c #008EC3", +"^| c #004879", +"/| c #002A64", +"(| c #001856", +"_| c #000C53", +":| c #000141", +"<| c #000028", +"[| c #000227", +"}| c #000104", +"|| c #0C000C", +"1| c #000E1A", +"2| c #007882", +"3| c #00AECA", +"4| c #009ABA", +"5| c #00A3D8", +"6| c #00A2DE", +"7| c #00A4E6", +"8| c #00A1E3", +"9| c #0098CD", +"0| c #0097C2", +"a| c #009CBD", +"b| c #0097B7", +"c| c #008EBC", +"d| c #0074A1", +"e| c #004F79", +"f| c #00385B", +"g| c #002849", +"h| c #001532", +"i| c #000318", +"j| c #003143", +"k| c #006B7D", +"l| c #00E8F5", +"m| c #008B91", +"n| c #000807", +"o| c #005542", +"p| c #00B2EA", +"q| c #005A86", +"r| c #00023E", +"s| c #000E47", +"t| c #00205F", +"u| c #00216B", +"v| c #001F62", +"w| c #001C4D", +"x| c #000A21", +"y| c #00183E", +"z| c #001750", +"A| c #001C67", +"B| c #0033A4", +"C| c #0047CD", +"D| c #004FBE", +"E| c #004995", +"F| c #001E28", +"G| c #00131C", +"H| c #005E64", +"I| c #00D0CB", +"J| c #00A3DB", +"K| c #006490", +"L| c #004D74", +"M| c #007CC1", +"N| c #0081C0", +"O| c #006693", +"P| c #006D91", +"Q| c #007394", +"R| c #00A6CD", +"S| c #00ABD4", +"T| c #009BC2", +"U| c #009EC9", +"V| c #00B9EC", +"W| c #00AFDA", +"X| c #00A9CE", +"Y| c #00ADD1", +"Z| c #00B9E5", +"`| c #00A8E1", +" 1 c #0083C1", +".1 c #004A84", +"+1 c #000947", +"@1 c #001C56", +"#1 c #000437", +"$1 c #000216", +"%1 c #000305", +"&1 c #000214", +"*1 c #000B19", +"=1 c #001624", +"-1 c #006774", +";1 c #009BB1", +">1 c #00A4C6", +",1 c #00ACD9", +"'1 c #00ABE0", +")1 c #00A4DA", +"!1 c #00A4D8", +"~1 c #00A5D8", +"{1 c #009ECD", +"]1 c #009BCB", +"^1 c #0097C4", +"/1 c #0074AF", +"(1 c #005893", +"_1 c #004A80", +":1 c #00497A", +"<1 c #001E42", +"[1 c #000C24", +"}1 c #002742", +"|1 c #004962", +"11 c #007F9C", +"21 c #00C2D4", +"31 c #000B0E", +"41 c #001817", +"51 c #008F78", +"61 c #0083B9", +"71 c #003E80", +"81 c #00083E", +"91 c #001952", +"01 c #001D68", +"a1 c #002169", +"b1 c #001B4D", +"c1 c #00285E", +"d1 c #000C29", +"e1 c #001A49", +"f1 c #00205D", +"g1 c #002878", +"h1 c #003EC1", +"i1 c #0050E0", +"j1 c #0054AC", +"k1 c #006EC1", +"l1 c #000C0E", +"m1 c #001715", +"n1 c #007572", +"o1 c #00D3D5", +"p1 c #0067A6", +"q1 c #003367", +"r1 c #004178", +"s1 c #0060B5", +"t1 c #0086B9", +"u1 c #007091", +"v1 c #006885", +"w1 c #0087A6", +"x1 c #00ACD5", +"y1 c #00AAD6", +"z1 c #00B5E8", +"A1 c #00ABDE", +"B1 c #00B0DA", +"C1 c #00ACD6", +"D1 c #00A6D3", +"E1 c #00B8FF", +"F1 c #0098E7", +"G1 c #005E9D", +"H1 c #002E5C", +"I1 c #000C1A", +"J1 c #00071B", +"K1 c #001E2E", +"L1 c #009DBA", +"M1 c #00A6C5", +"N1 c #0094BC", +"O1 c #00B3E8", +"P1 c #00A9DD", +"Q1 c #00A5D4", +"R1 c #00B0DB", +"S1 c #00A9D5", +"T1 c #009DCF", +"U1 c #0083C0", +"V1 c #006CB1", +"W1 c #0062B1", +"X1 c #0059AB", +"Y1 c #0057A4", +"Z1 c #00539C", +"`1 c #00427B", +" 2 c #002954", +".2 c #00183C", +"+2 c #001539", +"@2 c #002F55", +"#2 c #004B6C", +"$2 c #0083A9", +"%2 c #008992", +"&2 c #005358", +"*2 c #004A4D", +"=2 c #00706E", +"-2 c #00AADD", +";2 c #004379", +">2 c #002E73", +",2 c #001B4C", +"'2 c #001A5C", +")2 c #001E69", +"!2 c #00133B", +"~2 c #000A25", +"{2 c #001136", +"]2 c #001C54", +"^2 c #002772", +"/2 c #003092", +"(2 c #0046D2", +"_2 c #004FC1", +":2 c #005797", +"<2 c #009EEA", +"[2 c #006E68", +"}2 c #003832", +"|2 c #003C36", +"12 c #00695B", +"22 c #00A799", +"32 c #0077C3", +"42 c #002C66", +"52 c #004386", +"62 c #0054AE", +"72 c #005ABE", +"82 c #0058BD", +"92 c #0097BC", +"02 c #007C97", +"a2 c #007E9C", +"b2 c #009CC3", +"c2 c #00B1E2", +"d2 c #00AEDF", +"e2 c #00AEDE", +"f2 c #00AFDD", +"g2 c #00AEDC", +"h2 c #00A1D3", +"i2 c #00AFEA", +"j2 c #00AFF3", +"k2 c #009FDF", +"l2 c #00699B", +"m2 c #00173B", +"n2 c #00223C", +"o2 c #001F30", +"p2 c #000B18", +"q2 c #001527", +"r2 c #005B71", +"s2 c #008FAC", +"t2 c #00A5C8", +"u2 c #00B5E1", +"v2 c #00ADE1", +"w2 c #00B9DE", +"x2 c #00BEE2", +"y2 c #008CC2", +"z2 c #0068AE", +"A2 c #0051A2", +"B2 c #0059C7", +"C2 c #0059B9", +"D2 c #0058AF", +"E2 c #0059A5", +"F2 c #004A88", +"G2 c #002B58", +"H2 c #000C31", +"I2 c #000429", +"J2 c #010023", +"K2 c #002E51", +"L2 c #004869", +"M2 c #00AEE0", +"N2 c #0082A0", +"O2 c #0065A1", +"P2 c #003571", +"Q2 c #001F57", +"R2 c #001547", +"S2 c #001E6C", +"T2 c #001035", +"U2 c #00133C", +"V2 c #00194F", +"W2 c #00256C", +"X2 c #002F8C", +"Y2 c #003FB8", +"Z2 c #004EAA", +"`2 c #006794", +" 3 c #00BAE5", +".3 c #00DCF3", +"+3 c #00397D", +"@3 c #004C9F", +"#3 c #0071E9", +"$3 c #0069E2", +"%3 c #0084A7", +"&3 c #007A9B", +"*3 c #0085AE", +"=3 c #00A2D3", +"-3 c #00A2CD", +";3 c #00B5E4", +">3 c #00A9D6", +",3 c #00AADA", +"'3 c #00A7D9", +")3 c #00B9F2", +"!3 c #00B0E7", +"~3 c #00A8D9", +"{3 c #00B9EF", +"]3 c #00C4F8", +"^3 c #003B4E", +"/3 c #00384F", +"(3 c #004050", +"_3 c #006E88", +":3 c #0092B7", +"<3 c #0092BB", +"[3 c #009DCB", +"}3 c #00A9DE", +"|3 c #00ACE1", +"13 c #00A9D2", +"23 c #00AED1", +"33 c #00BAD9", +"43 c #00A4C2", +"53 c #007A9F", +"63 c #00608F", +"73 c #004A90", +"83 c #003E9E", +"93 c #0048C1", +"03 c #004CC2", +"a3 c #0051B6", +"b3 c #005FBB", +"c3 c #007BDC", +"d3 c #007AD4", +"e3 c #00427E", +"f3 c #000F38", +"g3 c #000932", +"h3 c #05002A", +"i3 c #00052E", +"j3 c #001C42", +"k3 c #001D3F", +"l3 c #00668E", +"m3 c #00C3F5", +"n3 c #00B4C3", +"o3 c #004D8B", +"p3 c #000837", +"q3 c #001859", +"r3 c #001A68", +"s3 c #001753", +"t3 c #00103C", +"u3 c #00103D", +"v3 c #00082C", +"w3 c #001348", +"x3 c #002E84", +"y3 c #003596", +"z3 c #003CA4", +"A3 c #004891", +"B3 c #0079A0", +"C3 c #00C1D3", +"D3 c #00B8CB", +"E3 c #00F1FB", +"F3 c #0048AC", +"G3 c #003287", +"H3 c #0076F3", +"I3 c #0072E2", +"J3 c #007AFA", +"K3 c #00ADE8", +"L3 c #0088BB", +"M3 c #0078A3", +"N3 c #00A1CF", +"O3 c #0096C0", +"P3 c #00B1E7", +"Q3 c #00ADE0", +"R3 c #00ACDD", +"S3 c #00B3DF", +"T3 c #00CBF3", +"U3 c #00B1D5", +"V3 c #00323B", +"W3 c #005362", +"X3 c #007DA4", +"Y3 c #0090C2", +"Z3 c #00A3DD", +"`3 c #00A0D4", +" 4 c #00A9CD", +".4 c #00ABC9", +"+4 c #00A1B8", +"@4 c #00758E", +"#4 c #003F5D", +"$4 c #002854", +"%4 c #002E72", +"&4 c #002F9C", +"*4 c #0039B8", +"=4 c #0045C4", +"-4 c #0058CB", +";4 c #0072E5", +">4 c #0098FF", +",4 c #0095FC", +"'4 c #0060AC", +")4 c #00356E", +"!4 c #000C3A", +"~4 c #01002E", +"{4 c #070029", +"]4 c #03002B", +"^4 c #00284A", +"/4 c #0091BD", +"(4 c #00AEB0", +"_4 c #008189", +":4 c #001F42", +"<4 c #001241", +"[4 c #001451", +"}4 c #001043", +"|4 c #000B31", +"14 c #00012A", +"24 c #000A3A", +"34 c #00124D", +"44 c #00226D", +"54 c #002E87", +"64 c #003691", +"74 c #003EA2", +"84 c #004283", +"94 c #00B9E8", +"04 c #00C7CE", +"a4 c #00BBBF", +"b4 c #002664", +"c4 c #00378E", +"d4 c #0062C4", +"e4 c #006ECD", +"f4 c #0066C1", +"g4 c #0080F0", +"h4 c #00A2D9", +"i4 c #0079B8", +"j4 c #0098D0", +"k4 c #0097CA", +"l4 c #00ABD1", +"m4 c #00B5D9", +"n4 c #00ACCD", +"o4 c #00A2C1", +"p4 c #00A9C6", +"q4 c #00768D", +"r4 c #005766", +"s4 c #00333A", +"t4 c #001F22", +"u4 c #001411", +"v4 c #002E37", +"w4 c #004E6B", +"x4 c #0077AE", +"y4 c #0090CB", +"z4 c #009CCE", +"A4 c #009CB6", +"B4 c #007185", +"C4 c #001A2E", +"D4 c #000929", +"E4 c #000F39", +"F4 c #00144A", +"G4 c #001A69", +"H4 c #002EA9", +"I4 c #004EE3", +"J4 c #005FD7", +"K4 c #007AED", +"L4 c #00A1FF", +"M4 c #0099FF", +"N4 c #007FDB", +"O4 c #0056A4", +"P4 c #00225F", +"Q4 c #000638", +"R4 c #070034", +"S4 c #001D43", +"T4 c #002146", +"U4 c #005D84", +"V4 c #008A8A", +"W4 c #00BBC4", +"X4 c #001C39", +"Y4 c #001047", +"Z4 c #00185E", +"`4 c #00155C", +" 5 c #00114D", +".5 c #000A35", +"+5 c #000835", +"@5 c #00032C", +"#5 c #00093C", +"$5 c #001151", +"%5 c #002276", +"&5 c #003293", +"*5 c #003DA3", +"=5 c #0042A1", +"-5 c #004C91", +";5 c #00A7A3", +">5 c #00518F", +",5 c #002A63", +"'5 c #003B88", +")5 c #0062B7", +"!5 c #0072C6", +"~5 c #0072C9", +"{5 c #0082E9", +"]5 c #0093FF", +"^5 c #0093CC", +"/5 c #007DDA", +"(5 c #005EA7", +"_5 c #00447D", +":5 c #004571", +"<5 c #0095D3", +"[5 c #0097C0", +"}5 c #00C3E0", +"|5 c #00B8D2", +"15 c #009EB4", +"25 c #0099B1", +"35 c #006B81", +"45 c #000702", +"55 c #00110A", +"65 c #000D09", +"75 c #000B22", +"85 c #00395D", +"95 c #005E93", +"05 c #0084BE", +"a5 c #008EAD", +"b5 c #0094AB", +"c5 c #007487", +"d5 c #00293B", +"e5 c #001329", +"f5 c #000F2F", +"g5 c #000025", +"h5 c #000432", +"i5 c #000C47", +"j5 c #002380", +"k5 c #0040B9", +"l5 c #0058C8", +"m5 c #0072DE", +"n5 c #008EFB", +"o5 c #0092F6", +"p5 c #0088ED", +"q5 c #0067C3", +"r5 c #00347F", +"s5 c #00124E", +"t5 c #000138", +"u5 c #01002D", +"v5 c #000630", +"w5 c #001C43", +"x5 c #002248", +"y5 c #004A74", +"z5 c #0075AA", +"A5 c #0093CE", +"B5 c #00B3EA", +"C5 c #00A39B", +"D5 c #009D9B", +"E5 c #001446", +"F5 c #00165A", +"G5 c #00022C", +"H5 c #000A3F", +"I5 c #001354", +"J5 c #00247B", +"K5 c #0046B2", +"L5 c #004397", +"M5 c #005DB0", +"N5 c #009F98", +"O5 c #0076A8", +"P5 c #004673", +"Q5 c #00417A", +"R5 c #006BB7", +"S5 c #007ACA", +"T5 c #0082DA", +"U5 c #0086E0", +"V5 c #0095FF", +"W5 c #0096F3", +"X5 c #003A7B", +"Y5 c #001651", +"Z5 c #001347", +"`5 c #004D77", +" 6 c #009CC8", +".6 c #00BDCF", +"+6 c #00ADBA", +"@6 c #00A3B0", +"#6 c #006876", +"$6 c #002634", +"%6 c #000412", +"&6 c #001016", +"*6 c #002018", +"=6 c #00180F", +"-6 c #001915", +";6 c #001F24", +">6 c #003255", +",6 c #0083A7", +"'6 c #0095B7", +")6 c #00859E", +"!6 c #00001B", +"~6 c #03001C", +"{6 c #000021", +"]6 c #000634", +"^6 c #00185D", +"/6 c #003693", +"(6 c #0055BC", +"_6 c #006FD8", +":6 c #0081E6", +"<6 c #0088EF", +"[6 c #0088F4", +"}6 c #0070D7", +"|6 c #004398", +"16 c #002469", +"26 c #000B45", +"36 c #000434", +"46 c #001941", +"56 c #00284E", +"66 c #003A69", +"76 c #00599F", +"86 c #0068AB", +"96 c #0081BC", +"06 c #00C6FF", +"a6 c #008983", +"b6 c #00BABC", +"c6 c #00426E", +"d6 c #001E43", +"e6 c #00134F", +"f6 c #000C48", +"g6 c #000736", +"h6 c #000732", +"i6 c #030020", +"j6 c #000130", +"k6 c #000942", +"l6 c #001256", +"m6 c #002072", +"n6 c #00328B", +"o6 c #0046AA", +"p6 c #00418B", +"q6 c #009C8B", +"r6 c #0074A3", +"s6 c #005E94", +"t6 c #004778", +"u6 c #005591", +"v6 c #0064AE", +"w6 c #006DB6", +"x6 c #0079C8", +"y6 c #0082D9", +"z6 c #008DEC", +"A6 c #008AE5", +"B6 c #0099F6", +"C6 c #0098EE", +"D6 c #0090DC", +"E6 c #007AC4", +"F6 c #0067C6", +"G6 c #00306A", +"H6 c #00154D", +"I6 c #00144F", +"J6 c #000044", +"K6 c #006489", +"L6 c #00ADCA", +"M6 c #00ADBD", +"N6 c #00C0CB", +"O6 c #0098A1", +"P6 c #003C45", +"Q6 c #00231B", +"R6 c #001211", +"S6 c #001219", +"T6 c #000720", +"U6 c #002A40", +"V6 c #005A71", +"W6 c #00718A", +"X6 c #00485C", +"Y6 c #000F24", +"Z6 c #060019", +"`6 c #090019", +" 7 c #00053B", +".7 c #002C73", +"+7 c #004DA7", +"@7 c #006BD3", +"#7 c #007AE3", +"$7 c #0085F4", +"%7 c #008BFF", +"&7 c #0076E6", +"*7 c #004595", +"=7 c #001448", +"-7 c #000E37", +";7 c #001338", +">7 c #003C91", +",7 c #00469E", +"'7 c #0065A9", +")7 c #008DCD", +"!7 c #00908A", +"~7 c #002A52", +"{7 c #001A48", +"]7 c #000436", +"^7 c #000E49", +"/7 c #000A41", +"(7 c #000636", +"_7 c #00042D", +":7 c #00062F", +"<7 c #030021", +"[7 c #000237", +"}7 c #000B49", +"|7 c #001359", +"17 c #00206D", +"27 c #003186", +"37 c #0048A4", +"47 c #009785", +"57 c #009AF4", +"67 c #007FC9", +"77 c #0072BC", +"87 c #004681", +"97 c #005895", +"07 c #0071BE", +"a7 c #0063AB", +"b7 c #0066B0", +"c7 c #0069B9", +"d7 c #0061AA", +"e7 c #0074CC", +"f7 c #007CD6", +"g7 c #008BEB", +"h7 c #008BE5", +"i7 c #00A4FF", +"j7 c #008EF0", +"k7 c #0083EF", +"l7 c #000D48", +"m7 c #001C5E", +"n7 c #070049", +"o7 c #000652", +"p7 c #002C65", +"q7 c #00244F", +"r7 c #007594", +"s7 c #00BFDD", +"t7 c #00BED0", +"u7 c #00666D", +"v7 c #110006", +"w7 c #002529", +"x7 c #000911", +"y7 c #001C26", +"z7 c #003D4C", +"A7 c #00546D", +"B7 c #002C44", +"C7 c #002441", +"D7 c #060024", +"E7 c #010015", +"F7 c #010013", +"G7 c #00081F", +"H7 c #00163E", +"I7 c #00174C", +"J7 c #003C84", +"K7 c #005ABA", +"L7 c #006DD7", +"M7 c #007EF5", +"N7 c #0086FF", +"O7 c #0076F4", +"P7 c #0051B1", +"Q7 c #00367D", +"R7 c #000B41", +"S7 c #00133E", +"T7 c #000F37", +"U7 c #00053F", +"V7 c #001A7F", +"W7 c #0034A2", +"X7 c #004D9E", +"Y7 c #005F9B", +"Z7 c #00D9D1", +"`7 c #003053", +" 8 c #001C47", +".8 c #001146", +"+8 c #000D4B", +"@8 c #000940", +"#8 c #00063B", +"$8 c #000531", +"%8 c #000422", +"&8 c #040025", +"*8 c #000A4C", +"=8 c #00125B", +"-8 c #001F6C", +";8 c #00348C", +">8 c #004585", +",8 c #00C3A8", +"'8 c #009484", +")8 c #0065BD", +"!8 c #0062B8", +"~8 c #003F8D", +"{8 c #00428C", +"]8 c #00589F", +"^8 c #005DA2", +"/8 c #00559D", +"(8 c #00519A", +"_8 c #004D92", +":8 c #005BAD", +"<8 c #0069C0", +"[8 c #0076D2", +"}8 c #007BD3", +"|8 c #009CFF", +"18 c #004B8D", +"28 c #001E5D", +"38 c #001658", +"48 c #000445", +"58 c #010048", +"68 c #000856", +"78 c #002361", +"88 c #003C70", +"98 c #006B90", +"08 c #000A09", +"a8 c #0C0300", +"b8 c #000B1C", +"c8 c #070013", +"d8 c #08000F", +"e8 c #000F0F", +"f8 c #001410", +"g8 c #001716", +"h8 c #001A23", +"i8 c #002C43", +"j8 c #001938", +"k8 c #000C38", +"l8 c #000831", +"m8 c #001E46", +"n8 c #002F6A", +"o8 c #004AA4", +"p8 c #006CE7", +"q8 c #0076FA", +"r8 c #006EEF", +"s8 c #005ED1", +"t8 c #003C89", +"u8 c #000941", +"v8 c #000242", +"w8 c #00067A", +"x8 c #0022B0", +"y8 c #004BAD", +"z8 c #004286", +"A8 c #009AE7", +"B8 c #00C8C3", +"C8 c #00A9A9", +"D8 c #002F4B", +"E8 c #001A3F", +"F8 c #000637", +"G8 c #000D4A", +"H8 c #000A46", +"I8 c #00073F", +"J8 c #000435", +"K8 c #000527", +"L8 c #050014", +"M8 c #00094C", +"N8 c #00145E", +"O8 c #00216E", +"P8 c #004AA0", +"Q8 c #004D8D", +"R8 c #009984", +"S8 c #0059BE", +"T8 c #005DCF", +"U8 c #0051C1", +"V8 c #002182", +"W8 c #00399A", +"X8 c #00479B", +"Y8 c #00397B", +"Z8 c #003678", +"`8 c #003273", +" 9 c #00397C", +".9 c #004690", +"+9 c #0058AE", +"@9 c #0064B9", +"#9 c #0074CB", +"$9 c #008BEF", +"%9 c #0096FF", +"&9 c #005099", +"*9 c #004194", +"=9 c #002874", +"-9 c #001D86", +";9 c #001B7F", +">9 c #00175C", +",9 c #002565", +"'9 c #001B50", +")9 c #002E59", +"!9 c #004877", +"~9 c #00131F", +"{9 c #000909", +"]9 c #000700", +"^9 c #000C00", +"/9 c #080D00", +"(9 c #0A001F", +"_9 c #070015", +":9 c #19001D", +"<9 c #003A22", +"[9 c #000B02", +"}9 c #00070B", +"|9 c #00093F", +"19 c #00103E", +"29 c #002043", +"39 c #0045A0", +"49 c #0056CB", +"59 c #0064E9", +"69 c #006CF6", +"79 c #006DF4", +"89 c #005BCE", +"99 c #002961", +"09 c #001745", +"a9 c #000C35", +"b9 c #000229", +"c9 c #050029", +"d9 c #050040", +"e9 c #0C007E", +"f9 c #0010C1", +"g9 c #0047C2", +"h9 c #0057A3", +"i9 c #0078B8", +"j9 c #00BEBB", +"k9 c #00A7AC", +"l9 c #00334C", +"m9 c #000E36", +"n9 c #000C49", +"o9 c #000943", +"p9 c #00063C", +"q9 c #00002F", +"r9 c #000428", +"s9 c #030600", +"t9 c #03000D", +"u9 c #05001C", +"v9 c #020029", +"w9 c #00033A", +"x9 c #000A4A", +"y9 c #001358", +"z9 c #002168", +"A9 c #003A8F", +"B9 c #004795", +"C9 c #004F92", +"D9 c #00AB96", +"E9 c #0057C4", +"F9 c #0052C9", +"G9 c #0058F3", +"H9 c #0046CA", +"I9 c #0035AA", +"J9 c #0037A5", +"K9 c #003376", +"L9 c #002F5F", +"M9 c #001F4E", +"N9 c #001D4D", +"O9 c #001442", +"P9 c #003675", +"Q9 c #004B9A", +"R9 c #0058B0", +"S9 c #006CCE", +"T9 c #0086F1", +"U9 c #007DDE", +"V9 c #006AC7", +"W9 c #004B97", +"X9 c #0046A6", +"Y9 c #00329A", +"Z9 c #001A5E", +"`9 c #001A56", +" 0 c #001C4C", +".0 c #001426", +"+0 c #00171A", +"@0 c #001409", +"#0 c #000606", +"$0 c #0B0011", +"%0 c #140018", +"&0 c #290027", +"*0 c #001C13", +"=0 c #000E41", +"-0 c #001543", +";0 c #00193C", +">0 c #001C49", +",0 c #002760", +"'0 c #005FDE", +")0 c #006FF8", +"!0 c #0077FF", +"~0 c #0066D5", +"{0 c #005BC1", +"]0 c #004392", +"^0 c #00285F", +"/0 c #00143F", +"(0 c #00052C", +"_0 c #020028", +":0 c #050079", +"<0 c #0014C4", +"[0 c #0047CF", +"}0 c #005FC0", +"|0 c #00629E", +"10 c #00AFAC", +"20 c #00A9B4", +"30 c #00264D", +"40 c #00082D", +"50 c #001344", +"60 c #000C4A", +"70 c #000A4F", +"80 c #000843", +"90 c #00071F", +"00 c #060800", +"a0 c #02001B", +"b0 c #03001E", +"c0 c #02002B", +"d0 c #000131", +"e0 c #00053E", +"f0 c #000E4D", +"g0 c #001350", +"h0 c #003071", +"i0 c #00448E", +"j0 c #004985", +"k0 c #009D96", +"l0 c #0047A7", +"m0 c #0053F3", +"n0 c #0047EC", +"o0 c #003FD8", +"p0 c #002197", +"q0 c #0038A9", +"r0 c #00274D", +"s0 c #001B2E", +"t0 c #000921", +"u0 c #001C38", +"v0 c #00306B", +"w0 c #003A84", +"x0 c #004CAB", +"y0 c #006CE1", +"z0 c #007AEA", +"A0 c #0087FC", +"B0 c #0060BC", +"C0 c #004AA3", +"D0 c #003C9C", +"E0 c #000D44", +"F0 c #001135", +"G0 c #00051C", +"H0 c #000C0C", +"I0 c #000E09", +"J0 c #080002", +"K0 c #100006", +"L0 c #200019", +"M0 c #001652", +"N0 c #000F46", +"O0 c #000F3F", +"P0 c #00092A", +"Q0 c #00266A", +"R0 c #006EE1", +"S0 c #0080F5", +"T0 c #007DE6", +"U0 c #008BF9", +"V0 c #007BE2", +"W0 c #0071D6", +"X0 c #0061BE", +"Y0 c #004287", +"Z0 c #002356", +"`0 c #00163F", +" a c #00003B", +".a c #001B88", +"+a c #0036CF", +"@a c #0052E2", +"#a c #0060CE", +"$a c #005C9A", +"%a c #00B3A9", +"&a c #009EB0", +"*a c #00102F", +"=a c #001644", +"-a c #001857", +";a c #001368", +">a c #00105C", +",a c #000C52", +"'a c #000839", +")a c #000A0D", +"!a c #000239", +"~a c #000034", +"{a c #001A55", +"]a c #002F6C", +"^a c #004184", +"/a c #004581", +"(a c #00A0A0", +"_a c #00BCC6", +":a c #004BAE", +"b c #000519", +",b c #002249", +"'b c #003676", +")b c #0057BC", +"!b c #0074EB", +"~b c #0086F0", +"{b c #006CCB", +"]b c #0044B0", +"^b c #00328E", +"/b c #000424", +"(b c #000F2D", +"_b c #002240", +":b c #004F6B", +"c c #003A62", +",c c #080031", +"'c c #00152E", +")c c #00142F", +"!c c #001B4F", +"~c c #00296A", +"{c c #0064BD", +"]c c #0087E7", +"^c c #008AE9", +"/c c #0086E9", +"(c c #004A96", +"_c c #00438C", +":c c #004599", +"d c #002C6B", +",d c #002867", +"'d c #001D56", +")d c #001F63", +"!d c #00083F", +"~d c #000F4D", +"{d c #003A9E", +"]d c #0056C5", +"^d c #0052B2", +"/d c #00909D", +"(d c #005898", +"_d c #004F99", +":d c #004DA5", +"e c #0077E2", +",e c #007ED1", +"'e c #0090EA", +")e c #007DEC", +"!e c #004CAA", +"~e c #003075", +"{e c #000033", +"]e c #006989", +"^e c #0098AA", +"/e c #0096A2", +"(e c #008C99", +"_e c #00808F", +":e c #00677B", +"f c #00A8BB", +",f c #009EAC", +"'f c #0095A6", +")f c #0090A5", +"!f c #007D97", +"~f c #006074", +"{f c #005C6F", +"]f c #004552", +"^f c #00303A", +"/f c #000F14", +"(f c #00384B", +"_f c #007A9D", +":f c #00A1CC", +"g c #005088", +",g c #002C5C", +"'g c #00E5D9", +")g c #00D5C9", +"!g c #00F1E0", +"~g c #00FDEA", +"{g c #00EFEB", +"]g c #00488C", +"^g c #002D6E", +"/g c #00246C", +"(g c #002271", +"_g c #002483", +":g c #002478", +"h c #00BAF5", +",h c #006AB2", +"'h c #00418C", +")h c #001D64", +"!h c #001055", +"~h c #00154C", +"{h c #000137", +"]h c #001F5F", +"^h c #0052BD", +"/h c #0073CA", +"(h c #0080CD", +"_h c #0081EA", +":h c #006FC7", +"i c #003A57", +",i c #009BB8", +"'i c #00BBD1", +")i c #00B7CA", +"!i c #00AAD8", +"~i c #0093CB", +"{i c #008ACD", +"]i c #0095DF", +"^i c #00A0DF", +"/i c #0090C9", +"(i c #005E95", +"_i c #003A74", +":i c #00468B", +"j c #003080", +",j c #002A84", +"'j c #00207E", +")j c #000119", +"!j c #00164C", +"~j c #002776", +"{j c #0049AD", +"]j c #0069C8", +"^j c #004151", +"/j c #00474D", +"(j c #0081AD", +"_j c #005391", +":j c #00427C", +"k c #009DDE", +",k c #0070BC", +"'k c #002E6E", +")k c #000C58", +"!k c #00053C", +"~k c #001A40", +"{k c #070000", +"]k c #0A0002", +"^k c #00030D", +"/k c #004F66", +"(k c #00ACD8", +"_k c #00B8E9", +":k c #00C1F3", +"l c #003699", +",l c #002C93", +"'l c #00237C", +")l c #001642", +"!l c #1C0014", +"~l c #02002D", +"{l c #005BBD", +"]l c #006ACB", +"^l c #005FA2", +"/l c #008EE0", +"(l c #00494A", +"_l c #003F38", +":l c #004F45", +"m c #0057BD", +",m c #00448F", +"'m c #004992", +")m c #004589", +"!m c #001C68", +"~m c #090046", +"{m c #002550", +"]m c #004272", +"^m c #0065A0", +"/m c #0080CE", +"(m c #006FBE", +"_m c #006FB4", +":m c #00BCEB", +"n c #004898", +",n c #004489", +"'n c #001F56", +")n c #003868", +"!n c #006663", +"~n c #002328", +"{n c #000F1A", +"]n c #00303F", +"^n c #002F43", +"/n c #002636", +"(n c #00121D", +"_n c #00141C", +":n c #004E57", +"o c #007CFF", +",o c #006BEB", +"'o c #004DC3", +")o c #002B84", +"!o c #00266F", +"~o c #0075AD", +"{o c #00CBEB", +"]o c #00D1E1", +"^o c #00A3B7", +"/o c #005266", +"(o c #03000E", +"_o c #070009", +":o c #002528", +"p c #005868", +",p c #0093A5", +"'p c #00A7BC", +")p c #00B8E1", +"!p c #005E91", +"~p c #005592", +"{p c #004D9C", +"]p c #004495", +"^p c #004D97", +"/p c #004D93", +"(p c #004F98", +"_p c #00509E", +":p c #005DC4", +"

q c #008493", +",q c #007180", +"'q c #006C80", +")q c #00829E", +"!q c #007B9E", +"~q c #006E93", +"{q c #005985", +"]q c #004972", +"^q c #001437", +"/q c #002040", +"(q c #006886", +"_q c #0088A0", +":q c #008397", +"r c #003755", +",r c #004865", +"'r c #008AB1", +")r c #0078A7", +"!r c #005AA0", +"~r c #003589", +"{r c #001D72", +"]r c #00166D", +"^r c #001E6E", +"/r c #002367", +"(r c #002B6C", +"_r c #002D6D", +":r c #002C6F", +"s c #00C1FF", +",s c #00B6F9", +"'s c #00B3FC", +")s c #00A0ED", +"!s c #0089D2", +"~s c #0077C1", +"{s c #0072BF", +"]s c #00599D", +"^s c #00578E", +"/s c #006799", +"(s c #008FC2", +"_s c #009CC5", +":s c #009EBD", +"t c #00519C", +",t c #004199", +"'t c #003789", +")t c #002762", +"!t c #00031E", +"~t c #001526", +"{t c #002C2E", +"]t c #006D68", +"^t c #002A2D", +"/t c #00122D", +"(t c #0A0019", +"_t c #0070B6", +":t c #00B2F7", +"u c #003162", +",u c #004B7A", +"'u c #0066A2", +")u c #007DD8", +"!u c #003DB0", +"~u c #002884", +"{u c #002561", +"]u c #001F5B", +"^u c #001054", +"/u c #00125D", +"(u c #00256B", +"_u c #003175", +":u c #00336D", +"v c #005668", +",v c #006B83", +"'v c #006B87", +")v c #006983", +"!v c #0098B7", +"~v c #00B1CC", +"{v c #00D5E9", +"]v c #002A30", +"^v c #002F31", +"/v c #00202E", +"(v c #00373C", +"_v c #00292B", +":v c #001E21", +"w c #00445D", +",w c #008DBA", +"'w c #00CFFB", +")w c #00C3ED", +"!w c #00A9D1", +"~w c #0096C3", +"{w c #007CB4", +"]w c #006BA4", +"^w c #006898", +"/w c #006589", +"(w c #007B97", +"_w c #008293", +":w c #00687D", +"x c #00848C", +",x c #007C83", +"'x c #008F95", +")x c #00E5DF", +"!x c #00EEEE", +"~x c #00DEF6", +"{x c #00B0EB", +"]x c #0090CC", +"^x c #007EB6", +"/x c #0073A9", +"(x c #00719A", +"_x c #006288", +":x c #005572", +"y c #00B2F1", +",y c #00D5E1", +"'y c #00AEF5", +")y c #00B0F2", +"!y c #008EB4", +"~y c #00B5D4", +"{y c #007D82", +"]y c #00132D", +"^y c #00092D", +"/y c #001B39", +"(y c #005774", +"_y c #00BFE7", +":y c #00C2FA", +"z c #0090BE", +",z c #009BC9", +"'z c #00C7FC", +")z c #00C9FD", +"!z c #00A5DB", +"~z c #0099D3", +"{z c #009AD8", +"]z c #0091C9", +"^z c #0087B7", +"/z c #007FA5", +"(z c #007794", +"_z c #00839C", +":z c #00B1CB", +"A c #00648D", +",A c #007092", +"'A c #006C94", +")A c #006E9E", +"!A c #006393", +"~A c #005C88", +"{A c #004D72", +"]A c #00496C", +"^A c #004664", +"/A c #004660", +"(A c #00B8DF", +"_A c #00E0EB", +":A c #00F6F6", +"B c #003D6B", +",B c #002C64", +"'B c #002D72", +")B c #002770", +"!B c #00112B", +"~B c #001C34", +"{B c #002736", +"]B c #002532", +"^B c #001620", +"/B c #000D18", +"(B c #000514", +"_B c #08000B", +":B c #0E000F", +"C c #00104F", +",C c #000A45", +"'C c #002443", +")C c #000E18", +"!C c #000508", +"~C c #00072E", +"{C c #001342", +"]C c #00103B", +"^C c #000B2D", +"/C c #001C31", +"(C c #00172A", +"_C c #000209", +":C c #00051A", +" , ' ", +" ) ! ~ ~ { { ] ] ^ ", +" / ( _ _ : < [ } | 1 2 3 4 5 . = = = = = = = ", +" = = = = = = 6 7 8 9 0 a b c d e f _ g h i j k l l m = = = = = = = = = ", +" = = = = = = = = = = n o p q r s t u v w x y z A B C D E F G H l I J = = = = = = = = = = = ", +" = = = = = = = = = = = = = K L M N O P Q R S T U V W X Y Z ` M ...+.@.#.$. = %.&.*.&.=. = = = = = = = = = = ", +" = = = = = = = = = = = = -.A ;.>.,.'.).S !.~.{.].^./.(._.:.X <.[.u }.|.1.2.3.g 4.5.6.%.*.*. = = = = = = = ", +" = = = = = = = = = = = = = = 7.8.9.0.S a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.X p.q.r. .s.t.< u.{ v.w.x.y.= = = = = = = = ", +" y.. z.A. *.x.B.C.D.E.E.> ; * F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.S Y.Z.`. +.+++@+#+p $+E %+&+*+=+6., = = @ l -+z.;+>+ ", +" ,+m '+)+ !+~+{+]+^+/+(+_+u.:+<+[+}+|+1+2+3+4+5+6+7+8+9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+u.&+E.s+v.6.= t+u+v+ w+x+y+z+A+ ", +" ,+B+u+C+ D+E+6.&+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@7.:+~@{@]@^@/@(@_@:@<@[@}@x+|@'+1@ ", +" 2@E.3@_@4@, , 4@5@6@7@8@9@0@a@b@c@d@e@f@g@h@i@j@k@l@m@ n@o@p@q@r@s@ t@u@v@w@x@y@z@A@B@C@D@E@F@*+*+G@H@( !@7 I@J@K@L@M@N@O@P@- ", +" Q@R@S@T@U@V@W@X@Y@Z@`@[+ #.#+#@###Z $#%#&#*#=#-#;#>#,#'# )# !#~#{#]#^#/#(#_#:#<#[#+.}#|#{ 1#-.2#3#4#5#6#7#8#9#0#a#b#c#d#e# ", +" f#g#h#i#j#k#l#m#n#o#p#q#r#i s#t#u#v#w#x#y#z#A#B#C#D#E#F#G# H#I#J#K#L#M#N#!#O#P#Q#R#S#T#U#V#W#X#Y#Z#`# $.$+$@$#$$$%$&$*$=$ ", +" -$;$>$,$'$)$!$~${$]$^$/$($_$:$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$ ^#d$e$f$g$h$i$2$j$k$l$m$n$o$p$q$r$s$t$u$v$w$x$y$z$A$B$C$D$E$F$G$H$I$ ", +" J$K$L$M$N$O$P$Q$R$S$T$U$V$W$X$Y$Z$`$ %.%+%@%#%$%%%&%*%=%-%;%>%,%'%)%!%~%{%]%^%/%(%_%:%<%[%}%|%1%2%3%4%5%6%7%8%9%0%a%b%c%d%e%f%g%h%i%j%k%l%m%n%o%p%q%r% ", +" s%t%]$u%v%w%x%y%z%A%-#B%C%D%E%F%G%H%I%J%K%L%M%N%O%P%P%Q%R%S%T%U%V%W%X%Y%Z%`% &.&+&@&#&$&%&&&*&=&-&;&>&,&'&)&!&~&{&]&^&/&(&_&:&<&[&}&|&1&2&3&4&5&6&7&8&9&0& ", +" a&`$b&c&d&e&f&g&h&i&j&k&l&m&n&o&p&q&r&s&t&u&v&w&x&y&z&A&-&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V&W&X&Y&Z&`&,& *.*+*k%@*#*$*%*&***4%=*-*`+;*>*,*'*)*!*~*{*]* ", +" ^*G%/*(*_*:*<*[*|%}*|*1*2*3*4*5*6*7*8*9*0*a*b*c*d*e*f*g*h*i*j*k*l*N%m*n*o*p*q*r*s*t*u*v*w*x*y*z*A*B*C*D*E*F*f$=*G*A&H*I*J*K*i$ L*M*N*O*P*i$Q*R*S*T*U*V*W*X*Y*Z* ", +" `* =.=+=@=#=$=%=@%&=*===-=;=>=,='=)=!=~=Z&{=]=^=/=(=_=:=<=[=}=|=w*1=l*2=k*3=4=5=6=7=8=9=0=a=b=}&c=d=e=f=g=h=i=j=k=l=m=n=o=p=Y+ q= r=s=t=u=v=w=x=y=z=A= ", +" B=C=D=E=F=G=H=I=J==& ***w*}%K=L=M=N=O=P=Q=R=S=T=U=V=Q@i=W=X=Y=Z=`= -.-+-H#@-#-$-%-&-*-=---;->-,-H=c='-)-!-~-{-]-^-/-(-J=A&_-:- }&I=<-[-}-|-1-2-3-^-4- ", +" 5-6-7-8-+-9-.-5$$%J=A&4%}%0-=&a-b-c-d-'%e-f-g-h-i-j-k-l-m-n-o-p-!&q-r-s-t-u-v-w-x-y-z-A-B-y-C-D-E-F-G-H-I-9@J-K-l-L-M-N-O-P-Q-R-S- T- I=U-V-W-X-Y-Z-`- ;.;+; ", +" @;#;$;%;&;*=c= $*0-|%*;=;P$-;;;>;,;';);!;~;{;];^;#+/;(;_;:;<;[;};|;1;2;3;4;5;6;7;8;9;0;a;b;c;d;e;f;g;h;i;j;[=k;l;m;n;o;p;q;r;s;t;u;v;w;x; y;1=0-z;A;B;C;D;E;F;G; ", +" H;I;J;K;L;M;w* N;O;P;Q;R;S;T;U;V;W;X;Y;Z;`; >.>+>@>#>$>%>v*&>*>=>->;>>>,>'>)>!>~>{>]>^>/>(>_>:><>[>}>|>1>2>3>4>5>6>7>8>9>0>a>b>c>d>e>f>g>h>i> j>k>l>f%m>n>o>`-p>q> ", +" r>s>t>u>v>[*w>{= x>{&y>z>A>B>r>C>D>E>F>G>H>I>J>K>L>==M>N>#*r-O>P>Q>R>S>T>U>V>W>X>Y>Z>`> ,.,+,@,#,$,%,3=3=I#&,*,=,-,;,>,,,',),!,~ ~,{,],^,/,(,_,:, <,[,},|,1,2,3,4,5,6,7,8,9, ", +" 0,a,b,c,d,e,f,[,%& g,=$h,i,j,k,l,m,n,o,p,E p,q,r,s,t,u,$*v,w,x,y,z,A,B,C,D,E,O@F,G,H,I,J,K,L,M,N,O,P,Q,R,S, T,w>U,V,W,X,Y,Z,`, '.'+'u+ @'#'$'%'&'&'I#*'='-';'>',''')'!'~'{']' ", +" ^'/'('_':'[>A&l* <'['}'|' 1'2'3'4'5'6'7'8'9'0'a'b'c' d'e'f'g'h'i'_ ( j'k'e>l'm'n'o'` }.M p'q'r's't'u'v'U-#%w'x'y'z'u+z.l A'B'.'C' D'E'F'G'@%*=H'I'J'K'L'M'N'O'P'Q'R'S'T' ", +" U'V'W'X'Y'Z'`' ).)r=J= +)@)#)$) %)&)p,*)F =)-);)>),)')))!)~){)])^)/)()s#_):)<)[)f@})|)1)2)3)4)v 5)6)7)8)9)0)a)b)c)d)e)f)y.g) h)i) j)W=k)l)|%.-m)n)o)p)-#q).=r)s)t)u)v)w)x) ", +" y)z)A)B)C)D)E)F)G)H)I)J)%% K)L)M)N) O)^)l'P)Q)R)S)T)U)V)W)X)Y)Z)`);$ !.!+!@!#!$!%!&!*!=!)>-!;!>!,!'!)!1)!!~!{!]!Z%^!/!(!~ _! :!D q! r!s!t!u! v!])w!x!y!z!A!/,B!C!D!<+E!F!G!H!I!J!K!L!M!N!O!P!Q!R!S!T!U!V!W!X!Y!Z!`!u# ~.~+~@~#~$~| %~ &~*~=~ n--~;~>~ ,~I='~]%)~!~~~{~]~^~c= /~(~_~ ", +" :~<~[~}~|~1~2~3~4~5~-#6~7~8~9~0~ a~t!b~c~ i G!d~e~f~g~h~T@i~j~@.<+k~l~m~A Z n~'>o~M.p~q~r~s~t~u~v~w~x~y~z~A~B~C~D~E~F~G~H~I~: (+J~ ..K~L~M~ [!W@N~O~P~ $*Q~R~S~T~U~V~W~X~ [%Y~Z~ ", +" `~G~ { .{+{@{#{${%{&{[-*{={-{;{>{,{'{){!{~{ {{h) ]{^{/{({_{:{<{[{}{+.|{1{2{3{4{5{6{7{8{9{0{a{b{c{d{e{f{g{h{i{j{k{l{m{n{o{p{< ~ q{}+r{s{t{u{v{w{x{y{z{A{B{C{D{ &=E{F{G{H{I{J{K{L{M{N{O{P{Q{R{ ", +" S{T{ U{V{W{X{3-Y{Z{`+`{ ].]+]C,}'@]#]' #]|# J-$]%] Y)&]*]o,=]-];]>],]'])]!]~]{]]]^]/](]_]:]<][]}]|]1]2]3]4]5]6]7]8]9]0]a]b]c]s#d]Y)e]f]C,g]h]9]i]j]k]l]m]^'n]^! A&o]p]q]r]U$s]t]u]v]a!a)w]x]y] ", +" z]A] B]C]D]E]F]Z-G]H]I]J]K]L]M]N]j'O]P]Q]q{R]S]T]U] D.V]U@W]X]Y]Z]`] ^.^+^@^#^$^%^&^*^=^-^;^>^,^'^)^!^~^ {^]^^^/^(^_^Q>:^<^[^V>}^|^1^2^3^4^h]5^6^7^8^9^0^G$a^b^c^ I#d^e^f^g^h^i^])j^k^l^m^n^o^ ", +" p^q^r^ s^t^d+u^v^w^X*Y'x^I]c!y^z^A^B^C^D^) E^F^G^H^I^J^K^L^ M^N^u!O^P^Q^R^S^T^U^V^W^X^Y^Z^`^ /-^./a;+/@/#/$/%/&/*/=/-/;/>/,/'/)/!/~/{/]/^///+'L^(/_/:/ (,('()(!(~(H^{(h)F ]( ^(/(((_(U$:(<([(}(|(1(2(3([=4(5(6(M@7(8(9(0(a(b(c( ", +" d(e(f(g(h(i(j(}$k(l(0)m(n(o(p(v) q(r({(s(r#t( Y)I^u(v(w(]+F x(y(z(A(B(C(D(E(F(G(H(I(J(K(L(M(N(O(P(Q(R(S(T(U(V(W(X(+(Y(Z(`( _v)._+_@_#_N@:=X>Q@_ $_ %_&_*_=_-_;_>_ ,_ '_)_!_~_{_]_b ^_/_(___:_ ", +" <_[_}_|_1_2_3_4_5_6_7_8_9_0_a_ b_c_d_e_f_d~ g_h_i_~ j_@]k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z_A_B_C_o+D_E_B@F_G_H_I_J_K_L_1;M_N_O_P_Q_R_S_T_g#U_V_c/D W_X_Y_3_Z_`_ :.: +:@:B!}!l##:$:%:&:*:=: ", +" -:;:>:,:':):!:~:{:]:^:/:(: _:::<:[:}:|:1:X@O@c>2:3:4:5:6:7:8:9:k;0:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:w:x:y:z:A:B:C:D:E:F:G:H:g#I:V_J:K:L:M:N:O:P: ';Q:j=)!R:S:T:U:V:W: ", +" X:Y:Z:`: <.L[,['[)[![~[{[][^[/[([_[}=:[<[+{[[}[|[1[2[3[ 4[ 5[ 6[7[ 8[9[0[a[b[c[d[z ", +" e[f[g[h[i[j[k[l(Y' l[m[n[o[p[q[r[s[t[u[v[w[!;d%l$K[L[M[N[O[P[Q[R[S[T[U[b/V[W[2#X[Y[Z[ `[ }w' #~U#.}%< +}@}#}$}b[%}&}T *} ", +" =}-};}>},}'})}!} ~}C@{} ]}^}/}(}_}:}<}[}}}|}1}2}3}4}5}6}7}8}9}0}a}b}c}d}e}f}g} h}i}j}y/k}l}m}n}5}o}p}q}r}s}t}u}v}T[w}x}y}{_5'q,J,z}A}B} C}D}E}F}G}' .'H} I}J}K}L}M}&}/^M!N} ", +" O}P}Q}R}S}T}U}V}W} X}$.Y}3#Z} `} |.|+|n$A>@|#|$|%|&|*|=|-|;|>|,|'|)|!|h/~|{|]|^|/|(|_|:|<|[|{(}|||2 1|R]T)2|3|4|5|6|7|8|9|0|a|b|c|d|e|f|g|h|+._)i|Z>j|k| %%l|m|(/(/H,n|o| p|q|h{r|s|t|u|v|w| ", +" x|y|z|A|B|C|D|E| Y)F|m'G|H|I| J|K|L|s_ M|N|O|P|Q|.:R|S|T|U|V|d;)|W|X|Y|Z|`| 1.1+1@1#1K,$1(/%1],&1*1=1-1;1>1,1'1)1!1~1{1]1^1~%/1(1_1:1-@<1(_l- ![1}1|111 %%21G>31=<4151 61718]819101a1b1c1 ", +" L~d1e1f1g1h1i1j1k1 g=l1X}m1n1 o1 p1q1r1d+s1 t1u1v1w10}x1y1z1A1Y~y1B1C1D1j&E1F1G1D~H19 M<<{s!I1J1K1X]L1M1N1O1P1Q1S|R1S1T1U1V1W1X1Y1Z1`1 2.2D_A m:+2@2#2$2 %2&2*2=2 -2;2>2,2D~'2)2r:!2 ", +" ~2{2]2^2/2(2_2:2<2 [2}2|21222 324252627282 9202a2b2c2d2e2f2y1g2,12}h2i2j2k2l2m2n2o2 p2q2r2s2t2u2v2z;[;,3,3'3)3!3~3{3S=]3w}^3/3 I~(3_3:3<3[3}3|313233343536373839303a3b3c3d3e3f3g3h3M i3j3k3l3m3 n3,( o3!>p3q3r3s3t3u3 ", +" v3w3o~x3y3z3A3B3C3D3}(E3 F3G3H3I3J3 [&K3L3M3^%N3O3P3Q3R32}S3P{>1T3U37%n] V3W3<(X3Y3Z3`3[; 4.4+4@4#4$4%4&4*4=4-4;4>4,4'4)4!4~4{4]4U2+!^4/4 {= (4_4 :4<4[4Y.,>}4|4 ", +" 14243444546474849404a4 b4c4d4e4f4g4 h4 i4)~j4k4,313l4m4n4o4p4q4r4s4t4Y)u4A!v4w45,x4y4z4{|A4X%B4C4D4E4F4G4H4I4J4K4L4M4N4O4P4Q4R4$:#:S4T4U4@_}% V4W4 X4I.Y4Z4`4 5.5+5 ", +" @5#5$5%5&5*5=5-5 ;5 >5,5'5)5!5~5{5]5 ^5 /5(5_5:5<5[5n4}5|5152535K$h=y/::455565(/75859505^1a5b5c5d5e5f5g5h5i5j5k5l5m5n5o5p5q5r5s5t5u5v5w5x5y5z5A5B5 C5D5 N:o+E5F5j{n~4)v5 ", +" G5H5I5J5s~K5L5M5 N5 O5P5Q5-5R5S5T5U5V5W5 X5r:Y5Z5`5 6R[.6+6@6#6$6%6$~&6 *6=6-6;6S#l->6~*,6'6)6=$H!~2!6~6{6]6^6/6(6_6:6<6[6}6|6162636v 46566676869606 a6b6 c6d6 ^F4e6s|f6g6h6 ", +" i6j6k6l6m6n6o6p6 q6 r6s6t6u6v6w6x6y6>-z6A6B6C6D6 E6 F6G6H6I6J61{$!K6L6M6N6O6P62:^@ Q6R6S6m~M.-7;7S4'/>7,7'7)7 !7 ~7{7]7d}^7/7(7_7:7 ", +" <7[7}7|717273784 47 576777E(879707a7b7c7d7e7f7g7h7i7O#j7k7V}l7m7_|n7o7p7q7r7s7t7u7(/i_v7 w7U#u.2:x72:y7z7A7B7C7K, .D7E7F7G7H7I7J7K7L7M7N7O7P7Q7R7S7f3)!T7U7V7W7X7Y7^# Z7h! `7 8h5.8+8@8#8$8d %8 ", +" H+&8[7*8=8-8;8>^>8 ,8'8 )8!8v:~8{8]8^8/8(8k[_8:8<8[8}8T5>4|818Z:28384858687888U298N2V3c_08a8 b8c8d83:e8f8g8h8i8j8[|k8l8m:9( m8<#n8o8,^p8q8r8s8t8u8t3E4N i3v8w8x8y8z8A8 B8C8 D8E8.5F8G8H8I8J8K8_ V# ", +" G}L8d@[7M8N8O8<]P8Q8 R8 */S8T8U8V8W8X8S(Y8Z8`8 9.9+9@9k@#9$9%9&9*9=9-9 ;9>9o~,9'9)9!9~9{9]9^9/9 (9_9:9 <9[9}9 |919S7(_ 29>[394959697989P.9909a9b9c9d9e9f9g9h9i9 j9k9 l9:4m9J8n9o9p9q9r9E ~@s9 ", +" !{t9u9v9w9x9y9z9A9B9C9 D9 E9F9G9H9I9J9K9L9M9N9O97#P9Q9R9S9T9U9V9W9X9Y9 Z9`9P 91 0.0+0t;@0}@#0{ $0%0&0 *0<{ =0-0;0 >0,0F3'0)0!0*/~0{0]0^0/0(0_0u<:0<0[0}0|0 1020 85304050l6607080v590F}G.'+00 ", +" a0{{b0c0d0e060f0g0h0i0j0 k0 l0m0n0o0p0q0r0s0~2,]t0u0v0w0x0y0z0A0B0C0D0 E0F0E_ G0%6}:H0I0A'z.J0K0L0 31g M0 2+N0O0P0 Z4Q0y8R0S0T0U0V0W0X0Y0Z0`0|4 a.a+a@a#a$a %a&a 56*aK8=a-a;a>a,a'aD4]))a ", +" L+!@~6_0~4!a~al7M0{a]a^a/a (a_a :ab,b'b)b!b~b&/{bT+]b^b t#/b(b_b :bc4)Ab,c .'c)c!c~cya{cbb]c^c/cu-(c_c:cd,d'dt|)d!dZ58c ", +" =~0c|9~dq3~.{d/]]d^d /d (d_d:d=5e,e'e~#)e!e~e2)Pb{et ^;]e^e/e(e_e:ef,f'f)f!f~f{f]f^f(,F,3:* /f(f_f:fg,gZ' 'g)g!g~g{gHbs& ]g^g/g(g_g:g2g3g4g 5g6g 6=7g64>a8gE0#:9g0gagbgcgdgegua fggghg;;!'R_igjgkglgQ{x]mgngogpgqgrg sgtgugvgwgxgygzg3>AgBgCgDgF(EgFgGgHgIgJgKgLgMg64NgOgPgQgl3Rg SgTg UgVg WgXgYgZg`g h.h+h@h ", +" #h$htb%h&h*h=hX8-h ;h >h,h'h)h!h~h$#{h]hW8^h/h(hdg$9_h:h i.i+i@i#i$i%i#4&i*i=if]+0-in|=):);i>i,i'i)izg!i~i{i]i^i/i(ir1_i:ik}IiJi~ Ki9(LiMiNiOiPiQiRiSiTiUiViWiXiYiZi`i j.j+j@j#j$j%jk]&j 2~*j=j-j 9e ;jsd>j,j'j!]>9Z5 ", +" )j2dZe!j8]~j{j]jG#U3 ^jj#p+T6/j (j_j:jX:&k*kA4=kn<-%-k;k>k,k'k0.)k!k)!~k =<{kv7]k^kN@/kR_(k_k:kl,l'lM})l ", +" !lc8~l&~8] b{l]l^l/l (l_l:l m,m'm)m8i!m ~mkcN,Oc{m]m^m/m(m_m;*:m5m6m7m8m 9m0m ambmcmdm>0~:emfmgmhmim ", +" p{jmK km4+lmmmnmom pmqm*|EmFmGmHfHm TjImJmKmLmMm!2NmOmPme3QmRmSmTmUmVmWmXmYmB&Zm}hXl`m$cn,X[ n2#G .nN@+n@n |l#n$n(^%n&n hm62< ", +" *n=n-n;n>n,nN!'n)n !n~n{n]n1[^nd5/n(n-)_n:n~ MnNn=io,o'o)o!o~o{o]o^o/o9(L@{{(o_o *+(@&6}9:o 1/ bocodod>d>4:f>X>eofogohoiojokolomonooopoqoro*(soto uo vowoxoyozoAoBoCoDoEoFoe-GoHoIoJoKoLow(Mo Noz.u+5@n|Oo PoQoRoQ#SoToUoVoWoXoYo ", +" Zo`o pvk5k[.;0.po++p85@p#pTl$p %p}@m &pv7 *p^k^@=p/+L<-p;p>p,p'p)pdh!p~p{p]p^p/p(p_phe:p q,q'q)q!q~qK|{q]q^q/q_{(q!f_q:q2 sqtquq>4vqwqxqyqcdzq..;bAq`mBqCqDqEqu.Fqe8f)GqHqIqt;x+Jqu+|@f){(G!umKqS& * 2e*r_n=rL+-r ;r>r,r'rs&)r!r~r{r]r^r/r(r_r:rBrCrDrErFrGrHrIrJrJ$#.%6KrLr<+G^Mrunm'Nr6 g+OrPrQrRrSrTrUrVrWrXrYrZr`r^g s{0.s+s@s#sba$s~>/_%sV]#0@ l kj08J^Pn&s*s un=sX@ w(-s6 ;sl( >s,s's)s!s~s{s]s%@^s/s(s_s:sBsCs #cDsl_Es 0@Fs[|Gs 2$HsIsJsKsLsMsNsOszkcl |%PsQsRs ", +" Ss[qTsUs VsU{Ws3=H=** XsYsp,0pZs Y6`s t.t+t@t#t$t%t _}6,!$S.&tA|Na*t=t-t;t>tlm,t'tqi)t6a5c1b~t*]&6{t]t^t/t(t d#Nrx| m~:{|)_t i$:t|,Htt1ItJtKtLtMtNtOtPtS3Qt2(Rt ", +" !=D$StTt.mUtVtWtXtYtZt`t @c u.u[{ +uwn~n@u#u$u%u&u *u=u-u`aZa;u>u,u'u)u1;!u~u{uZ!=e]u^u/u(u_u:uZiaubucudueu4/&j ", +" fuguhuiujukulut>munuou puquru V[sutuuuvuwuxuyu zuAuBuCuDuEu#,FuGu1pHuIu1gJuKuLuMuNuOuPuQuRu SuTuUuVux+Wu}|XuV@i'$. ,,YuZu`u vJ#5s.v+v@vK'#v$v3&%v&vr7*v=l=v:,-v ", +" ;v+~>v,v'vf/)v!v~v{v ]vx!^v J@/v(v_v:vqvrv/1lrsvtvuvvvwvxvyv ", +" A7zvAvBvCvDv Ev FvGvc_/vHvIv140 JvKvLvT]Mv;, P%l*NvOvPvQvRvSvMeTvUvVvWvXvYvs~Zvd7`v w.w+w@w#w $w%w&w*wBt=w$]}+2#g _ ga],-w;w>w,w .-|%'w)w!w~wve{wU*]w^w/w(w_w ", +" :w|FwvewiG{w=%t5~7i ", +" GwHw%|h(c|Iw0:=& JwKwLwlpMwNw/kOwPw QwRwSwTw ,~-&UwVwWwXwYwZw`w x.x39+xW-P%#%@x#x$x%x;b&x*x =xP% -x;x>x,x'x(4 )x!xu,~x=={x]x^x/x7!C;(x_x ", +" g<:x)rnxoxpxqxrxsxtxF$ux ", +" vx&uzuwxxxyxzxi$ AxBx CxDx ExFxI,GxHxIxJxKx3!c==&b=LxMxNxy_OxPx^# c=c=c=QxRx4^6)SxK8TxUxVxc=&'|%WxXxYx=&Zx `xwl y.y+y@y/s#y$y%y&y ", +" *y{q`n=y-y;y>yr=#% ,y %% i$'yb=)y!y~y {y]y^y/y(y_y.-c=c=&=%%I=4%:yz,z)|'zl=.-)z!z~z{z<5]z^z/z(z_z:z lzmznzozpzih3,qz5~Ws ", +" *$rz-lsztzuzvzwzxzyzzzAzBzCzDzEzFzz^GzHzIz JzKzc=w'LzMzNzOzPzCl QzRzLdSzTz Uzc=H&Vzk* WzXz.%YzZz5(`z A.A&|7}b2+A@A1&%t#A$A_}%A&A!9 ", +" *A=A-A;A>AE$,A+|P|'A)A+}!A~A{A]A^AT{/A:xh((A_A:A 0AguB[aAbAcAdAeAfAgAhAKyO'ApiAjAkA ", +" lAmAnAoApAqArAsAtAuAXzmdvAwA uxAyAzAAABACADAEAFAGAHA IAJA KA LAMANAOAn8PAQAI@RASATAUAVAWA!/XAtgYAZA`A B/39% ", +" .BEt/)O~+Bc#V[q%i8l<@BH:O)7 7 .uj8#Bi]$B,@%B&B*B|f =B-BDvP';B>BL9,B'B>j)B(_@]r+N&+' eB&pfB$0gBhBiBjBkBlBG5mBj8nBoBD8pB qBrBsBtBdiuBKe/g*tvBj3=}wB> {kx.v(~ U#xB3@z.yBzBABBBBBCBDB ", +" EBciFB GBu!xB/@6.x.HBIB~@$~p2JBY6Taa0=~A M~To$#2_KBLBMBNBOBNBOBPBQB{7RBr:SBCb!mr3TBUd*fUBVBWB7 ( ; XB%.* - }|3@* YB ZB`B%. C ", +" f5Gi.C ~tV]x7}|& = = & +C@CxBU#j'7.h #C*~K8(0$C):gb%CF4&C*C=Cib.+P+'dib(|-C38;C>C,CZ 1.2d.uV@4.V]; = = = = = = = = = ", +" )c'Cid$c3^)Cd]!C = * }|1#cocoF,u.4.$..uB 9 ~Cg3>.|+Mcnk=7E5hb)lRB`0g3S7{Cu3]CMcM,^CG73.0ph)&+}|* = = = = = = = = = ", +" .prg/C(C}'P)_Ceq = * eq }+~ u.],_ :Cs.9 +#include +#include +#include +#include +#include "tools.h" + + void IntToString( int i, char* in_pszbuffer ) +{ + // permet de copier un int dans la chaƮne buffer + sprintf( in_pszbuffer, "%d", i); +} + +char *wxstr_to_charbuf(wxString s) +{ + int i = 0; + char *str = NULL; + + str = (char*) malloc((s.Length() + 1) * sizeof(char)); + for(i=0; i + #include + #include + #include + + void IntToString( int i, char* in_pszbuffer ); + char *wxstr_to_charbuf(wxString s); + void charbuf_free(char *s); + +#endif /*TOOLS_H_*/ diff -r d43ebbed895f -r d635cfc520ee examples/Makefile.in --- a/examples/Makefile.in Wed Jul 25 18:01:14 2007 +0200 +++ b/examples/Makefile.in Wed Aug 01 13:48:03 2007 +0200 @@ -30,6 +30,8 @@ ifeq ($(TARGET),unix) $(MAKE) -C TestMasterSlave $@ + $(MAKE) -C DS401_Master $@ + $(MAKE) -C DS401_Slave_Gui $@ $(MAKE) -C TestMasterMicroMod $@ endif @@ -40,6 +42,8 @@ ifeq ($(TARGET),unix) $(MAKE) -C TestMasterSlave $@ + $(MAKE) -C DS401_Master $@ + $(MAKE) -C DS401_Slave_Gui $@ $(MAKE) -C TestMasterMicroMod $@ endif @@ -53,11 +57,15 @@ install: ifeq ($(TARGET),unix) $(MAKE) -C TestMasterSlave $@ + $(MAKE) -C DS401_Master $@ + $(MAKE) -C DS401_Slave_Gui $@ $(MAKE) -C TestMasterMicroMod $@ endif uninstall: ifeq ($(TARGET),unix) $(MAKE) -C TestMasterSlave $@ + $(MAKE) -C DS401_Master $@ + $(MAKE) -C DS401_Slave_Gui $@ $(MAKE) -C TestMasterMicroMod $@ endif