|
From: <ak...@us...> - 2008-01-29 17:49:26
|
Revision: 802
http://can.svn.sourceforge.net/can/?rev=802&view=rev
Author: akhe
Date: 2008-01-29 09:49:18 -0800 (Tue, 29 Jan 2008)
Log Message:
-----------
Minor Cleanup
Removed Paths:
-------------
trunk/ODIN/isdn/img/
trunk/ODIN/webif/dtgraph/
trunk/ODIN/webif/netjukebox/
trunk/ODIN/webif/prototype/
trunk/OMobile/
trunk/docs/canal/images/canallogger_format.bmp
trunk/docs/vscp/eda.pdf
trunk/docs/vscp/eda_abstract.doc
trunk/docs/vscp/vscp_spec.docbook
trunk/docs/vscp/vscp_spec.pdf
trunk/docs/vscp/vscp_spec.ps
trunk/docs/vscp/vscp_spec.sxw
trunk/docs/vscp/vscp_spec.tex
trunk/docs/vscp/vscp_spec142.pdf
Deleted: trunk/docs/canal/images/canallogger_format.bmp
===================================================================
(Binary files differ)
Deleted: trunk/docs/vscp/eda.pdf
===================================================================
(Binary files differ)
Deleted: trunk/docs/vscp/eda_abstract.doc
===================================================================
(Binary files differ)
Deleted: trunk/docs/vscp/vscp_spec.docbook
===================================================================
--- trunk/docs/vscp/vscp_spec.docbook 2008-01-29 11:07:57 UTC (rev 801)
+++ trunk/docs/vscp/vscp_spec.docbook 2008-01-29 17:49:18 UTC (rev 802)
@@ -1,4176 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN">
-
-<book id="vscp-spec" lang="en">
-
-<bookinfo>
-<title>VSCP - Very Simple Control Protocol - Specification</title>
-<authorgroup>
-<author>
-<firstname>Ake</firstname>
-<othername></othername>
-<surname>Hedman</surname>
-</author>
-<author>
-<firstname>Mark</firstname>
-<othername></othername>
-<surname>Marooth</surname>
-</author>
-<author>
-<firstname>Charles</firstname>
-<othername></othername>
-<surname>Tewiah</surname>
-</author>
-<author>
-<firstname>Andreas</firstname>
-<othername></othername>
-<surname>Nyholm</surname>
-</author>
-</authorgroup>
-
-
-<date>2005-06-02</date>
-<releaseinfo>1.31</releaseinfo>
-
-<abstract>
-
-<para>
-Reversion: 1.31 2005-05-23
-</para>
-
-<para>
-the VSCP Team, http://www.vscp.org
-</para>
-
-<para>
-Copyright © 2000-2005 Ake Hedman, eurosource
-</para>
-
-<para>
-<application>VSCP - Very Simple Control Protocol Specification</application> decribes a simple protocol for control tasks over different network media.
-</para>
-</abstract>
-
-<keywordset>
-<keyword>VSCP</keyword>
-<keyword>sample application</keyword>
-</keywordset>
-</bookinfo>
-
-<chapter id="introduction">
-<title>Introduction</title>
-
-<para>
-There are a lot of protocols and technologies that claims to be the perfect protocol
-for use in SOHO (Small Office/HOme) control situations. TCP/IP, Bluetooth, different
-ways of power line communication, to name a few. VSCP is no such thing, period! It is
-just another solution to a common problem. In this case the need to manufacture low
-cost nodes that can work reliably and efficiently and be trusted in their day-to-day
-use.
-</para>
-
-<para>
-The VSCP Protocol has been designed to be used in CAN networks. There is one reason
-for this, CAN is very reliable and today it is also low cost. Two good things. It is
-also possible to understand the inner workings of the protocol with just minimal
-effort and it is supported throughout the industry.
-Even though the protocol is designed for CAN there is no need for CAN. It can be used
-equally well in other environments.
-</para>
-
-<para>
-VSCP has been designed in two levels. Level 1 is intended for low-end machines while
-Level 2 is intended for higher level and speedier transport mechanisms such as TCP/IP.
-The initial design goals in designing VSCP have been:
-</para>
-
-<para>
-It should be free and open. No usage, patent or other costs for its implementation/
-usage.
-</para>
-
-<para>
-
-Keep it simple stupid (K.I.S.S.) is the ruling design model.
-</para>
-
-<para>
-Flexible.
-</para>
-
-<para>
-A node should be constructed for the lowest possible cost.
-</para>
-
-<para>
-Uses standard components and cables.
-</para>
-
-<para>
-All nodes should be identifiable by a globally unique ID. This can also be used as a
-globally unique serial number for the device.
-</para>
-
-<para>
-No need to configure nodes with addresses. This is totally handled internally by the
-protocol.
-</para>
-
-<sect1 id="open">
-<title>Open?</title>
-<para>
-This protocol is open and free in all aspects that are possible. We want you to
-contribute work back to the project if you do your own work based on our code but we
-also like to make as much of this work useful also in commercial projects. The tool we
-have chosen to do this is the GNU public license and the lesser GPL. For firmware code
-we use an even more open model so that there is no question that you are allowed to
-put the code in your own commercial projects if you feel to do that.
-The GPL license and the LGPL license is included in the distribution of code in the
-file COPYING but can also be ordered from by writing to the Free Software Foundation,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-</para>
-
-<para>
-Copyright © 200-2005 Ake Hedman, eurosource
-</para>
-
-<para>
-Current information about canal, canald and VSCP (Very Simple Control Protocol) can be
-found at:
-</para>
-
-<simplelist>
-<member>http://www.vscp.org</member>
-<member>http://can.sourceforge.net</member>
-</simplelist>
-
-<para>
-There are two mailing lists available on Sourceforge https://sourceforge.net/mail/?
-group_id=53560 that is about canal (can_canal) and VSCP (can_vscp) topics.
-</para>
-
-<para>
-To subscribe to the canal list go to http://lists.sourceforge.net/lists/listinfo/can-
-canal
-</para>
-
-<para>
-To subscribe to the VSCP list go to http://lists.sourceforge.net/lists/listinfo/can-
-vscp
-</para>
-
-</sect1>
-
-
-<sect1>
-<title>VSCP level I</title>
-<para>
-When the protocol was designed it's usefulness on the CAN bus was the main objective.
-The identifier length and many other things are therefore very 'CAN-ish' in its design
-and behavior. CAN is however no prerequisite.
-</para>
-
-<sect2>
-<title>VSCP over CAN</title>
-
-<para>
-The maximum number of nodes is 254. In practice this is probably around 127 depending
-on drivers and media used.
-</para>
-
-<para>
-The transmission speed is 500 kilobits per second. Other speeds can be used but all
-nodes should support 500 kbps,
-</para>
-
-<para>
-The maximum length of the cabling in a segment is 100 meters using AWG24 or similar
-(CAT5).
-</para>
-
-<para>
-The cable should be terminated at both ends with 120 ohms.
-</para>
-
-<para>
-VSCP requires a 29-bit identifier with a meaning defined below.
-</para>
-
-<para>
-The protocol is compatible with dumb CAN nodes such as the Microchip MCP2502x/5x.
-</para>
-
-<para>
-Appendix C shows how the VSCP Level I frame looks like for CAN.
-</para>
-</sect2>
-
-</sect1>
-
-<sect1>
-<title>VSCP level II</title>
-<para>
-VSCP level two is designed for TCP/IP and other high-end network transport mechanisms
-that are able to handle a lot of data. With all the additional bandwidth available it
-would be ideal to always have a full addresses in packets for this type of media. That
-means that the address part in the header that is now 8-bits should be 129 bits
-instead. Information would be packed in the following way
-</para>
-
-<simplelist>
-<member>3-bits Priority</member>
-<member>16-bits Class</member>
-<member>1-bit Hardcoded </member>
-<member>16-bits Type </member>
-<member>128-bits Originating Address</member>
-</simplelist>
-
-<para>
-The HEAD is defined as
-</para>
-
-<simplelist>
-<member>bit 7,6,5 - Priority</member>
-<member>bit 4 - Hardcoded</member>
-<member>bit 3,2,1,0 reserved</member>
-</simplelist>
-
-<para>
-And the packet format is
-</para>
-
-<simplelist>
-<member>0 - HEAD</member>
-<member>1 - CLASS MSB</member>
-<member>2 - CLASS LSB</member>
-<member>3 - TYPE MSB</member>
-<member>4 - TYPE LSB</member>
-<member>5 - ORIGINATING ADDRESS MSB</member>
-<member>...</member>
-<member>20 - ORIGINATING ADDRESS LSB</member>
-<member>21 - DATA SIZE MSB</member>
-<member>22 - DATA SIZE LSB</member>
-<member>..... data ... limited to max 512-25 = 487 bytes</member>
-<member>len -2 - CRC MSB (Calculated on HEAD + CLASS + TYPE + ADDRESS + SIZE + DATA)</member>
-<member>len -1 - CRC LSB</member>
-</simplelist>
-
-<para>
-The number above is the offset in the package. Len is the total datagram size.
-</para>
-
-<para>
-Note also that the MSB is sent before the LSB (network byte order). So, for little
-endian machines such as a typical PC the byte order needs to be reversed for multi
-byte types.
-</para>
-
-<para>
-There is a 24-byte overhead to send one byte of data so this is not a protocol which
-should be used where an efficient protocol for data intensive applications is required
-and where data is sent in small packets.
-</para>
-
-<para>
-The CRC used is the 16-bit CCITT type and it should be calculated across all bytes
-except for the CRC itself.
-</para>
-
-<para>
-The original message format is called Level 1 VSCP and this new format is Level 2
-VSCP. The two formats can work side-by-side and all classes and types for Level 1 are
-also available in Level 2.
-</para>
-
-<para>
-As indicated, the Class has resized from 9-bits to 16-bits allowing for 65535 classes.
-Class 0000000x xxxxxxxx is reserved for the original classes. A low-end device should
-ignore all packages with a class > 511.
-</para>
-
-<para>
-A packet traveling from a Level 1 device out to the Level 2 world should have an
-address translation done by the master so that a full address will be visible on the
-level 2 net.
-</para>
-
-<para>
-A packet traveling from a Level 2 net to a Level 1 net must have a class with a value
-that is less then 512 in order for it to be recognised. If it has it is aimed for the
-Level 1 network. Classes 512-1023 are reserved for packets that should stay in the
-Level 2 network but in all other aspects (the lower nine bits + type) are defined in
-the same manner as for the low-end net.
-</para>
-
-<para>
-The Level 2 register abstraction level also has more registers (32-bit address is
-used) and all registers are 32-bits wide. Registers 0-255 are byte wide and are the
-same as for level 1. If these registers are read at level 2 they still is read as 32
-bit but have the unused bits set to zero.
-</para>
-</sect1>
-
-<sect1>
-<title>GUID's, Globally Unique Identifiers</title>
-<para>
-To classify as a node in a VSCP net all nodes must be uniquely identified by a
-globally unique 16-byte (yes that is 16-byte (128 bits) not 16-bit) identifier. This
-number uniquely identifies all devices around the world and can be used as a means to
-obtain device descriptions as well as drivers for a specific platform and for a
-specific device.
-</para>
-
-<para>
-The manufacturer of the device can also use the number as a serial number to track
-manufactured devices.
-</para>
-
-<para>
-In many other environments and protocols there is a high cost in getting a globally
-unique number for your equipment. This is not the case with VSCP. If you own an
-Ethernet card you also have what is needed to create your own GUID's.
-</para>
-
-<para>
-The GUID address is not normally used during communication with a node. Instead an 8
-bit address is used. This gives a low protocol overhead. A segment can have a maximum
-of 127 nodes even if the address gives the possibility for 256 nodes. The 8-bit
-address is received from a master node called the segment controller. The short
-address is also called the nodes nickname id or nickname address.
-</para>
-
-<para>
-Besides the GUID it is recommended that all nodes should have a node description
-string in the firmware that points to a URL that can give full information about the
-node and its family of devices. As well as providing information about the node, this
-address can point at drivers for various operating systems or segment controller
-environments.
-</para>
-</sect1>
-
-<sect1>
-<title>Reserved GUID's</title>
-
-<para>
-Some GUID's are reserved and unavailable for assignment. Appendix A list these and
-also assigned id's.
-</para>
-
-<para>
-The VSCP team controls the rest of the addresses and will allocate addresses to
-individuals or companies by them sending a request to gui...@vs.... You can
-request a series of 32-bits making it possible for you to manufacture 4294967295
-nodes. If you need more (!!!) you can ask for another series. There is no cost for
-reserving a series. Appendix A in this document contains a list of assigned addresses
-which will also be available at http://www.vscp.org
-</para>
-</sect1>
-
-<sect1>
-<title>Level I Node types</title>
-<para>
-On each segment there can be two kind of nodes. Dynamic and hardcoded.
-</para>
-
-</sect1>
-
-<sect1>
-<title>Dynamic nodes</title>
-<para>
-Are VSCP nodes that confirm fully to the Level I part of this document. This means
-they have
-</para>
-
-<itemizedlist>
-<listitem><para>a GUID.</para></listitem>
-<listitem><para>the register model implemented.</para></listitem>
-<listitem><para>all or most control messages of class zero implemented. As a minimum
-register read write should be implemented id addition to the events related to the
-nickname discovery.</para></listitem>
-<listitem><para>Have the hard coded bit in the id is set to zero.</para></listitem>
-<listitem><para>Must react on PROBE message on its assigned address with a probe ACK
-and should send out the ACK with the hard coded bit set.</para></listitem>
-</itemizedlist>
-
-<para>
-Sample implementations are available at http://www.vscp.org
-</para>
-</sect1>
-
-<sect1>
-<title>Hard coded nodes</title>
-<para>
-Are VSCP nodes which have a loose conformity to the Level 1 part of this document.
-They can have a nickname address set in hardware or it can have the nickname discovery
-process implemented. In the former case it is up to the installer to assign a unique
-address to the node in the segment and remember to have the hard coded bit set to one.
-There can not be any hard coded nodes with the hard coded bit set to zero.
-Very simple hard coded nodes can therefore be implemented. A node that send out an
-event at certain times is typical and a button node that send out an on-event when the
-button is pressed is another example.
-</para>
-</sect1>
-
-<sect1>
-<title>Level II Node types</title>
-<para>
-Level II nodes are intended for media with higher bandwidth then Level I nodes and no
-nickname procedure is therefore implemented on Level II. As result of this the full
-GUID is sent in each packet.
-</para>
-
-<para>
-The header for a level II event is defined as
-// This structure is for VSCP Level II
-typedef struct _vscpMsg {
-
- _u16 crc; // CRC checksum
- _u8 *pdata; // Ponter to data. Max 487 (512- 25) bytes
- // Following two are for daemon internal use
- _u32 obid; // Used by driver for channel info etc.
- _u32 timestamp; // Relative time stamp for package in microseconds
-// CRC should be calculated from
-// here to end + datablock
-
- _u8 head; // bit 765 prioriy,
- // Priority 0-7 where 0 is highest.
- // bit 4 = hardcoded, true for a
- // hardcoded device.
- // bit 3 = Dont calculate CRC,
- // false for CRC usage.
- _u16 vscp_class; // VSCP class
- _u16 vscp_type; // VSCP type
- _u8 GUID[ 16 ]; // Node address MSB -> LSB
- _u16 sizeData; // Number of valid data bytes
-} vscpMsg;
-</para>
-
-<para>
-The biggest differences is that the GUID is sent in each event and that both class and
-type has a 16-bit length.
-</para>
-
-<para>
-The CRC is calculated using the CCITT polynomial see appendix E.
-The max size for a Level II event is 512 bytes and as the header takes up 25 bytes the
-payload or datapart can take up max 487 bytes. This can seem a bit strange looking at
-the above structure but in a datagram or aother package not all of the above members
-are present. The format in a stream is
-</para>
-
-<para>
-// VSCP LEVEL II UDP datagram offsets
-#define VSCP_UDP_POS_HEAD 0
-#define VSCP_UDP_POS_CLASS 1
-#define VSCP_UDP_POS_TYPE 3
-#define VSCP_UDP_POS_GUID 5
-#define VSCP_UDP_POS_SIZE 21
-#define VSCP_UDP_POS_DATA 23
-#define VSCP_UDP_POS_CRC len - 2
-</para>
-
-<para>
-As is noted the obid and timestamp is not present in the actual stream and is only
-inserted by the driver interface software.
-</para>
-
-<para>
-Level I events can travel in the Level II world. This is because all Level I events
-are repleted in Class=1024. As nicknames are not available on Level II they are
-replaced in the events by the full GUID. This is an important possibility in larger
-installations.
-</para>
-
-<para>
-A message from a node on a Level I that is transfered out on a Level II can have the
-nodes own GUID set or the GUID of the interface between the Level I and the Level II
-segment. Which method to choose is up to the implementor as long as the GUID's are
-unique.
-</para>
-
-<para>
-For interfaces the machine MAC address, if available, is a good base for a GUID which
-easily can map to real physical nodes that are handled by the interface. By using this
-method each MAC address gives 65536 unique GUID's.
-Other methods to generate GUID's s also available form more information see Appendix
-A.
-</para>
-
- <para>
-Address or "nickname" assignment for Level I nodes
-All nodes in a VSCP network segment need a way to get their nicknames ID's, this is
-called the nickname discovery process.
-A VSCP Level 1 segment can have a maximum of 254 nodes + 254 possible hard coded
-nodes. A segment can have a master that handles address or nickname assignment but
-this is not a requirement.
-After a node has got its nickname id it should save this id in permanent non-volatile
-storage and use it until it is told to stop using it. Even if a node forgets its
-nickname a segment controller must have a method to reassign the id to the node. The
-master needs to store the nodes full address to accomplishe this.
-</para>
-</sect1>
-
-<sect1>
-<title>Node segment initialization</title>
-<sect2>
-<title>Dynamic nodes</title>
-<para>
-In a segment where a new node is added the following scenario is used.
-</para>
-
-<para>
-1.The process starts by pressing a button or similar on the node. If the node has a
-nickname assigned to it, it forgets this nickname and enters the initialization state.
-Uninitiated nodes use the reserved node id 0xff.
-</para>
-
-<para>
-2.The node sends a PROBE message to address 0 (the address reserved for the master of
-a segment) using 0xff as its own address. The priority of this event is set to 0x07.
-The master (if available) now has a chance to assign a nickname to the node.
-If no nickname assignment occurs the node checks the other possible nicknames (1-254
-in turn. The node listens for a response event, probe ACK, from a node (which may
-already have the nickname assigned) for five seconds before concluding that the id is
-free and then uses the id as its own nickname id. On slower medium increase this
-timeout at will.
-</para>
-
-<para>
-It is recommended that some visual indication is shown to indicate success. A blinking
-green led that turns steady green after a node has got its nickname is the recommended
-indication. If there is a response for all addresses a failure condition is set
-(segment full) and the node goes to sleep.
-</para>
-
-<para>
-On an insecure medium such as RF it is recommended that the Probe is sent several time
-in a row to make sure that the nickname actually is free.
-</para>
-
-<para>
-3.After it assigns a nickname to itself the node sends Nickname id accepted using its
-new nickname id to inform the segment of its identity.
-</para>
-
-<para>
-4.It's now possible for other nodes to check the capabilities of this new node using
-read commands.
-</para>
-
-<para>
-Only one node at time can go through the initialization process.
-</para>
-
-<para>
-The following picture show the nickname discovery process for a newly added node on a
-segment
-</para>
-
-<para>
-1.The node which initially have its nickname set to 0xff probe for a segment
-controller. Class = 0, Type = 2
-2.No segment controller answerers the probe and a new probe is therefore sent to a
-node with nickname=1. Again Class=0, Type=2.
-3.There is anode with nickname= 1 already on the segment and it answerers the probe
-with "probe ACK" Class=0, Type=3. The initiating node now knows this nickname is
-already in use.
-4.A new probe is sent to a node with nickname=2. Again Class=0, Type=2.
-5. No ACK is received and the node conclude that the nickname=2 is free and assign it
-to itself. It then send a probe again with the new nickname assigned reporting a "new
-node on line".
-</para>
-</sect2>
-
-<sect2>
-<title>Hard coded nodes</title>
-<para>
-Things are a little different for hard coded nodes
-If a hard coded node has its address set in hardware it starts working on the segment
-immediately.
-</para>
-
-<para>
-If the nickname discovery method is implemented it goes through the same steps (1-3)
-as the dynamic node. In this case all hard coded nodes on the segment must recognize
-and react on the probe-event.
-The hard coded bit should always be set for a hard coded node regardless if the
-nickname discovery method is implemented or not.
-</para>
-</sect2>
-
-<sect2>
-<title>Example</title>
-<para>
-A typical scenario for a master less segment can be a big room where there are several
-switches to turn a light on or off. During the installation the switches are installed
-and initialized.
-When each switch is initialized it check the segment for a free nickname and grabs it
-and stores it in local nonvolatile memory. By being conected to the segment the
-installer makes not of the ids. It is of course also possible to set the nicknames to
-some desired value instead.
-Additionally, VSCP aware relays are installed and also initialized to handle the
-actual switching of lighting. Again each in tern are initialized and the segment
-unique nickname noted.
-At this stage the switches and the releay nodes have no connection with each other.
-One can press any switch and an on-event is sent on the segment but the relays don't
-know how to react on it.
-We do this by entering some elements in the decision matrix of the relay nodes.
-</para>
-
-<para>
-If on-event is received from node with nickname n1 set relay on.
-If on-event is received from node with nickname n2 set relay on.
-If on-event s received from node with nickname n2 set relay on.
-
-etc and the same for off-event
-
-If off-event is received from node with nickname n1 set relay off.
-If off-event is received from node with nickname n2 set relay off.
-If off-event s received from node with nickname n2 set relay off.
-</para>
-
-<para>
-As the decsion matrix also is stored in the nodes non volatile storage the system is
-now coupled together in this way until changed sometime in the future.
-To have switches in this way that send on and off events is not so smart when you have
-a visible indication (lights go on or off) and it would have been much better to let
-the switches send only an on-event and let the relay-node decide what to do. In this
-case the decion matrix would loook
-</para>
-
-<para>
-If on-event is received from node with nickname n1 toggle relay state.
-If on-event is received from node with nickname n2 toggle relay state.
-If on-event s received from node with nickname n2 toggle relay state.
-But how about a situation when we need a visual indication on the switch for instance?
-This can be typical when we turn a boiler or something off.
-The answer is simple. We just look for a message from the device we control. In the
-decision matrix of the switches we just enter
-If on-event is received from node with nickname s1 - status light on.
-If off-event is received from node with nickname s1 - status light off.
-</para>
-
-<para>
-It s very easy to add aswitch to the scenario above and it can be even easier if the
-zone concept s used. In this concept each switch on/off message add information on
-which zone it controls and the same change is done in the decision matrix We get
-someting like
-</para>
-
-<para>
-If an on-event is received for zone x1 turn on relay
-We now get even more flexible when we need to add/change the setup.
-What if I want to control the lights from my PC?
-No problem just send the same on-event to the zone from the PC. The relay and the
-switches will behave just as a new switch has been added.
-What if whant a repote control that controls the lightning?
-Just let the remote control interface have a decisn matrix element that sens out the
-on-event to the zone when the selected key s pressed.
-What if I want the lights to be turned on when the alarm goes off?
-Same solution here. Program the alarm control to send the on.event to the zone on
-alarm.
-</para>
-
-<para>
-You imagination is the only limitation....
-</para>
-</sect2>
-</sect1>
-
-<sect1>
-<title>TODO</title>
-<para>
-Level I - Register Abstraction Model
-The model used for reads and writes is defined in this section. Register 0x00 - 0x7f
-are application specific.
-Registers between 0x80-0xff are reserved for VSCP usage.
-If the node has implemented EDA the decision matrix is stored in application register
-space.
-With Node control flags (0x83) the node behavior can be controlled. The startup
-control is two bits that can have two values, binary 10 and binary 01. All other
-values are invalid and are translated to binary 10. If set to binary 10 it will
-prevent the initialization routine of the node to start before the initialization
-button on the node has been pressed.
-Bit 5 of the node control flags write protects all user registers if cleared ( == 1 is
-write enabled).
-The page select registers (0x92/0x93) can be used if more application specific
-registers are needed. The page is selected by writing a 16-bit page in these
-positions. This gives a theoretical user registry space of 256 * 65535 bytes (65535
-pages of 256 bytes each). Note that the normal register read/write method can not be
-used to access this space. The page read/write methods are used instead.
-0x98 Buffer size for device is information for control nodes of limitations of the
-buffer space for a Level II node. Level I nodes have eight in this position. Level II
-nodes that can accept the normal Level II packet have 0 which indicates 512-25 bytes
-or can have some number that represent the actual buffer. The Page read/write, boot
-events etc can handle more then eight data bytes if the buffer is larger then eight
-even if the event is a Level I event.
-The VSCP registers are defined as follows:
-Address
-Access Mode
-Description
-0x00 - 0x7f
----
-Device specific
-0x80
-Read Only
-Alarm status register content (!= 0 indicates alarm). Condition is reset by a read
-operation. The bits represent different alarm conditions.
-0x81
-Read Only
-VSCP Major version number this device is constructed for.
-0x82
-Read Only
-VSCP Minor version number this device is constructed for.
-0x83
-Read/Write
-Node control flags
-bit 7 Startup control
-bit 6 Startup control
-bit 5 r/w control of registry below 0x80. (1 means write enabled)
-bit 4 Reserved
-bit 3 Reserved
-bit 2 Reserved
-bit 1 Reserved
-bit 0 Reserved
-
-0x84
-Read/Write
-User ID 0 - Client settable node id byte 0.
-0x85
-Read/Write
-User ID 1 - Client settable node id byte 1.
-0x86
-Read/Write
-User ID 2 - Client settable node id byte 2.
-0x87
-Read/Write
-User ID 3 - Client settable node id byte 3.
-0x88
-Read/Write
-User ID 4 - Client settable node id byte 4.
-0x89
-Read only
-Manufacturer device ID byte 0.
-0x8a
-Read only
-Manufacturer device ID byte 1.
-0x8b
-Read only
-Manufacturer device ID byte 2.
-0x8c
-Read only
-Manufacturer device ID byte 3.
-0x8d
-Read only
-Manufacturer sub device ID byte 0.
-0x8e
-Read only
-Manufacturer sub device ID byte 1.
-0x8f
-Read only
-Manufacturer sub device ID byte 2.
-0x90
-Read only
-Manufacturer sub device ID byte 3.
-0x91
-Read only
-Nickname id for node if assigned or 0xff if no nickname id assigned.
-0x92
-Read/Write
-Page select register MSB
-0x93
-Read/Write
-Page Select register LSB
-0x94
-Read Only
-Firmware major version number.
-0x95
-Read Only
-Firmware minor version number.
-0x96
-Read Only
-Firmware sub minor version number.
-0x97
-Read Only
-Boot loader algorithm used. 0Xff for no bootloader support.
-0x98
-Read Only
-Buffer size.
-0x99-0xcf
----
-Reserved for future use.
-0xd0-0xdf
-Read Only
-128-bit (16-byte) globally unique ID (GUID) identifier for the device. This identifier
-uniquely identifies the device throughout the world and can give additional
-information on where driver and driver information can be found for the device. MSB
-for the identifier is stored first (in 0xd0).
-0xe0-0xff
-Read Only
-Module Description File URL. A zero terminates the ASCII string if not exactly 32
-bytes long. The URL points to a file that gives further information about where
-drivers for different environments are located. Can be returned as a zero string for
-devices with low memory.
-
-It is recommended that unimplemented registers read as oxff
-Level II - Register Abstraction Model
-The level II abstraction model is the same as Level I but covers a much wider address
-space. The registers are layed out in an 32-bit address space with the standard Level
-I register map on the top (0xffffff80 - 0xffffffff).
-Level II also have a configuration model where data for a node can be read and written
-in XML format. Its up to the designed of the node which method to use as long as the
-required registers are implemented.
-
-Level II - Configuration Model
-Preliminary
-For the level II part of th...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-03 16:56:15
|
Revision: 806
http://can.svn.sourceforge.net/can/?rev=806&view=rev
Author: akhe
Date: 2008-02-03 08:38:59 -0800 (Sun, 03 Feb 2008)
Log Message:
-----------
Fixed priority bug. Shift to low (in bit) before. Thanks Dave!
Modified Paths:
--------------
trunk/firmware/arm/str/simpletest_str73x_iar/Debug/Obj/simple.pbd
trunk/firmware/arm/str/simpletest_str73x_iar/settings/simple.dni
trunk/firmware/arm/str/simpletest_str73x_iar/settings/simple.wsdt
trunk/firmware/pic/mx/nova_v304/src/nova_nobl_mc_hw211.mcw
trunk/src/vscp/common/vscphelper.cpp
trunk/src/vscp/vscpworks/vscpworks.dsp
Modified: trunk/firmware/arm/str/simpletest_str73x_iar/Debug/Obj/simple.pbd
===================================================================
--- trunk/firmware/arm/str/simpletest_str73x_iar/Debug/Obj/simple.pbd 2008-02-03 12:17:27 UTC (rev 805)
+++ trunk/firmware/arm/str/simpletest_str73x_iar/Debug/Obj/simple.pbd 2008-02-03 16:38:59 UTC (rev 806)
@@ -1,11 +1,11 @@
This is an internal working file generated by the Source Browser.
-13:19 16s
-D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\Debug\Obj\73x_adc.pbi
-D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\Debug\Obj\73x_cfg.pbi
-D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\Debug\Obj\73x_cmu.pbi
-D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\Debug\Obj\73x_eic.pbi
-D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\Debug\Obj\73x_gpio.pbi
-D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\Debug\Obj\73x_it.pbi
-D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\Debug\Obj\73x_lcd.pbi
-D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\Debug\Obj\73x_lib.pbi
-D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\Debug\Obj\main.pbi
+10:07 12s
+D:\development\vscp\firmware\arm\str\simpletest_str73x_iar\Debug\Obj\73x_adc.pbi
+D:\development\vscp\firmware\arm\str\simpletest_str73x_iar\Debug\Obj\73x_cfg.pbi
+D:\development\vscp\firmware\arm\str\simpletest_str73x_iar\Debug\Obj\73x_cmu.pbi
+D:\development\vscp\firmware\arm\str\simpletest_str73x_iar\Debug\Obj\73x_eic.pbi
+D:\development\vscp\firmware\arm\str\simpletest_str73x_iar\Debug\Obj\73x_gpio.pbi
+D:\development\vscp\firmware\arm\str\simpletest_str73x_iar\Debug\Obj\73x_it.pbi
+D:\development\vscp\firmware\arm\str\simpletest_str73x_iar\Debug\Obj\73x_lcd.pbi
+D:\development\vscp\firmware\arm\str\simpletest_str73x_iar\Debug\Obj\73x_lib.pbi
+D:\development\vscp\firmware\arm\str\simpletest_str73x_iar\Debug\Obj\main.pbi
Modified: trunk/firmware/arm/str/simpletest_str73x_iar/settings/simple.dni
===================================================================
--- trunk/firmware/arm/str/simpletest_str73x_iar/settings/simple.dni 2008-02-03 12:17:27 UTC (rev 805)
+++ trunk/firmware/arm/str/simpletest_str73x_iar/settings/simple.dni 2008-02-03 16:38:59 UTC (rev 806)
@@ -21,6 +21,8 @@
[TermIOLog]
LoggingEnabled=_ 0
LogFile=_ ""
+[CodeCoverage]
+Enabled=_ 0
[Disassemble mode]
mode=0
[Breakpoints]
Modified: trunk/firmware/arm/str/simpletest_str73x_iar/settings/simple.wsdt
===================================================================
--- trunk/firmware/arm/str/simpletest_str73x_iar/settings/simple.wsdt 2008-02-03 12:17:27 UTC (rev 805)
+++ trunk/firmware/arm/str/simpletest_str73x_iar/settings/simple.wsdt 2008-02-03 16:38:59 UTC (rev 806)
@@ -52,14 +52,14 @@
- <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\Startup\73x_init.s</Filename><XPos>0</XPos><YPos>74</YPos><SelStart>3595</SelStart><SelEnd>3595</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\Startup\73x_vect.s</Filename><XPos>0</XPos><YPos>36</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>48</YPos><SelStart>2517</SelStart><SelEnd>2517</SelEnd></Tab><ActiveTab>2</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\dev\vscp\firmware\ARM\common\str\STR73xLibrary\include\73x_map.h</Filename><XPos>0</XPos><YPos>16</YPos><SelStart>1346</SelStart><SelEnd>1346</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\dev\vscp\firmware\ARM\common\str\STR73xLibrary\source\73x_lib.c</Filename><XPos>0</XPos><YPos>286</YPos><SelStart>7152</SelStart><SelEnd>7152</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\73x_it.c</Filename><XPos>0</XPos><YPos>102</YPos><SelStart>6038</SelStart><SelEnd>6038</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\dev\vscp\firmware\ARM\str\simpletest_str73x_iar\73x_conf.h</Filename><XPos>0</XPos><YPos>6</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
+ <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\common\str\STR73xLibrary\source\73x_cfg.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>1113</SelStart><SelEnd>1113</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\simpletest_str73x_iar\Startup\73x_init.s</Filename><XPos>0</XPos><YPos>262</YPos><SelStart>9237</SelStart><SelEnd>9237</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\simpletest_str73x_iar\Startup\73x_vect.s</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>1149</SelStart><SelEnd>1149</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\simpletest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>131</YPos><SelStart>4966</SelStart><SelEnd>4966</SelEnd></Tab><ActiveTab>3</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
- <Top><Row0><Sizes><Toolbar-0084e968><key>iaridepm1</key></Toolbar-0084e968></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>409</Bottom><Right>244</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>307220</sizeHorzCY><sizeVertCX>240234</sizeVertCX><sizeVertCY>631336</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>200</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>307220</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>307220</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
+ <Top><Row0><Sizes><Toolbar-01af3f68><key>iaridepm.enu1</key></Toolbar-01af3f68></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>444</Bottom><Right>244</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>216</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>307692</sizeHorzCY><sizeVertCX>240234</sizeVertCX><sizeVertCY>635328</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>214</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>216</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>307692</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>307692</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>
Modified: trunk/firmware/pic/mx/nova_v304/src/nova_nobl_mc_hw211.mcw
===================================================================
(Binary files differ)
Modified: trunk/src/vscp/common/vscphelper.cpp
===================================================================
--- trunk/src/vscp/common/vscphelper.cpp 2008-02-03 12:17:27 UTC (rev 805)
+++ trunk/src/vscp/common/vscphelper.cpp 2008-02-03 16:38:59 UTC (rev 806)
@@ -119,7 +119,7 @@
uint8_t getVSCPheadFromCANid( const uint32_t id )
{
- return ( uint8_t ) ( 0xf0 & ( id >> 20 ) );
+ return ( uint8_t ) ( 0xf0 & ( id >> 21 ) );
};
///////////////////////////////////////////////////////////////////////////////
@@ -158,7 +158,7 @@
//unsigned long t1 = (unsigned long)priority << 20;
//unsigned long t2 = (unsigned long)pvscpMsg->vscp_class << 16;
//unsigned long t3 = (unsigned long)pvscpMsg->vscp_type << 8;
- return ( ( ( unsigned long ) priority << 20 ) |
+ return ( ( ( unsigned long ) priority << 21 ) |
( ( unsigned long ) vscp_class << 16 ) |
( ( unsigned long ) vscp_type << 8 ) |
0 );
@@ -170,7 +170,7 @@
uint32_t getCANidFromVSCPevent( const vscpEvent *pEvent )
{
- return ( ( ( unsigned long ) getVscpPriority( pEvent ) << 20 ) |
+ return ( ( ( unsigned long ) getVscpPriority( pEvent ) << 21 ) |
( ( unsigned long ) pEvent->vscp_class << 16 ) |
( ( unsigned long ) pEvent->vscp_type << 8 ) |
0 );
@@ -678,7 +678,7 @@
//unsigned long t1 = (unsigned long)priority << 20;
//unsigned long t2 = (unsigned long)pvscpMsg->vscp_class << 16;
//unsigned long t3 = (unsigned long)pvscpMsg->vscp_type << 8;
- pcanalMsg->id = ( ( unsigned long ) priority << 20 ) |
+ pcanalMsg->id = ( ( unsigned long ) priority << 21 ) |
( ( unsigned long ) vscp_class << 16 ) |
( ( unsigned long ) pvscpEvent->vscp_type << 8 ) |
nodeid; // Normally we are the host of hosts
Modified: trunk/src/vscp/vscpworks/vscpworks.dsp
===================================================================
--- trunk/src/vscp/vscpworks/vscpworks.dsp 2008-02-03 12:17:27 UTC (rev 805)
+++ trunk/src/vscp/vscpworks/vscpworks.dsp 2008-02-03 16:38:59 UTC (rev 806)
@@ -31,7 +31,7 @@
MTL=midl.exe
RSC=rc.exe
-!IF "$(CFG)" == "vscpworks - Win32 Debug"
+!IF "$(CFG)" == "vscpworks - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -43,20 +43,20 @@
# PROP Output_Dir "VCProjectDebug"
# PROP Intermediate_Dir "VCProjectDebug"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /Fd"VCProjectDebug\vscpworks.pdb" /MDd /Od /GR /EHsc /W4 /Zi /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD CPP /nologo /FD /Fd"VCProjectDebug\vscpworks.pdb" /MDd /Od /GR /EHsc /W4 /Zi /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD BASE MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /D_UNICODE /mktyplib203 /win32
-# ADD MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /D_UNICODE /mktyplib203 /win32
-# ADD BASE RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
-# ADD RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
+# ADD BASE CPP /nologo /MDd /W4 /GR /Zi /Od /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /D "_UNICODE" /Fd"VCProjectDebug\vscpworks.pdb" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W4 /GR /Zi /Od /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /D "_UNICODE" /Fd"VCProjectDebug\vscpworks.pdb" /FD /EHsc /c
+# ADD BASE MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /D "_UNICODE" /mktyplib203 /win32
+# ADD MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /D "_UNICODE" /mktyplib203 /win32
+# ADD BASE RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS" /d "__WXDEBUG__" /d "_DEBUG" /d "_UNICODE"
+# ADD RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS" /d "__WXDEBUG__" /d "_DEBUG" /d "_UNICODE"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw28ud_richtext.lib wxmsw28ud_aui.lib wxmsw28ud_core.lib wxbase28ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxmsw28ud_adv.lib wxmsw28ud_html.lib wxmsw28ud_xrc.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG /out:"VCProjectDebug\vscpworks.exe"
-# ADD LINK32 wxmsw28ud_richtext.lib wxmsw28ud_aui.lib wxmsw28ud_core.lib wxbase28ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxmsw28ud_adv.lib wxmsw28ud_html.lib wxmsw28ud_xrc.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG /out:"VCProjectDebug\vscpworks.exe"
+# ADD BASE LINK32 wxmsw28ud_richtext.lib wxmsw28ud_aui.lib wxmsw28ud_core.lib wxbase28ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxmsw28ud_adv.lib wxmsw28ud_html.lib wxmsw28ud_xrc.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
+# ADD LINK32 wxmsw28ud_richtext.lib wxmsw28ud_aui.lib wxmsw28ud_core.lib wxbase28ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxmsw28ud_adv.lib wxmsw28ud_html.lib wxmsw28ud_xrc.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
-!ELSEIF "$(CFG)" == "vscpworks - Win32 Release"
+!ELSEIF "$(CFG)" == "vscpworks - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -68,20 +68,20 @@
# PROP Output_Dir "VCProjectRelease"
# PROP Intermediate_Dir "VCProjectRelease"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /Fd"VCProjectRelease\vscpworks.pdb" /MD /O2 /GR /EHsc /W4 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD CPP /nologo /FD /Fd"VCProjectRelease\vscpworks.pdb" /MD /O2 /GR /EHsc /W4 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD BASE MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /mktyplib203 /win32
-# ADD MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /mktyplib203 /win32
-# ADD BASE RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
-# ADD RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
+# ADD BASE CPP /nologo /MD /W4 /GR /O2 /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /Fd"VCProjectRelease\vscpworks.pdb" /FD /EHsc /c
+# ADD CPP /nologo /MD /W4 /GR /O2 /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /Fd"VCProjectRelease\vscpworks.pdb" /FD /EHsc /c
+# ADD BASE MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /mktyplib203 /win32
+# ADD MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /mktyplib203 /win32
+# ADD BASE RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS"
+# ADD RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw28_richtext.lib wxmsw28_aui.lib wxmsw28_core.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxmsw28_adv.lib wxmsw28_html.lib wxmsw28_xrc.lib wxbase28_net.lib wxbase28_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /out:"VCProjectRelease\vscpworks.exe"
-# ADD LINK32 wxmsw28_richtext.lib wxmsw28_aui.lib wxmsw28_core.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxmsw28_adv.lib wxmsw28_html.lib wxmsw28_xrc.lib wxbase28_net.lib wxbase28_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /out:"VCProjectRelease\vscpworks.exe"
+# ADD BASE LINK32 wxmsw28_richtext.lib wxmsw28_aui.lib wxmsw28_core.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxmsw28_adv.lib wxmsw28_html.lib wxmsw28_xrc.lib wxbase28_net.lib wxbase28_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
+# ADD LINK32 wxmsw28_richtext.lib wxmsw28_aui.lib wxmsw28_core.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxmsw28_adv.lib wxmsw28_html.lib wxmsw28_xrc.lib wxbase28_net.lib wxbase28_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
-!ELSEIF "$(CFG)" == "vscpworks - Win32 Unicode Release"
+!ELSEIF "$(CFG)" == "vscpworks - Win32 Unicode Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -93,20 +93,20 @@
# PROP Output_Dir "VCProjectUnicodeRelease"
# PROP Intermediate_Dir "VCProjectUnicodeRelease"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /Fd"VCProjectUnicodeRelease\vscpworks.pdb" /MD /O2 /GR /EHsc /W4 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD CPP /nologo /FD /Fd"VCProjectUnicodeRelease\vscpworks.pdb" /MD /O2 /GR /EHsc /W4 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD BASE MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D_UNICODE /mktyplib203 /win32
-# ADD MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D_UNICODE /mktyplib203 /win32
-# ADD BASE RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
-# ADD RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
+# ADD BASE CPP /nologo /MD /W4 /GR /O2 /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "_UNICODE" /Fd"VCProjectUnicodeRelease\vscpworks.pdb" /FD /EHsc /c
+# ADD CPP /nologo /MD /W4 /GR /O2 /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "_UNICODE" /Fd"VCProjectUnicodeRelease\vscpworks.pdb" /FD /EHsc /c
+# ADD BASE MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "_UNICODE" /mktyplib203 /win32
+# ADD MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "_UNICODE" /mktyplib203 /win32
+# ADD BASE RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS" /d "_UNICODE"
+# ADD RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS" /d "_UNICODE"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw28u_richtext.lib wxmsw28u_aui.lib wxmsw28u_core.lib wxbase28u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxmsw28u_adv.lib wxmsw28u_html.lib wxmsw28u_xrc.lib wxbase28u_net.lib wxbase28u_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /out:"VCProjectUnicodeRelease\vscpworks.exe"
-# ADD LINK32 wxmsw28u_richtext.lib wxmsw28u_aui.lib wxmsw28u_core.lib wxbase28u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxmsw28u_adv.lib wxmsw28u_html.lib wxmsw28u_xrc.lib wxbase28u_net.lib wxbase28u_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /out:"VCProjectUnicodeRelease\vscpworks.exe"
+# ADD BASE LINK32 wxmsw28u_richtext.lib wxmsw28u_aui.lib wxmsw28u_core.lib wxbase28u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxmsw28u_adv.lib wxmsw28u_html.lib wxmsw28u_xrc.lib wxbase28u_net.lib wxbase28u_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
+# ADD LINK32 wxmsw28u_richtext.lib wxmsw28u_aui.lib wxmsw28u_core.lib wxbase28u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxmsw28u_adv.lib wxmsw28u_html.lib wxmsw28u_xrc.lib wxbase28u_net.lib wxbase28u_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
-!ELSEIF "$(CFG)" == "vscpworks - Win32 unicode Debug"
+!ELSEIF "$(CFG)" == "vscpworks - Win32 unicode Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -118,20 +118,20 @@
# PROP Output_Dir "VCProjectunicodeDebug"
# PROP Intermediate_Dir "VCProjectunicodeDebug"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /Fd"VCProjectunicodeDebug\vscpworks.pdb" /MDd /Od /GR /EHsc /W4 /Zi /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD CPP /nologo /FD /Fd"VCProjectunicodeDebug\vscpworks.pdb" /MDd /Od /GR /EHsc /W4 /Zi /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD BASE MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /mktyplib203 /win32
-# ADD MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /mktyplib203 /win32
-# ADD BASE RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
-# ADD RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
+# ADD BASE CPP /nologo /MDd /W4 /GR /Zi /Od /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /Fd"VCProjectunicodeDebug\vscpworks.pdb" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W4 /GR /Zi /Od /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /FR /Fd"VCProjectunicodeDebug\vscpworks.pdb" /FD /EHsc /c
+# ADD BASE MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS" /d "__WXDEBUG__" /d "_DEBUG"
+# ADD RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS" /d "__WXDEBUG__" /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw28d_richtext.lib wxmsw28d_aui.lib wxmsw28d_core.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxmsw28d_adv.lib wxmsw28d_html.lib wxmsw28d_xrc.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG /out:"VCProjectunicodeDebug\vscpworks.exe"
-# ADD LINK32 wxmsw28d_richtext.lib wxmsw28d_aui.lib wxmsw28d_core.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxmsw28d_adv.lib wxmsw28d_html.lib wxmsw28d_xrc.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib ws...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 14:54:20
|
Revision: 845
http://can.svn.sourceforge.net/can/?rev=845&view=rev
Author: akhe
Date: 2008-02-17 06:54:15 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Cleaning up openocd scripts
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str73x_gcc/Makefile
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
trunk/firmware/arm/str/dosubst.bat
trunk/setenv_vscp.bat
Modified: trunk/firmware/arm/str/cantest_str73x_gcc/Makefile
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/Makefile 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/Makefile 2008-02-17 14:54:15 UTC (rev 845)
@@ -347,19 +347,14 @@
# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
-OPENOCD_DIR = 'C:\Program Files\openocd-r247\bin\'
+#OPENOCD_DIR = C:\Program Files\openocd-r247\bin\
# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
-OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+OPENOCD = "$(OPENOCD_DIR)openocd-ftd2xx.exe"
# specify OpenOCD configuration file (pick the one for your device)
-#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_signalyzer-flash-program.cfg
-#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg
-#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_armusbocd-flash-program.cfg
-#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_pp-flash-program.cfg
-#OPENOCD_CFG = "D:\development\armdev\str73x open source development\Code\Windows\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg"
-OPENOCD_CFG = "c:\str73x_jtagkey-flash-program.cfg"
+OPENOCD_CFG = l:/str73x-configs/str73x_jtagkey-flash-program.cfg
program:
@echo
Modified: trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_jtagkey-flash-program.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_jtagkey-flash-program.cfg 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_jtagkey-flash-program.cfg 2008-02-17 14:54:15 UTC (rev 845)
@@ -32,4 +32,9 @@
flash bank str7x 0x80000000 0x00040000 0 0 0 STR73x
#Script used for FLASH programming
-target_script 0 reset /home/l3golas/openocd-configs/str73x-configs/str73x_flashprogram.ocd
+#target_script 0 reset C:\openocd-configs\str73x-configs\str73x_flashprogram.ocd
+#target_script 0 reset "D:\development\armdev\str73x open source development\Code\Windows\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg"
+target_script 0 reset "D:\development\armdev\str73x open source development\Code\Windows\openocd-configs\str73x-configs\str73x_flashprogram.ocd"
+
+# For more information about the configuration files, take a look at:
+# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
\ No newline at end of file
Modified: trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-erase.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-erase.cfg 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-erase.cfg 2008-02-17 14:54:15 UTC (rev 845)
@@ -32,4 +32,4 @@
flash bank str7x 0x80000000 0x00040000 0 0 0 STR73x
#Script used for FLASH erasing
-target_script 0 reset C:\openocd-configs\str73x-configs\str73x_flasherase.ocd
+target_script 0 reset l:/str73x-configs/str73x_flasherase.ocd
Modified: trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-program.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-program.cfg 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-program.cfg 2008-02-17 14:54:15 UTC (rev 845)
@@ -32,6 +32,7 @@
flash bank str7x 0x80000000 0x00040000 0 0 0 STR73x
#Script used for FLASH programming
-#target_script 0 reset C:\openocd-configs\str73x-configs\str73x_flashprogram.ocd
-#target_script 0 reset "D:\development\armdev\str73x open source development\Code\Windows\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg"
-target_script 0 reset "C:\str73x_jtagkey-flash-program.cfg"
\ No newline at end of file
+target_script 0 reset "l:/str73x-configs/str73x_flashprogram.ocd"
+
+# For more information about the configuration files, take a look at:
+# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
\ No newline at end of file
Modified: trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-02-17 14:54:15 UTC (rev 845)
@@ -552,13 +552,13 @@
if (pCanMsg->IdType == CAN_STD_ID)
{
- /* standard ID*/
+ /* standard ID */
CAN->sMsgObj[0].A1R = 0;
CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | STD_FIXED_ID_ARB(pCanMsg->Id);
}
else
{
- /* extended ID Fixed AKHE*/
+ /* extended ID Fixed AKHE */
//CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
//CAN->sMsgObj[0].A2R = ((CAN->sMsgObj[0].A2R) & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
CAN->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
Modified: trunk/firmware/arm/str/dosubst.bat
===================================================================
--- trunk/firmware/arm/str/dosubst.bat 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/firmware/arm/str/dosubst.bat 2008-02-17 14:54:15 UTC (rev 845)
@@ -1,4 +1,16 @@
rem use setenv_vscp.bat in VSCP root to set j to the correct folder
rem
+
+rem gcc
+rem ===
+
subst k: "C:/Program Files/yagarto/arm-elf"
set INCLUDE = "C:\Program Files\yagarto\arm-elf\include;j:\common"
+
+rem openocd
+rem =======
+rem if openocd-ftd2xx.exe is not in the path add it or edit the str makefile to point at it
+
+rem openocd does not handle long paths so we have to do this to make them
+rem shorter.
+subst l: d:\development\vscp\firmware\arm\str\common\openocd\windows
Modified: trunk/setenv_vscp.bat
===================================================================
--- trunk/setenv_vscp.bat 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/setenv_vscp.bat 2008-02-17 14:54:15 UTC (rev 845)
@@ -1,2 +1,6 @@
subst i: D:\development\vscp
-subst j: D:\development\vscp\firmware
\ No newline at end of file
+subst j: D:\development\vscp\firmware
+
+rem Setup gcc arm development paths etc
+subst k: "C:/Program Files/yagarto/arm-elf"
+set INCLUDE = "C:\Program Files\yagarto\arm-elf\include;j:\common"
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-28 14:17:12
|
Revision: 862
http://can.svn.sourceforge.net/can/?rev=862&view=rev
Author: akhe
Date: 2008-02-28 06:17:02 -0800 (Thu, 28 Feb 2008)
Log Message:
-----------
Fixed real life str75x CAN example for the IAR compiler
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dbgdt
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dni
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.wsdt
trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str75x_iar/cantest.ewd
trunk/firmware/arm/str/cantest_str75x_iar/cantest.ewp
trunk/firmware/arm/str/cantest_str75x_iar/main.c
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.cspy.bat
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dni
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c
Added Paths:
-----------
trunk/LPC2_CANFull_V110/
trunk/LPC2_CANFull_V110/Flash/
trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.elf
trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.hex
trunk/LPC2_CANFull_V110/Flash.ld
trunk/LPC2_CANFull_V110/LPC21XX.H
trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.Opt
trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.Uv2
trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.c
trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.h
trunk/LPC2_CANFull_V110/Startup.s
trunk/LPC2_CANFull_V110/main_FullCAN.c
trunk/LPC2_CANFull_V110/readme.txt
trunk/firmware/arm/str/cantest_str75x_iar/75x_conf.h
trunk/firmware/arm/str/cantest_str75x_iar/75x_it.c
Removed Paths:
-------------
trunk/firmware/arm/str/cantest_str75x_iar/73x_conf.h
trunk/firmware/arm/str/cantest_str75x_iar/73x_it.c
trunk/firmware/arm/str/cantest_str75x_iar/73x_lcd.c
trunk/firmware/arm/str/cantest_str75x_iar/73x_lcd.h
trunk/firmware/arm/str/cantest_str75x_iar/Startup/73x_init.s
trunk/firmware/arm/str/cantest_str75x_iar/Startup/73x_vect.s
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR73x_FLASH.icf
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR73x_RAM.icf
Property Changed:
----------------
trunk/firmware/arm/str/
trunk/firmware/arm/str/cantest_str75x_iar/
trunk/firmware/arm/str/vcp_str75x_iar/project/
Added: trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.elf
===================================================================
(Binary files differ)
Property changes on: trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.elf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.hex
===================================================================
--- trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.hex (rev 0)
+++ trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.hex 2008-02-28 14:17:02 UTC (rev 862)
@@ -0,0 +1,301 @@
+:1000000018F09FE518F09FE518F09FE518F09FE5C0
+:1000100018F09FE50000A0E1F0FF1FE518F09FE554
+:1000200058000000400000004400000048000000AC
+:100030004C000000000000005000000054000000D0
+:10004000FEFFFFEAFEFFFFEAFEFFFFEAFEFFFFEA18
+:10005000FEFFFFEAFEFFFFEADC009FE5AA10A0E337
+:100060005520A0E32430A0E3043080E50130A0E374
+:10007000003080E50C1080E50C2080E5083090E52C
+:10008000013B13E2FCFFFF0A0330A0E3003080E5F0
+:100090000C1080E50C2080E5A0009FE50410A0E393
+:1000A000041080E50210A0E3001080E590009FE5B9
+:1000B000DBF021E300D0A0E1040040E2D7F021E32F
+:1000C00000D0A0E1040040E2D1F021E300D0A0E1A3
+:1000D000040040E2D2F021E300D0A0E1800040E241
+:1000E000D3F021E300D0A0E1040040E210F021E3CE
+:1000F00000D0A0E101AB4DE248109FE548209FE50C
+:1001000048309FE5030052E104009134040082343A
+:10011000FBFFFF3A0000A0E334109FE534209FE589
+:10012000020051E104008134FCFFFF3A04E08FE259
+:1001300024009FE510FF2FE1FEFFFFEA80C01FE0D3
+:1001400000C01FE000400040C0120000000000405E
+:100150000000004000000040240100407C0F00002F
+:100160000DC0A0E100D82DE904B04CE220D04DE252
+:100170000030A0E114200BE5BE304BE1B0114BE1A3
+:10018000B0315BE10F0053E30200009A0030A0E3BE
+:1001900024300BE58D0000EABE305BE128300BE532
+:1001A00028301BE5010053E30300000A28301BE55B
+:1001B000020053E30A00000A130000EA4E22A0E303
+:1001C0000B2982E24E32A0E30B3983E2003093E543
+:1001D000013783E3003082E50030A0E320300BE5F7
+:1001E0000C0000EA4E22A0E30B2982E24E32A0E38B
+:1001F0000B3983E2003093E5053983E3003082E573
+:10020000013AA0E320300BE5020000EA0030A0E351
+:1002100024300BE56D0000EAB8219FE50030A0E333
+:10022000B030C2E10E32A0E30F3983E20120A0E337
+:10023000002083E520301BE50331A0E10E3283E28C
+:10024000113983E218300BE518201BE50130A0E3DB
+:10025000003082E520301BE50331A0E10E3283E25D
+:10026000113983E2103083E218300BE518201BE5CA
+:100270000030A0E3003082E520301BE50331A0E12F
+:100280008E3283E2113983E218300BE518201BE52A
+:100290000030A0E3003082E520301BE50331A0E10F
+:1002A0000E3283E2113983E2143083E218300BE519
+:1002B00018201BE514301BE5003082E52233A0E353
+:1002C000C339A0E118300BE5B0315BE10321A0E1B7
+:1002D00018301BE5023083E018300BE50932A0E34B
+:1002E000C339A0E11C300BE5B0315BE10321A0E193
+:1002F0001C301BE5023083E01C300BE5BE305BE1B7
+:100300002C300BE52C301BE5010053E30300000A01
+:100310002C301BE5020053E30B00000A150000EA35
+:1003200018201BE5B0309FE5003082E51C201BE55E
+:100330003A30A0E3003082E5FE3EE0E30F3043E2D6
+:100340000123A0E3002083E50D0000EA18201BE54F
+:1003500088309FE5003082E51C201BE53B30A0E3A0
+:10036000003082E5FE3EE0E30F3043E20223A0E3EB
+:10037000002083E5020000EA0030A0E324300BE512
+:10038000120000EA20301BE50331A0E10E3283E2C7
+:10039000113983E2103083E218300BE518201BE599
+:1003A0000130A0E3003082E520301BE50331A0E1FD
+:1003B0000E3283E2113983E218300BE518201BE579
+:1003C0000030A0E3003082E50130A0E324300BE5EB
+:1003D00024001BE500A81BE900000040540B0000AE
+:1003E000C40C00000DC0A0E100D82DE904B04CE21F
+:1003F0002CD04DE20030A0E114100BE5BE304BE1F3
+:10040000BE305BE1000053E30300000ABE305BE155
+:10041000020053E30000008A020000EA0030A0E37B
+:1004200038300BE5D40000EA0E32A0E30F3983E246
+:100430000120A0E3002083E544339FE5B030D3E101
+:100440000338A0E14338A0E1000053E30300001AA1
+:1004500030239FE5DF3DA0E33F3083E2003082E5BB
+:100460001C339FE5B030D3E10338A0E14338A0E16D
+:10047000130053E3020000DA0030A0E338300BE54C
+:10048000BD0000EA14301BE5833AA0E1A33AA0E1E5
+:1004900014300BE5BE305BE18326A0E114301BE590
+:1004A000023083E114300BE50030A0E318300BE597
+:1004B000CC329FE5B030D3E10338A0E14328A0E17E
+:1004C00018301BE5020053E10000003A110000EA79
+:1004D000B0129FE518201BE50230A0E18330A0E1B7
+:1004E000023083E00331A0E1013083E0003093E586
+:1004F0000338A0E12338A0E114201BE5020053E1FA
+:100500000000009A030000EA18301BE5013083E286
+:1005100018300BE5E5FFFFEA68129FE518201BE5A0
+:100520000230A0E18330A0E1023083E00331A0E19A
+:10053000013083E0003093E520300BE544129FE565
+:1005400018201BE50230A0E18330A0E1023083E0F7
+:100550000331A0E1012083E014301BE5003082E587
+:100560001C229FE518329FE5B030D3E1013083E2D1
+:10057000B030C2E108329FE5B030D3E10338A0E1EA
+:100580004328A0E118301BE5020053E10000003AC7
+:10059000170000EA18301BE5013083E218300BE544
+:1005A000E0119FE518201BE50230A0E18330A0E1B7
+:1005B000023083E00331A0E1013083E0003093E5B5
+:1005C00024300BE5BC119FE518201BE50230A0E1AB
+:1005D0008330A0E1023083E00331A0E1012083E019
+:1005E00020301BE5003082E524301BE520300BE590
+:1005F000DFFFFFEA0030A0E318300BE54E32A0E346
+:100600000F3983E218201BE5002083E50E32A0E3BA
+:100610000E3983E234300BE50030A0E31C300BE5EB
+:100620005C319FE5B030D3E10338A0E14338A0E16D
+:10063000012083E2C23FA0E1A33FA0E1033082E0BA
+:10064000C320A0E11C301BE5020053E10000003A8A
+:10065000290000EA2C119FE51C201BE50230A0E1D7
+:100660008330A0E1023083E08331A0E1013083E0F8
+:10067000003093E50338A0E12338A0E128300BE5F2
+:1006800000019FE51C201BE50C10A0E30230A0E157
+:100690008330A0E1023083E08331A0E1003083E0C9
+:1006A000013083E0003093E50338A0E12338A0E176
+:1006B0002C300BE528301BE50328A0E12C301BE58E
+:1006C000033082E030300BE534201BE530301BE591
+:1006D000003082E518301BE5043083E218300BE56A
+:1006E00034301BE5043083E234300BE51C301BE56D
+:1006F000013083E21C300BE5C8FFFFEA34201BE524
+:10070000F73CA0E3FF3083E2033883E1003082E569
+:1007100018301BE5043083E218300BE58E32A0E37D
+:100720000F3983E218201BE5002083E5CE32A0E3D9
+:100730000F3983E218201BE5002083E50E32A0E389
+:100740000F3983E2103083E218201BE5002083E597
+:100750000E32A0E30F3983E2143083E218201BE548
+:10076000002083E50E32A0E30F3983E20020A0E3EE
+:10077000002083E50130A0E338300BE538001BE5AD
+:1007800000A81BE900000040200000400DC0A0E1CF
+:1007900000D82DE904B04CE20CD04DE20030A0E1CD
+:1007A000BE304BE1BE305BE10F0053E30200009A24
+:1007B0000030A0E318300BE51B0000EA2233A0E371
+:1007C000C339A0E114300BE5BE305BE10321A0E1A9
+:1007D00014301BE5023083E014300BE514201BE5D8
+:1007E0004C309FE5003082E50932A0E3C339A0E137
+:1007F00014300BE5BE305BE10321A0E114301BE5B2
+:10080000023083E014300BE514201BE53330A0E305
+:10081000003082E5FE3EE0E30F3043E20227A0E332
+:10082000002083E50130A0E318300BE518001BE53C
+:1008300000A81BE93C0B00000DC0A0E100D82DE989
+:1008400004B04CE21CD04DE20030A0E114100BE5E6
+:10085000BE304BE1BE305BE128300BE528301BE5B4
+:10086000010053E30300000A28301BE5020053E3B4
+:100870000300000A050000EA0030A0E320300BE589
+:10088000050000EA013AA0E320300BE5020000EA8F
+:100890000030A0E324300BE53F0000EA20301BE5E8
+:1008A0000331A0E10E3283E2113983E21C3083E28E
+:1008B00018300BE518301BE5003093E5043003E2F7
+:1008C000000053E30200001A0030A0E324300BE5DF
+:1008D000310000EA20301BE50331A0E10E3283E253
+:1008E000113983E2303083E218300BE518201BE524
+:1008F00014301BE5003093E50F3803E2003082E549
+:1009000018301BE5043083E218300BE518201BE596
+:1009100014301BE5003093E5833AA0E1A33AA0E14F
+:10092000003082E514301BE5043083E21C300BE517
+:1009300018301BE5043083E218300BE518201BE566
+:100940001C301BE5003093E5003082E51C301BE5D0
+:10095000043083E21C300BE518301BE5043083E2E1
+:1009600018300BE518201BE51C301BE5003093E523
+:10097000003082E520301BE50331A0E14E3283E2F6
+:10098000113983E218300BE518201BE53030A0E365
+:10099000003082E50130A0E324300BE524001BE5A4
+:1009A00000A81BE90DC0A0E100D82DE904B04CE27D
+:1009B0001CD04DE20030A0E114100BE5BE304BE13D
+:1009C000BE305BE1000053E30300000ABE305BE190
+:1009D000020053E30000008A020000EA0030A0E3B6
+:1009E00028300BE5500000EA44319FE51C300BE550
+:1009F00014301BE520300BE5BE305BE18336A0E10F
+:100A000024300BE524301BE5033483E324300BE56D
+:100A10000030A0E3B6314BE1B6215BE114319FE534
+:100A2000B030D3E10338A0E14338A0E1030052E144
+:100A3000000000BA3A0000EA1C301BE5003093E5E4
+:100A40003F33C3E3FF38C3E37F3DC3E33F30C3E33A
+:100A500024201BE5020053E12A00001A1C201BE59C
+:100A60001C301BE5003093E50334C3E3003082E51E
+:100A700020201BE51C301BE5003093E5003082E5AB
+:100A80001C301BE5043083E21C300BE520301BE5F5
+:100A9000043083E220300BE520201BE51C301BE5F1
+:100AA000003093E5003082E51C301BE5043083E222
+:100AB0001C300BE520301BE5043083E220300BE5D1
+:100AC00020201BE51C301BE5003093E5003082E55B
+:100AD0001C301BE5083043E21C300BE520301BE5E1
+:100AE000083043E220300BE51C301BE5003093E575
+:100AF000033403E2000053E30200001A0130A0E3D4
+:100B000028300BE5080000EAB6315BE1013083E2F2
+:100B1000B6314BE11C301BE50C3083E21C300BE599
+:100B2000BCFFFFEA0030A0E328300BE528001BE5FE
+:100B300000A81BE9200000400000004004C02DE593
+:100B40000DC0A0E100D82DE904B04CE20000A0E106
+:100B5000FEFFFFEA04C02DE50DC0A0E10CD82DE991
+:100B600004B04CE208D04DE20E32A0E3113983E22A
+:100B7000203083E2003093E5FF35C3E3FF39C3E360
+:100B8000EF3DC3E33F30C3E3000053E34000001AEE
+:100B90000E32A0E3113983E2203083E2003093E586
+:100BA000032BA0E1222BA0E10230A0E18330A0E1E1
+:100BB000023083E00321A0E100319FE5023083E0B1
+:100BC00020300BE50E32A0E3113983E2203083E2BE
+:100BD000003093E5FF35C3E30336C3E32338A0E1D8
+:100BE0000338A0E11C300BE51C301BE5013483E326
+:100BF000023A83E31C300BE50E32A0E3113983E2A5
+:100C0000243083E2003093E5833AA0E1A33AA0E1E7
+:100C10001C201BE5033082E11C300BE520201BE586
+:100C20001C301BE5003082E520301BE5043083E2F8
+:100C300020300BE520201BE50E32A0E3113983E2C2
+:100C4000283083E2003093E5003082E520301BE558
+:100C5000043083E220300BE520201BE50E32A0E3B8
+:100C6000113983E22C3083E2003093E5003082E5D5
+:100C70001C301BE5033483E31C300BE520301BE5FF
+:100C8000083043E220300BE520201BE51C301BE53B
+:100C9000003082E54E32A0E3113983E20420A0E364
+:100CA000002083E53F3DE0E30F3043E20020E0E336
+:100CB000002083E50C681BE90010BDE804F05EE24B
+:100CC0002000004004C02DE50DC0A0E10CD82DE9A6
+:100CD00004B04CE208D04DE20E32A0E3123983E2B8
+:100CE000203083E2003093E5FF35C3E3FF39C3E3EF
+:100CF000EF3DC3E33F30C3E3000053E34000001A7D
+:100D00000E32A0E3123983E2203083E2003093E513
+:100D1000032BA0E1222BA0E10230A0E18330A0E16F
+:100D2000023083E00321A0E100319FE5023083E03F
+:100D300020300BE50E32A0E3123983E2203083E24B
+:100D4000003093E5FF35C3E30336C3E32338A0E166
+:100D50000338A0E11C300BE51C301BE5013483E3B4
+:100D6000013983E31C300BE50E32A0E3123983E234
+:100D7000243083E2003093E5833AA0E1A33AA0E176
+:100D80001C201BE5033082E11C300BE520201BE515
+:100D90001C301BE5003082E520301BE5043083E287
+:100DA00020300BE520201BE50E32A0E3123983E250
+:100DB000283083E2003093E5003082E520301BE5E7
+:100DC000043083E220300BE520201BE50E32A0E347
+:100DD000123983E22C3083E2003093E5003082E563
+:100DE0001C301BE5033483E31C300BE520301BE58E
+:100DF000083043E220300BE520201BE51C301BE5CA
+:100E0000003082E54E32A0E3123983E20420A0E3F1
+:100E1000002083E53F3DE0E30F3043E20020E0E3C4
+:100E2000002083E50C681BE90010BDE804F05EE2D9
+:100E30002000004004C02DE50DC0A0E100D82DE940
+:100E400004B04CE20000A0E1FEFFFFEA04C02DE583
+:100E50000DC0A0E10CD82DE904B04CE238209FE58C
+:100E600034309FE5003093E5013083E2003082E5C5
+:100E70000E32A0E3013983E20120A0E3002083E5E4
+:100E80003F3DE0E30F3043E20020E0E3002083E554
+:100E90000C681BE90010BDE804F05EE22001004090
+:100EA0000DC0A0E100D82DE904B04CE20CD04DE219
+:100EB00010000BE570309FE5003093E514300BE532
+:100EC00014201BE510301BE5030052E10A00009AD4
+:100ED00014301BE510201BE5033062E0000053E3F3
+:100EE000020000BA0130A0E318300BE50C0000EA64
+:100EF0000030A0E318300BE5090000EA10301BE5D4
+:100F000014201BE5033062E0020153E30200009A63
+:100F10000130A0E318300BE5010000EA0030A0E347
+:100F200018300BE518001BE500A81BE92001004064
+:100F30000DC0A0E100D82DE904B04CE204D04DE290
+:100F400010000BE52C309FE510201BE5003093E5E9
+:100F5000033082E010300BE510001BE5CFFFFFEB04
+:100F60000030A0E10338A0E14338A0E1000053E3E2
+:100F7000F8FFFF0A00A81BE9200100400DC0A0E116
+:100F800000D82DE904B04CE210D04DE20132A0E3CC
+:100F90001C300BE50E32A0E37F3983E2013C83E293
+:100FA0000120A0E30020C3E50E32A0E30A3983E26A
+:100FB000183083E2FF28A0E3002083E5FE3EE0E353
+:100FC0000B3043E20020E0E3002083E5FF3EE0E356
+:100FD000033043E20020A0E3002083E53F3DE0E34F
+:100FE0000B3043E2CC229FE5002083E50100A0E323
+:100FF0000010A0E30727A0E31D2082E257FCFFEBCF
+:101000000200A0E30110A0E30727A0E31D2082E275
+:1010100052FCFFEB0200A0E3DBFDFFEB0E22A0E39E
+:10102000012982E2182082E25D3DA0E32F3083E2B5
+:10103000003082E50E32A0E3013983E2143083E20E
+:101040000320A0E3002083E50139A0E34E3283E2D0
+:101050000120A0E3002083E5EF3EE0E3033043E21C
+:1010600054229FE5002083E5DF3EE0E3033043E2C6
+:101070002420A0E3002083E5FE3EE0E30F3043E2BE
+:101080001020A0E3002083E50200A0E3011CA0E300
+:10109000011081E2D2FCFFEB0200A0E3021CA0E3FE
+:1010A000011081E2CEFCFFEB0100A0E3011CA0E3F4
+:1010B000021081E2CAFCFFEB0100A0E3021CA0E3E6
+:1010C000021081E2C6FCFFEB6400A0E397FFFFEB98
+:1010D0000237A0E3013C83E2023083E218300BE5E3
+:1010E0000030A0E314300BE50030A0E310300BE536
+:1010F00018304BE20200A0E30310A0E1CDFDFFEBAE
+:101100001C301BE58330A0E11C300BE51C301BE5D7
+:10111000020553E30100009A0138A0E31C300BE5FF
+:101120000E32A0E30A3983E2143083E21C201BE56F
+:10113000002083E518304BE20100A0E30310A0E19A
+:1011400017FEFFEB0030A0E10338A0E14338A0E137
+:10115000000053E32300000A18301BE5832AA0E1B6
+:10116000A22AA0E1013CA0E3023083E2030052E1A5
+:101170000A00001A18301BE5FF3083E218300BE537
+:1011800014301BE5023083E214300BE518304BE2DB
+:101190000100A0E30310A0E1A6FDFFEB110000EAAF
+:1011A00018301BE5832AA0E1A22AA0E1023CA0E3BB
+:1011B000023083E2030052E10A00001A18301BE5F6
+:1011C000013C43E2013043E218300BE514301BE5EB
+:1011D000013043E214300BE518304BE20100A0E38C
+:1011E0000310A0E193FDFFEB18304BE20200A0E3F7
+:1011F0000310A0E1EAFDFFEB0030A0E10338A0E11D
+:101200004338A0E1000053E32200000A18301BE538
+:10121000832AA0E1A22AA0E1013CA0E3013083E2FD
+:10122000030052E10A00001A18301BE5013083E286
+:1012300018300BE510301BE5023083E210300BE56F
+:1012400018304BE20200A0E30310A0E179FDFFEBB0
+:10125000100000EA18301BE5832AA0E1A22AA0E1D1
+:10126000023CA0E3013083E2030052E10900001ACE
+:1012700018301BE5013083E218300BE510301BE518
+:10128000013043E210300BE518304BE20200A0E3DE
+:101290000310A0E167FDFFEBFA0FA0E323FFFFEBD4
+:1012A0000E32A0E30A3983E21C3083E21C201BE5E6
+:1012B000002083E591FFFFEA340E00004C0E000091
+:00000001FF
Added: trunk/LPC2_CANFull_V110/Flash.ld
===================================================================
--- trunk/LPC2_CANFull_V110/Flash.ld (rev 0)
+++ trunk/LPC2_CANFull_V110/Flash.ld 2008-02-28 14:17:02 UTC (rev 862)
@@ -0,0 +1,130 @@
+/***********************************************************************/
+/* This file is part of the ARM Compiler package */
+/* Copyright KEIL ELEKTRONIK GmbH 1992-2004 */
+/***********************************************************************/
+/* */
+/* TARGET.LD: Linker Script File */
+/* */
+/***********************************************************************/
+
+
+/*
+//*** <<< Use Configuration Wizard in Context Menu >>> ***
+*/
+
+
+/*
+// <h> Memory Configuration
+// <h> Code (Read Only)
+// <o> Start <0x0-0xFFFFFFFF>
+// <o1> Size <0x0-0xFFFFFFFF>
+// </h>
+// <h> Data (Read/Write)
+// <o2> Start <0x0-0xFFFFFFFF>
+// <o3> Size <0x0-0xFFFFFFFF>
+// </h>
+// </h>
+*/
+
+/* Memory Definitions */
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x0003E000
+ DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000
+}
+
+
+/* Section Definitions */
+
+SECTIONS
+{
+
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ *startup.o (.text) /* Startup code */
+ *(.text) /* remaining code */
+
+ *(.glue_7t) *(.glue_7)
+
+ } >CODE =0
+
+ . = ALIGN(4);
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata)
+ } >CODE
+
+ . = ALIGN(4);
+
+ _etext = . ;
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ _data = . ;
+ *(.data)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = . ;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = . ;
+ __bss_start__ = . ;
+ *(.bss)
+ *(COMMON)
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = . ;
+ __bss_end__ = . ;
+
+ _end = .;
+ PROVIDE (end = .);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
Added: trunk/LPC2_CANFull_V110/LPC21XX.H
===================================================================
--- trunk/LPC2_CANFull_V110/LPC21XX.H (rev 0)
+++ trunk/LPC2_CANFull_V110/LPC21XX.H 2008-02-28 14:17:02 UTC (rev 862)
@@ -0,0 +1,377 @@
+/***********************************************************************/
+/* This file is part of the uVision/ARM development tools */
+/* Copyright KEIL ELEKTRONIK GmbH 2002-2004 */
+/***********************************************************************/
+/* */
+/* LPC21XX.H: Header file for Philips LPC2114 / LPC2119 */
+/* LPC2124 / LPC2129 */
+/* LPC2194 */
+/* */
+/***********************************************************************/
+
+#ifndef __LPC21xx_H
+#define __LPC21xx_H
+
+/* Vectored Interrupt Controller (VIC) */
+#define VICIRQStatus (*((volatile unsigned long *) 0xFFFFF000))
+#define VICFIQStatus (*((volatile unsigned long *) 0xFFFFF004))
+#define VICRawIntr (*((volatile unsigned long *) 0xFFFFF008))
+#define VICIntSelect (*((volatile unsigned long *) 0xFFFFF00C))
+#define VICIntEnable (*((volatile unsigned long *) 0xFFFFF010))
+#define VICIntEnClr (*((volatile unsigned long *) 0xFFFFF014))
+#define VICSoftInt (*((volatile unsigned long *) 0xFFFFF018))
+#define VICSoftIntClr (*((volatile unsigned long *) 0xFFFFF01C))
+#define VICProtection (*((volatile unsigned long *) 0xFFFFF020))
+#define VICVectAddr (*((volatile unsigned long *) 0xFFFFF030))
+#define VICDefVectAddr (*((volatile unsigned long *) 0xFFFFF034))
+#define VICVectAddr0 (*((volatile unsigned long *) 0xFFFFF100))
+#define VICVectAddr1 (*((volatile unsigned long *) 0xFFFFF104))
+#define VICVectAddr2 (*((volatile unsigned long *) 0xFFFFF108))
+#define VICVectAddr3 (*((volatile unsigned long *) 0xFFFFF10C))
+#define VICVectAddr4 (*((volatile unsigned long *) 0xFFFFF110))
+#define VICVectAddr5 (*((volatile unsigned long *) 0xFFFFF114))
+#define VICVectAddr6 (*((volatile unsigned long *) 0xFFFFF118))
+#define VICVectAddr7 (*((volatile unsigned long *) 0xFFFFF11C))
+#define VICVectAddr8 (*((volatile unsigned long *) 0xFFFFF120))
+#define VICVectAddr9 (*((volatile unsigned long *) 0xFFFFF124))
+#define VICVectAddr10 (*((volatile unsigned long *) 0xFFFFF128))
+#define VICVectAddr11 (*((volatile unsigned long *) 0xFFFFF12C))
+#define VICVectAddr12 (*((volatile unsigned long *) 0xFFFFF130))
+#define VICVectAddr13 (*((volatile unsigned long *) 0xFFFFF134))
+#define VICVectAddr14 (*((volatile unsigned long *) 0xFFFFF138))
+#define VICVectAddr15 (*((volatile unsigned long *) 0xFFFFF13C))
+#define VICVectCntl0 (*((volatile unsigned long *) 0xFFFFF200))
+#define VICVectCntl1 (*((volatile unsigned long *) 0xFFFFF204))
+#define VICVectCntl2 (*((volatile unsigned long *) 0xFFFFF208))
+#define VICVectCntl3 (*((volatile unsigned long *) 0xFFFFF20C))
+#define VICVectCntl4 (*((volatile unsigned long *) 0xFFFFF210))
+#define VICVectCntl5 (*((volatile unsigned long *) 0xFFFFF214))
+#define VICVectCntl6 (*((volatile unsigned long *) 0xFFFFF218))
+#define VICVectCntl7 (*((volatile unsigned long *) 0xFFFFF21C))
+#define VICVectCntl8 (*((volatile unsigned long *) 0xFFFFF220))
+#define VICVectCntl9 (*((volatile unsigned long *) 0xFFFFF224))
+#define VICVectCntl10 (*((volatile unsigned long *) 0xFFFFF228))
+#define VICVectCntl11 (*((volatile unsigned long *) 0xFFFFF22C))
+#define VICVectCntl12 (*((volatile unsigned long *) 0xFFFFF230))
+#define VICVectCntl13 (*((volatile unsigned long *) 0xFFFFF234))
+#define VICVectCntl14 (*((volatile unsigned long *) 0xFFFFF238))
+#define VICVectCntl15 (*((volatile unsigned long *) 0xFFFFF23C))
+
+/* Pin Connect Block */
+#define PINSEL0 (*((volatile unsigned long *) 0xE002C000))
+#define PINSEL1 (*((volatile unsigned long *) 0xE002C004))
+#define PINSEL2 (*((volatile unsigned long *) 0xE002C014))
+
+/* General Purpose Input/Output (GPIO) */
+#define IOPIN0 (*((volatile unsigned long *) 0xE0028000))
+#define IOSET0 (*((volatile unsigned long *) 0xE0028004))
+#define IODIR0 (*((volatile unsigned long *) 0xE0028008))
+#define IOCLR0 (*((volatile unsigned long *) 0xE002800C))
+#define IOPIN1 (*((volatile unsigned long *) 0xE0028010))
+#define IOSET1 (*((volatile unsigned long *) 0xE0028014))
+#define IODIR1 (*((volatile unsigned long *) 0xE0028018))
+#define IOCLR1 (*((volatile unsigned long *) 0xE002801C))
+
+/* Memory Accelerator Module (MAM) */
+#define MAMCR (*((volatile unsigned char *) 0xE01FC000))
+#define MAMTIM (*((volatile unsigned char *) 0xE01FC004))
+#define MEMMAP (*((volatile unsigned char *) 0xE01FC040))
+
+/* Phase Locked Loop (PLL) */
+#define PLLCON (*((volatile unsigned char *) 0xE01FC080))
+#define PLLCFG (*((volatile unsigned char *) 0xE01FC084))
+#define PLLSTAT (*((volatile unsigned short*) 0xE01FC088))
+#define PLLFEED (*((volatile unsigned char *) 0xE01FC08C))
+
+/* VPB Divider */
+#define VPBDIV (*((volatile unsigned char *) 0xE01FC100))
+
+/* Power Control */
+#define PCON (*((volatile unsigned char *) 0xE01FC0C0))
+#define PCONP (*((volatile unsigned long *) 0xE01FC0C4))
+
+/* External Interrupts */
+#define EXTINT (*((volatile unsigned char *) 0xE01FC140))
+#define EXTWAKE (*((volatile unsigned char *) 0xE01FC144))
+#define EXTMODE (*((volatile unsigned char *) 0xE01FC148))
+#define EXTPOLAR (*((volatile unsigned char *) 0xE01FC14C))
+
+/* Timer 0 */
+#define T0IR (*((volatile unsigned long *) 0xE0004000))
+#define T0TCR (*((volatile unsigned long *) 0xE0004004))
+#define T0TC (*((volatile unsigned long *) 0xE0004008))
+#define T0PR (*((volatile unsigned long *) 0xE000400C))
+#define T0PC (*((volatile unsigned long *) 0xE0004010))
+#define T0MCR (*((volatile unsigned long *) 0xE0004014))
+#define T0MR0 (*((volatile unsigned long *) 0xE0004018))
+#define T0MR1 (*((volatile unsigned long *) 0xE000401C))
+#define T0MR2 (*((volatile unsigned long *) 0xE0004020))
+#define T0MR3 (*((volatile unsigned long *) 0xE0004024))
+#define T0CCR (*((volatile unsigned long *) 0xE0004028))
+#define T0CR0 (*((volatile unsigned long *) 0xE000402C))
+#define T0CR1 (*((volatile unsigned long *) 0xE0004030))
+#define T0CR2 (*((volatile unsigned long *) 0xE0004034))
+#define T0CR3 (*((volatile unsigned long *) 0xE0004038))
+#define T0EMR (*((volatile unsigned long *) 0xE000403C))
+
+/* Timer 1 */
+#define T1IR (*((volatile unsigned long *) 0xE0008000))
+#define T1TCR (*((volatile unsigned long *) 0xE0008004))
+#define T1TC (*((volatile unsigned long *) 0xE0008008))
+#define T1PR (*((volatile unsigned long *) 0xE000800C))
+#define T1PC (*((volatile unsigned long *) 0xE0008010))
+#define T1MCR (*((volatile unsigned long *) 0xE0008014))
+#define T1MR0 (*((volatile unsigned long *) 0xE0008018))
+#define T1MR1 (*((volatile unsigned long *) 0xE000801C))
+#define T1MR2 (*((volatile unsigned long *) 0xE0008020))
+#define T1MR3 (*((volatile unsigned long *) 0xE0008024))
+#define T1CCR (*((volatile unsigned long *) 0xE0008028))
+#define T1CR0 (*((volatile unsigned long *) 0xE000802C))
+#define T1CR1 (*((volatile unsigned long *) 0xE0008030))
+#define T1CR2 (*((volatile unsigned long *) 0xE0008034))
+#define T1CR3 (*((volatile unsigned long *) 0xE0008038))
+#define T1EMR (*((volatile unsigned long *) 0xE000803C))
+
+/* Pulse Width Modulator (PWM) */
+#define PWMIR (*((volatile unsigned long *) 0xE0014000))
+#define PWMTCR (*((volatile unsigned long *) 0xE0014004))
+#define PWMTC (*((volatile unsigned long *) 0xE0014008))
+#define PWMPR (*((volatile unsigned long *) 0xE001400C))
+#define PWMPC (*((volatile unsigned long *) 0xE0014010))
+#define PWMMCR (*((volatile unsigned long *) 0xE0014014))
+#define PWMMR0 (*((volatile unsigned long *) 0xE0014018))
+#define PWMMR1 (*((volatile unsigned long *) 0xE001401C))
+#define PWMMR2 (*((volatile unsigned long *) 0xE0014020))
+#define PWMMR3 (*((volatile unsigned long *) 0xE0014024))
+#define PWMMR4 (*((volatile unsigned long *) 0xE0014040))
+#define PWMMR5 (*((volatile unsigned long *) 0xE0014044))
+#define PWMMR6 (*((volatile unsigned long *) 0xE0014048))
+#define PWMCCR (*((volatile unsigned long *) 0xE0014028))
+#define PWMCR0 (*((volatile unsigned long *) 0xE001402C))
+#define PWMCR1 (*((volatile unsigned long *) 0xE0014030))
+#define PWMCR2 (*((volatile unsigned long *) 0xE0014034))
+#define PWMCR3 (*((volatile unsigned long *) 0xE0014038))
+#define PWMEMR (*((volatile unsigned long *) 0xE001403C))
+#define PWMPCR (*((volatile unsigned long *) 0xE001404C))
+#define PWMLER (*((volatile unsigned long *) 0xE0014050))
+
+/* Universal Asynchronous Receiver Transmitter 0 (UART0) */
+#define U0RBR (*((volatile unsigned char *) 0xE000C000))
+#define U0THR (*((volatile unsigned char *) 0xE000C000))
+#define U0IER (*((volatile unsigned char *) 0xE000C004))
+#define U0IIR (*((volatile unsigned char *) 0xE000C008))
+#define U0FCR (*((volatile unsigned char *) 0xE000C008))
+#define U0LCR (*((volatile unsigned char *) 0xE000C00C))
+#define U0MCR (*((volatile unsigned char *) 0xE000C010))
+#defin...
[truncated message content] |
|
From: <ak...@us...> - 2008-03-14 08:05:42
|
Revision: 868
http://can.svn.sourceforge.net/can/?rev=868&view=rev
Author: akhe
Date: 2008-03-14 01:05:37 -0700 (Fri, 14 Mar 2008)
Log Message:
-----------
Fixed some bugs in VSCP serial routines.
Fixed bug in str75x CAN library
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c
trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
trunk/firmware/common/inttypes.h
trunk/firmware/common/vscp_serial.c
trunk/firmware/common/vscp_serial.h
trunk/src/common/com_win32.cpp
trunk/src/vscp/common/canal.h
Property Changed:
----------------
trunk/src/vscp/
trunk/src/vscp/vscpworks/
Modified: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c 2008-03-01 15:26:59 UTC (rev 867)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c 2008-03-14 08:05:37 UTC (rev 868)
@@ -417,9 +417,11 @@
}
else
{
- /* extended ID*/
- CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ /* extended ID AKHE*/
+ //CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CAN->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MCR = (CAN->sMsgObj[0].MCR & 0xFEF0) | CAN_MCR_NEWDAT | CAN_MCR_TXRQST | pCanMsg->Dlc;
@@ -483,11 +485,12 @@
}
else
{
- /* extended ID*/
+ /* extended ID AKHE*/
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
- pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
- pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
+ //pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
+ //pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MCR & 0x0F;
@@ -559,9 +562,11 @@
}
else
{
- /* extended ID*/
- CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].A2R = ((CAN->sMsgObj[0].A2R) & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ /* extended ID AKHE*/
+ //CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].A2R = ((CAN->sMsgObj[0].A2R) & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CAN->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MCR = (CAN->sMsgObj[0].MCR & 0xFCF0) | pCanMsg->Dlc;
@@ -614,9 +619,10 @@
{
/* extended ID*/
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
- pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
- pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
+ //pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
+ //pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MCR & 0x0F;
Modified: trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-03-01 15:26:59 UTC (rev 867)
+++ trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-03-14 08:05:37 UTC (rev 868)
@@ -490,7 +490,7 @@
//pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
//pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
//pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
- pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
+ pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MCR & 0x0F;
@@ -585,8 +585,8 @@
/* extended ID Fixed AKHE */
//CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
//CAN->sMsgObj[0].A2R = ((CAN->sMsgObj[0].A2R) & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
- CAN->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
- CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
+ CAN->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MCR = (CAN->sMsgObj[0].MCR & 0xFCF0) | pCanMsg->Dlc;
@@ -642,7 +642,7 @@
//pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
//pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
//pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
- pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
+ pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MCR & 0x0F;
Modified: trunk/firmware/common/inttypes.h
===================================================================
--- trunk/firmware/common/inttypes.h 2008-03-01 15:26:59 UTC (rev 867)
+++ trunk/firmware/common/inttypes.h 2008-03-14 08:05:37 UTC (rev 868)
@@ -44,5 +44,4 @@
-
#endif
Modified: trunk/firmware/common/vscp_serial.c
===================================================================
--- trunk/firmware/common/vscp_serial.c 2008-03-01 15:26:59 UTC (rev 867)
+++ trunk/firmware/common/vscp_serial.c 2008-03-14 08:05:37 UTC (rev 868)
@@ -38,150 +38,173 @@
* ******************************************************************************
*/
+#include <stdio.h>
+#include <string.h>
#include "vscp.h"
+#include "vscp_projdefs.h"
#include "vscp_serial.h"
#include "crc.h"
// Globals
-uint8_t main_state; // state for the state machine
-uint8_t sub_state; // substate for the state machine
-uint8_t msgbuffer[15]; // Buffer for current event
-uint8_t buffer_cnt; // Character count for buffer
-uint8_t checksum; // Packet checksum
+uint8_t vs_main_state; // state for the state machine
+uint8_t vs_sub_state; // substate for the state machine
+uint8_t vs_msgbuffer[ VSCP_SERIAL_BUFFER_SIZE ]; // Buffer for current event
+uint8_t vs_buffer_cnt; // Character count for buffer
+uint8_t vs_checksum; // Packet checksum
-#ifdef VSCP_SERIAL_ENABLE_FLYING_WINDOWS
+#ifdef VSCP_SERIAL_ENABLE_SLIDING_WINDOWS
// Flying windows frames
-uint8_t cntFlyFrames; // Number of outstanding flying frames
+uint8_t vs_cntSlidingWndFrames; // Number of outstanding sliding window frames
// Array with info about outstanding flying window frames
-vscp_serial_flyStruct idFlyFrames[ VSCP_SERIAL_MAX_FLYING_WINDOWS ];
+//vscp_serial_SlidingWndStruct slidingWndFrames[ VSCP_SERIAL_MAX_SLIDING_WINDOW_FRAMES ];
#endif
+
///////////////////////////////////////////////////////////////////////////////
// vs_sendchar_subst
//
-BOOL vs_sendchar_subst( uint8_t b )
+void vs_bufferSerialByte( uint8_t b )
{
+ if ( vs_buffer_cnt >= VSCP_SERIAL_BUFFER_SIZE ) return;
+ vs_msgbuffer[ vs_buffer_cnt++ ] = b;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// vs_sendchar_subst
+//
+
+BOOL vs_bufferSerialByteSubst( uint8_t *pcsum, uint8_t b )
+{
if ( DLE == b ) {
- if ( !vscp_serial_sendchar( DLE ) return FALSE;
- if ( !vscp_serial_sendchar( DLE ) return FALSE;
+ vs_bufferSerialByte( DLE );
+ vs_bufferSerialByte( DLE );
+ *pcsum ^= DLE; // Only one is used for checksum calculations
}
else {
- if ( !vscp_serial_sendchar( b ) return FALSE;
+ vs_bufferSerialByte( b );
+ *pcsum ^= b;
}
return TRUE;
}
+
///////////////////////////////////////////////////////////////////////////////
// vscp_serial_init
//
-void vs__init( void )
+void vs_init( void )
{
- main_state = VSCP_SERIAL_PROTOCOL_STATE_NONE;
- sub_state = VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE;
- buffer_cnt = 0;
- checksum = 0;
+ vs_main_state = VSCP_SERIAL_PROTOCOL_STATE_NONE;
+ vs_sub_state = VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE;
+ vs_buffer_cnt = 0;
+ vs_checksum = 0;
}
///////////////////////////////////////////////////////////////////////////////
// vscp_serial_feed
//
-BOOL vs__feed( uint8_t b )
+BOOL vs_feed( uint8_t b )
{
BOOL rv = FALSE;
switch ( b ) {
case DLE: // escape
- if ( VSCP_SERIAL_PROTOCOL_STATE_NONE == main_state ) {
- main_substate = VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE;
+ if ( VSCP_SERIAL_PROTOCOL_STATE_NONE == vs_main_state ) {
+ vs_sub_state = VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE;
}
- else if ( VSCP_SERIAL_PROTOCOL_STATE_PACKET == main_state ) {
+ else if ( VSCP_SERIAL_PROTOCOL_STATE_PACKET == vs_main_state ) {
- if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE == main_substate ) ) {
+ if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE == vs_sub_state ) {
// Second DLE => it's a DLE character
- msgbuffer[ buffer_cnt++ ] = DLE;
- main_substate = VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE;
+ vs_msgbuffer[ vs_buffer_cnt++ ] = DLE;
+ vs_sub_state = VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE;
}
+ else {
+ vs_sub_state = VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE;
+ }
}
break;
case STX: // start
- if ( ( VSCP_SERIAL_PROTOCOL_STATE_NONE == main_state ) {
+ if ( VSCP_SERIAL_PROTOCOL_STATE_NONE == vs_main_state ) {
- if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE == main_substate ) ) {
+ if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE == vs_sub_state ) {
// Here if waiting for packet and escape has been received.
// Start to receive a package
- vscp_serial_init();
+ vs_init();
+ vs_main_state = VSCP_SERIAL_PROTOCOL_STATE_PACKET;
}
}
- else if ( VSCP_SERIAL_PROTOCOL_STATE_PACKET == main_state ) {
+ else if ( VSCP_SERIAL_PROTOCOL_STATE_PACKET == vs_main_state ) {
- if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE == main_substate ) ) {
+ if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE == vs_sub_state ) {
// DLE STX in package - Start all over
- vscp_serial_init();
+ vs_init();
}
- else if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE == main_substate ) ) {
+ else if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE == vs_sub_state ) {
// Just a stray STX
- checksum ^= b;
- msgbuffer[ buffer_cnt++ ] = b;
+ vs_checksum ^= b;
+ vs_msgbuffer[ vs_buffer_cnt++ ] = b;
}
}
break;
case ETX: // End
- if ( ( VSCP_SERIAL_PROTOCOL_STATE_PACKET == main_state ) {
+ if ( VSCP_SERIAL_PROTOCOL_STATE_PACKET == vs_main_state ) {
- if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE == main_substate ) {
+ if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE == vs_sub_state ) {
+
// DLE ETX in package - We have received a packet
// Check the packet checksum and return OK
- vscp_serial_init();
-
- if ( 0 == checksum )
+ if ( 0 == vs_checksum ) {
rv = TRUE;
// Ack the frame
- vscp_serial_send_ack( msgbuffer[ 2 ], msgbuffer[ 3 ] );
+ vs_sendAck( vs_msgbuffer[ 2 ], vs_msgbuffer[ 3 ] );
}
else {
// Nack the frame
- vscp_serial_send_ack( msgbuffer[ 2 ], msgbuffer[ 3 ] );
+ vs_sendNack( vs_msgbuffer[ 2 ], vs_msgbuffer[ 3 ] );
}
+
+ vs_init();
}
- else if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE == main_substate ) {
+ else if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE == vs_sub_state ) {
// Just a stray ETX
- checksum ^= b;
- msgbuffer[ buffer_cnt++ ] = b;
+ vs_checksum ^= b;
+ vs_msgbuffer[ vs_buffer_cnt++ ] = b;
}
}
break;
- default;
+ default:
// Receiving packet
- if ( VSCP_SERIAL_PROTOCOL_STATE_PACKET == main_state ) {
- checksum ^= b;
- msgbuffer[ buffer_cnt++ ] = b;
+ if ( VSCP_SERIAL_PROTOCOL_STATE_PACKET == vs_main_state ) {
+ vs_checksum ^= b;
+ vs_msgbuffer[ vs_buffer_cnt++ ] = b;
}
break;
}
// Check for buffer overflow
- if ( buffer_cnt > VSCP_SWERIAL_FRAME_SIZE ) {
+ if ( vs_buffer_cnt > VSCP_SERIAL_FRAME_SIZE ) {
// Start all over
- main_state = VSCP_SERIAL_PROTOCOL_STATE_NONE;
- sub_state = VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE;
+ vs_main_state = VSCP_SERIAL_PROTOCOL_STATE_NONE;
+ vs_sub_state = VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE;
}
return rv;
@@ -189,139 +212,408 @@
///////////////////////////////////////////////////////////////////////////////
-// vscp_serial_send_ACK
+// vs_getFrame
//
-void vs__get_frame( vscp_serial_frame *pFrame )
+BOOL vs_getFrame( vs_frame *pFrame )
{
// Check pointer
if ( NULL == pFrame ) return FALSE;
- pFrame->opcode = msgbuffer[ 0 ];
- pFrame->flags = msgbuffer[ 1 ];
- pFrame->channel = msgbuffer[ 2 ];
- pFrame->counter = msgbuffer[ 3 ];
- pFrame->vscpclass = msgbuffer[ 4 ];
- pFrame->vscptype = msgbuffer [5 ];
- memcpy( pFrame->data, ( msgbuffer + 6 ), 16 );
+ pFrame->opcode = vs_msgbuffer[ 0 ];
+ pFrame->flags = vs_msgbuffer[ 1 ];
+ pFrame->channel = vs_msgbuffer[ 2 ];
+ pFrame->seqnumber = vs_msgbuffer[ 3 ];
+ pFrame->vscpclass = vs_msgbuffer[ 4 ];
+ pFrame->vscptype = vs_msgbuffer [5 ];
+ memcpy( pFrame->data, ( vs_msgbuffer + 6 ), 16 );
+
+ return TRUE;
}
///////////////////////////////////////////////////////////////////////////////
-// vscp_serial_send_ACK
+// vs_sendAck
//
-BOOL vs__send_ack( uint8_t channel, uint8_t counter )
+BOOL vs_sendAck( uint8_t channel, uint8_t seqnumber )
{
uint8_t checksum = 0;
// Start of frame
- if ( !vs_sendchar_subst( DLE ) return FALSE;
- vscp_serial_sendchar( STX );
+ vs_bufferSerialByte( DLE );
+ vs_bufferSerialByte( STX );
// ACK Code
- if ( !vs_sendchar_subst( VSCP_SERIAL_ACK ) return FALSE;
- checksum ^= VSCP_SERIAL_ACK;
+ vs_bufferSerialByteSubst( &checksum, VSCP_SERIAL_OPCODE_ACK );
// Channel
- if ( !vs_sendchar_subst( channel ) return FALSE;
- checksum ^= channel;
+ vs_bufferSerialByteSubst( &checksum, channel );
// Counter
- if ( !vs_sendchar_subst( counter ) return FALSE;
- checksum ^= counter;
+ vs_bufferSerialByteSubst( &checksum, seqnumber );
// Checksum
- if ( !vs_sendchar_subst( checksum ) return FALSE;
+ vs_bufferSerialByteSubst( &checksum, checksum );
// End of frame
- if ( !vs_sendchar_subst( DLE ) return FALSE;
- if ( !vs_sendchar_subst( ETX ) return FALSE;
+ vs_bufferSerialByte( DLE );
+ vs_bufferSerialByte( ETX );
+ // Send the buffer content
+ if ( !vs_sendBuffer( vs_msgbuffer, vs_buffer_cnt ) ) {
+ vs_buffer_cnt = 0;
+ return FALSE;
+ }
+ vs_buffer_cnt = 0;
+
return TRUE;
}
///////////////////////////////////////////////////////////////////////////////
-// vscp_serial_send_NACK
+// vs_sendNack
//
-BOOL vs__send_nack( uint8_t channel, uint8_t counter )
+BOOL vs_sendNack( uint8_t channel, uint8_t seqnumber )
{
uint8_t checksum = 0;
// Start of frame
- if ( !vs_sendchar_subst( DLE ) return FALSE;
- if ( !vs_sendchar_subst( STX ) return FALSE;
+ vs_bufferSerialByte( DLE );
+ vs_bufferSerialByte( STX );
// ACK Code
- if ( !vs_sendchar_subst( VSCP_SERIAL_NACK ) return FALSE;
- checksum ^= VSCP_SERIAL_NACK;
+ vs_bufferSerialByteSubst( &checksum, VSCP_SERIAL_OPCODE_NACK );
// Channel
- if ( !vs_sendchar_subst( channel ) return FALSE;
- checksum ^= channel;
+ vs_bufferSerialByteSubst( &checksum, channel );
// Counter
- if ( !vs_sendchar_subst( counter ) return FALSE;
- checksum ^= counter;
+ vs_bufferSerialByteSubst( &checksum, seqnumber );
// Checksum
- if ( !vs_sendchar_subst( checksum ) return FALSE;
+ vs_bufferSerialByteSubst( &checksum, checksum );
// End of frame
- if ( !vs_sendchar_subst( DLE ) return FALSE;
- if ( !vs_sendchar_subst( ETX ) return FALSE;
+ vs_bufferSerialByte( DLE );
+ vs_bufferSerialByte( ETX );
+ // Send the buffer content
+ if ( !vs_sendBuffer( vs_msgbuffer, vs_buffer_cnt ) ) {
+ vs_buffer_cnt = 0;
+ return FALSE;
+ }
+
+ vs_buffer_cnt = 0;
+
return TRUE;
}
///////////////////////////////////////////////////////////////////////////////
-// vscp_serial_send_frame
+// vs_sendFrame
//
-BOOL vs__send_frame( vscp_serial_frame *pFrame )
+BOOL vs_sendFrame( vs_frame *pFrame )
{
+ int i;
uint8_t checksum = 0;
// Check pointer
if ( NULL == pFrame ) return FALSE;
// Start of frame
- if ( !vs_sendchar_subst( DLE ) return FALSE;
- if ( !vs_sendchar_subst( STX ) return FALSE;
+ vs_bufferSerialByte( DLE );
+ vs_bufferSerialByte( STX );
// Operation
- if ( !vs_sendchar_subst( pFrame->opcode ) return FALSE;
- checksum ^= pFrame->opcode;
+ vs_bufferSerialByteSubst( &checksum, pFrame->opcode );
// Flags
- if ( !vs_sendchar_subst( pFrame->flags ) return FALSE;
- checksum ^= pFrame->flags;
+ vs_bufferSerialByteSubst( &checksum, pFrame->flags );
// Channel
- if ( !vs_sendchar_subst( pFrame->channel ) return FALSE;
- checksum ^= pFrame->channel;
+ vs_bufferSerialByteSubst( &checksum, pFrame->channel );
// Counter
- if ( !vs_sendchar_subst( pFrame->counter ) return FALSE;
- checksum ^= pFrame->counter;
+ vs_bufferSerialByteSubst( &checksum, pFrame->seqnumber );
// VSCP Class
- if ( !vs_sendchar_subst( pFrame->vscpclass ) return FALSE;
- checksum ^= pFrame->vscpclass;
+ vs_bufferSerialByteSubst( &checksum, pFrame->vscpclass );
// VSCP type
- if ( !vs_sendchar_subst( pFrame->vscptype ) return FALSE;
- checksum ^= pFrame->vscptype;
+ vs_bufferSerialByteSubst( &checksum, pFrame->vscptype );
// data
- for ( int i=0; i<(pFrame->flags & 0x0f); i++ ) {
- if ( !vs_sendchar_subst( pFrame->data[ i ] ) return FALSE;
- checksum ^= pFrame->data[ i ];
+ for ( i=0; i < ( pFrame->flags & 0x0f ); i++ ) {
+ vs_bufferSerialByteSubst( &checksum, pFrame->data[ i ] );
}
+
+ // Checksum
+ vs_bufferSerialByteSubst( &checksum, checksum );
// End of frame
- if ( !vs_sendchar_subst( DLE ) return FALSE;
- if ( !vs_sendchar_subst( ETX ) return FALSE;
+ vs_bufferSerialByte( DLE );
+ vs_bufferSerialByte( ETX );
+ // Send the buffer content
+ if ( !vs_sendBuffer( vs_msgbuffer, vs_buffer_cnt ) ) {
+ vs_buffer_cnt = 0;
+ return FALSE;
+ }
+
+ vs_buffer_cnt = 0;
+
return TRUE;
-}
\ No newline at end of file
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// vs_sendCommandFrame
+//
+
+BOOL vs_sendCommandFrame( uint8_t channel,
+ uint8_t seqnumber,
+ uint8_t count,
+ uint8_t *pData )
+{
+ int i;
+ uint8_t checksum = 0;
+
+ // Check pointer - Must be at least command byte
+ if ( NULL == pData ) return FALSE;
+
+ count &= 0x0f; // Max 16 bytes
+
+ // Start of frame
+ vs_bufferSerialByte( DLE );
+ vs_bufferSerialByte( STX );
+
+ // ACK Code
+ vs_bufferSerialByteSubst( &checksum, VSCP_SERIAL_OPCODE_ERROR );
+
+ // Flags: Data byte count
+ vs_bufferSerialByteSubst( &checksum, count );
+
+ // Channel
+ vs_bufferSerialByteSubst( &checksum, channel );
+
+ // Counter
+ vs_bufferSerialByteSubst( &checksum, seqnumber );
+
+ for ( i = 0; i<count; i++ ) {
+ vs_bufferSerialByteSubst( &checksum, pData[ i ] );
+ }
+
+ // Checksum
+ vs_bufferSerialByteSubst( &checksum, checksum );
+
+ // End of frame
+ vs_bufferSerialByte( DLE );
+ vs_bufferSerialByte( ETX );
+
+ // Send the buffer content
+ if ( !vs_sendBuffer( vs_msgbuffer, vs_buffer_cnt ) ) {
+ vs_buffer_cnt = 0;
+ return FALSE;
+ }
+
+ vs_buffer_cnt = 0;
+
+ return TRUE;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// vs_sendErrorFrame
+//
+
+BOOL vs_sendErrorFrame( uint8_t channel,
+ uint8_t seqnumber,
+ uint8_t count,
+ uint8_t *pData )
+{
+ int i;
+ uint8_t checksum = 0;
+
+ // Check pointer - must at least be error byte
+ if ( NULL == pData ) return FALSE;
+
+ count &= 0x0f; // Max 16 bytes
+
+ // Start of frame
+ vs_bufferSerialByte( DLE );
+ vs_bufferSerialByte( STX );
+
+ // ACK Code
+ vs_bufferSerialByteSubst( &checksum, VSCP_SERIAL_OPCODE_ERROR );
+
+ // Flags: Data byte count
+ vs_bufferSerialByteSubst( &checksum, count );
+
+ // Channel
+ vs_bufferSerialByteSubst( &checksum, channel );
+
+ // Counter
+ vs_bufferSerialByteSubst( &checksum, seqnumber );
+
+ for ( i = 0; i<count; i++ ) {
+ vs_bufferSerialByteSubst( &checksum, pData[ i ] );
+ }
+
+ // Checksum
+ vs_bufferSerialByteSubst( &checksum, checksum );
+
+ // End of frame
+ vs_bufferSerialByte( DLE );
+ vs_bufferSerialByte( ETX );
+
+ // Send the buffer content
+ if ( !vs_sendBuffer( vs_msgbuffer, vs_buffer_cnt ) ) {
+ vs_buffer_cnt = 0;
+ return FALSE;
+ }
+
+ vs_buffer_cnt = 0;
+
+ return TRUE;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifdef VSCP_SERIAL_ENABLE_SLIDING_WINDOWS
+
+
+///////////////////////////////////////////////////////////////////////////////
+// vs_initSlidingWndFrames
+//
+
+void vs_initSlidingWndFrames( vs_swStruct *pSlide )
+{
+ int i;
+
+ for ( i=0; i<VSCP_SERIAL_MAX_SLIDING_WINDOW_FRAMES; i++ ) {
+ pSlide->Frames[ i ].timestamp = 0;
+ pSlide->Frames[ i ].send_count = 0;
+ }
+
+ vs_cntSlidingWndFrames = 0;
+
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+// vs_findFlyingFrame
+//
+
+vs_swFrameStruct *
+vs_findFlyingFrame( vs_swStruct *pSlide,
+ uint8_t channel,
+ uint8_t seqnumber )
+{
+ int i;
+
+ for ( i=0; i<VSCP_SERIAL_MAX_SLIDING_WINDOW_FRAMES; i++ ) {
+ if ( ( channel == pSlide->Frames[ i ].frame.channel ) &&
+ ( seqnumber == pSlide->Frames[ i ].frame.seqnumber ) ) {
+ return &( pSlide->Frames[ i ] );
+ }
+ }
+
+ return NULL;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// vs_addSlidingWndFrame
+//
+
+BOOL vs_addSlidingWndFrame( vs_swStruct *pSlide,
+ vs_swFrameStruct *pFrame,
+ uint32_t now )
+{
+ int i;
+
+ // Check pointer
+ if ( NULL == pSlide ) return FALSE;
+
+ // Check if there is room for another frame
+ if ( pSlide->cntOutstanding >= VSCP_SERIAL_MAX_SLIDING_WINDOW_FRAMES ) return FALSE;
+
+ for ( i=0; i<VSCP_SERIAL_MAX_SLIDING_WINDOW_FRAMES; i++ ) {
+ if ( 0 == pSlide->Frames[ i ].timestamp ) {
+ memcpy( &pSlide->Frames[ i ].frame,
+ pFrame,
+ sizeof( vs_swStruct ) );
+ pSlide->Frames[ i ].timestamp = now;
+ pSlide->Frames[ i ].send_count = 0;
+ pSlide->cntOutstanding++; // Another frame added
+ return TRUE;
+ }
+ }
+
+ // No room for a new frame found - strange!!!
+ return FALSE;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// vs_removeSlidingWndFrame
+//
+
+BOOL vs_removeSlidingWndFrame( vs_swStruct *pSlide,
+ uint8_t channel,
+ uint8_t seqnumber )
+{
+ int i;
+
+ for ( i=0; i<VSCP_SERIAL_MAX_SLIDING_WINDOW_FRAMES; i++ ) {
+ if ( ( channel == pSlide->Frames[ i ].frame.channel ) &&
+ ( seqnumber == pSlide->Frames[ i ].frame.seqnumber ) ) {
+ pSlide->Frames[ i ].timestamp = 0;
+ pSlide->Frames[ i ].send_count = 0;
+ pSlide->cntOutstanding++; // Another frame removed
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// vs_timeoutSlidingWndFrame
+//
+
+void vs_timeoutSlidingWndFrame( vs_swStruct *pSlide,
+ uint32_t now )
+{
+ int i;
+ uint32_t diff;
+
+ for ( i=0; i<VSCP_SERIAL_MAX_SLIDING_WINDOW_FRAMES; i++ ) {
+ diff = pSlide->Frames[ i ].timestamp - now;
+ if ( diff > pSlide->maxtime ) {
+ if ( pSlide->Frames[ i ].send_count > pSlide->maxresend ) {
+ // Abort sending of this frame
+ vs_removeSlidingWndFrame( pSlide,
+ pSlide->Frames[ i ].frame.channel,
+ pSlide->Frames[ i ].frame.seqnumber );
+ }
+ else {
+ // Retransmit the frame
+ if ( vs_sendFrame( &pSlide->Frames[ i ].frame ) ) {
+ pSlide->Frames[ i ].timestamp = now;
+ pSlide->Frames[ i ].send_count++;
+ }
+ }
+ }
+ }
+}
+
+
+#endif // Sliding winow
\ No newline at end of file
Modified: trunk/firmware/common/vscp_serial.h
===================================================================
--- trunk/firmware/common/vscp_serial.h 2008-03-01 15:26:59 UTC (rev 867)
+++ trunk/firmware/common/vscp_serial.h 2008-03-14 08:05:37 UTC (rev 868)
@@ -41,18 +41,28 @@
#ifndef VSCP_SERIAL_H
#define VSCP_SERIAL_H
-#define VSCP_SERIAL_MAX_FLYING_WINDOWS 5
+#include <inttypes.h>
+#ifndef BOOL
+#define BOOL int
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef TRUE
+#define TRUE !FALSE
+#endif
+
// Special characters
#define DLE 0x10 // Escape character
#define STX 0x01 // Start of 'text'
#define ETX 0x02 // End of 'text'
-#define VSCP_SERIAL_FRAME_SIZE 23 // Max frame size
+#define VSCP_SERIAL_FRAME_SIZE 27 // Max frame size
+#define VSCP_SERIAL_BUFFER_SIZE VSCP_SERIAL_FRAME_SIZE * 2
-#define VSCP_SERIAL_ACK 252 // Frame ACK Code
-#define VSCP_SERIAL_NACK 253 // Frame NACK Code
-
// Protocol state machine
enum {
VSCP_SERIAL_PROTOCOL_STATE_NONE, // Wait for packet.
@@ -65,50 +75,118 @@
VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE // Escape character received
};
+// Predefined serial VSCP opcodes
+#define VSCP_SERIAL_OPCODE_NOOP 0
+#define VSCP_SERIAL_OPCODE_LEVEL1_EVENT 1
+#define VSCP_SERIAL_OPCODE_LEVEL2_EVENT 2
+#define VSCP_SERIAL_OPCODE_POLL_EVENT 3
+#define VSCP_SERIAL_OPCODE_NO_EVENT 4
+#define VSCP_SERIAL_OPCODE_RESERVED_DLE 10
+#define VSCP_SERIAL_OPCODE_SENT_ACK 249
+#define VSCP_SERIAL_OPCODE_SENT_NACK 250
+#define VSCP_SERIAL_OPCODE_ACK 251
+#define VSCP_SERIAL_OPCODE_NACK 252
+#define VSCP_SERIAL_OPCODE_ERROR 253
+#define VSCP_SERIAL_OPCODE_RESPONSE 254
+#define VSCP_SERIAL_OPCODE_COMMAND 255
+
+// CAN flag bits (uses data byte 0-3 for id and
+// bit 32 is Extended id, bit 31 RTR
+#define VSCP_SERIAL_CAN_DATA0_EXTENDED 0x80
+#define VSCP_SERIAL_CAN_DATA0_RTR 0x40
+
// The serial frame
-
typedef struct {
uint8_t opcode;
- uint8_t flags;
+ uint8_t flags; // bit0-2 data count, bit3 class bit 9
uint8_t channel;
- uint8_t counter;
+ uint8_t seqnumber;
uint8_t vscpclass;
uint8_t vscptype;
uint8_t data[16];
-} vscp_serial_frame;
+} vs_frame;
-#ifdef VSCP_SERIAL_ENABLE_FLYING_WINDOWS
+#ifdef VSCP_SERIAL_ENABLE_SLIDING_WINDOWS
-// Flying frame struct
+// Sliding window frame structure
typedef struct {
- uint8_t sendtime; // Time when frame sent
- // Zero indicate unused entry
- uint8_t id; // id for frame
-} vscp_serial_flyStruct;
+ uint32_t timestamp; // Time when frame sent/received
+ // Zero indicate unused entry
+ vs_frame frame; // frame
+ uint8_t send_count; // # times theframe has been sent
+} vs_swFrameStruct;
+
+
+typedef struct {
+ uint8_t cntOutstanding; // # send but not ACK'd frames
+ // can be max size_window
+ uint32_t maxtime; // maxtime waiting for ACK before resend
+ uint8_t maxresend; // Max # resends before giving up
+
+ vs_swFrameStruct Frames[ VSCP_SERIAL_MAX_SLIDING_WINDOW_FRAMES ]; // Pending frames
+} vs_swStruct;
+
#endif
-// External functions
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// The follwing is external functions and should be implemented
+// by the program that use this code
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
/*!
- Send a character on the serial line
+ Send a character on the serial line.
+ If its better to send a chunk of data
+ just collect data in this routine and
+ do the actial send with vs_sendFrame.
@param b Byte to send.
@return TRUE on success, FALSE on failure.
*/
-BOOL vs_sendbyte( uint8_t b ):
+BOOL vs_sendSerialByte( uint8_t b );
+/*!
+ Send content in buffer.
+ If its better to send lrger chunks of data such
+ as a frame use this call to sen dthe data that has
+ been collected with the vs_sendSerialByte. Do not
+ implement this function if vs_sendSerialByte actually
+ send the data.
+ @param pbuf buffer to send
+ @param count Pointer to number of bytes to send.
+ @return TRUE on success, F...
[truncated message content] |
|
From: <ak...@us...> - 2008-04-06 19:57:00
|
Revision: 869
http://can.svn.sourceforge.net/can/?rev=869&view=rev
Author: akhe
Date: 2008-04-06 12:56:56 -0700 (Sun, 06 Apr 2008)
Log Message:
-----------
Fixed some minor bugs
Cleaned up canal.h
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt
trunk/firmware/common/vscp_serial.c
trunk/firmware/common/vscp_serial.h
trunk/src/vscp/common/canal.h
Modified: trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep 2008-03-14 08:05:37 UTC (rev 868)
+++ trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep 2008-04-06 19:56:56 UTC (rev 869)
@@ -6,202 +6,201 @@
<configuration>
<name>Debug</name>
<outputs>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_can.h</file>
- <file>$TOOLKIT_DIR$\lib\dl4t_tl_in.a</file>
- <file>$PROJ_DIR$\Debug\Obj\main.o</file>
- <file>$PROJ_DIR$\Debug\Exe\cantest.hex</file>
- <file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_type.h</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_mrcc.pbi</file>
- <file>$TOOLKIT_DIR$\lib\shs_l.a</file>
+ <file>$PROJ_DIR$\75x_conf.h</file>
<file>$PROJ_DIR$\Debug\Obj\75x_init.o</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_it.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\cantest.pbd</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_mrcc.o</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_lib.o</file>
+ <file>$TOOLKIT_DIR$\lib\dl4t_tl_in.a</file>
<file>$PROJ_DIR$\Debug\Obj\75x_gpio.pbi</file>
- <file>$PROJ_DIR$\linker\STR75x_FLASH.icf</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_can.pbi</file>
- <file>$PROJ_DIR$\str75x_lib\src\75x_can.c</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_can.o</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_lib.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_eic.pbi</file>
<file>$PROJ_DIR$\str75x_lib\src\75x_gpio.c</file>
+ <file>$TOOLKIT_DIR$\lib\shs_l.a</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_mrcc.pbi</file>
<file>$PROJ_DIR$\Debug\Exe\cantest.out</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_eic.h</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_eic.o</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_type.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
+ <file>$PROJ_DIR$\linker\STR75x_FLASH.icf</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_lib.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_it.pbi</file>
+ <file>$PROJ_DIR$\main.c</file>
+ <file>$PROJ_DIR$\Startup\75x_vect.s</file>
+ <file>$PROJ_DIR$\str75x_lib\src\75x_can.c</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_can.h</file>
<file>$PROJ_DIR$\str75x_lib\inc\75x_lib.h</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_gpio.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_mrcc.o</file>
+ <file>$PROJ_DIR$\str75x_lib\src\75x_mrcc.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_vect.o</file>
<file>$PROJ_DIR$\str75x_lib\inc\75x_map.h</file>
<file>$PROJ_DIR$\str75x_lib\inc\75x_mrcc.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\cantest.pbd</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_eic.o</file>
+ <file>$PROJ_DIR$\75x_it.c</file>
+ <file>$PROJ_DIR$\Startup\75x_init.s</file>
+ <file>$PROJ_DIR$\Debug\Exe\cantest.hex</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_gpio.h</file>
<file>$TOOLKIT_DIR$\lib\rt4t_al.a</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_it.o</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_eic.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_eic.pbi</file>
+ <file>$PROJ_DIR$\Debug\Obj\main.o</file>
<file>$PROJ_DIR$\str75x_lib\src\75x_eic.c</file>
- <file>$PROJ_DIR$\main.c</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_vect.o</file>
- <file>$PROJ_DIR$\75x_conf.h</file>
- <file>$PROJ_DIR$\Startup\75x_vect.s</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_it.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_lib.pbi</file>
<file>$PROJ_DIR$\str75x_lib\src\75x_lib.c</file>
- <file>$PROJ_DIR$\Startup\75x_init.s</file>
- <file>$PROJ_DIR$\str75x_lib\src\75x_mrcc.c</file>
- <file>$PROJ_DIR$\75x_it.c</file>
- <file>$PROJ_DIR$\..\..\..\common\vscp_serial.c</file>
<file>$PROJ_DIR$\Debug\Obj\75x_gpio.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_can.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_can.pbi</file>
</outputs>
<file>
- <name>[ROOT_NODE]</name>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_gpio.c</name>
<outputs>
<tool>
- <name>ILINK</name>
- <file> 21</file>
+ <name>BICOMP</name>
+ <file> 3</file>
</tool>
+ <tool>
+ <name>ICCARM</name>
+ <file> 37</file>
+ </tool>
</outputs>
- </file>
- <file>
- <name>$PROJ_DIR$\Debug\Obj\cantest.pbd</name>
<inputs>
<tool>
- <name>BILINK</name>
- <file> 15 19 13 9 18 6 4</file>
+ <name>BICOMP</name>
+ <file> 28 21 0 8 22</file>
</tool>
+ <tool>
+ <name>ICCARM</name>
+ <file> 28 21 0 8 22</file>
+ </tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_can.c</name>
+ <name>$PROJ_DIR$\Debug\Exe\cantest.out</name>
<outputs>
<tool>
- <name>BICOMP</name>
- <file> 15</file>
+ <name>OBJCOPY</name>
+ <file> 27</file>
</tool>
- <tool>
- <name>ICCARM</name>
- <file> 17</file>
- </tool>
</outputs>
<inputs>
<tool>
- <name>BICOMP</name>
- <file> 0 26 33 5 27</file>
+ <name>ILINK</name>
+ <file> 10 38 24 37 1 34 11 18 20 32 5 29 2</file>
</tool>
- <tool>
- <name>ICCARM</name>
- <file> 0 26 33 5 27</file>
- </tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_gpio.c</name>
+ <name>$PROJ_DIR$\main.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 13</file>
+ <file> 9</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 40</file>
+ <file> 32</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 25 26 33 5 27</file>
+ <file> 17 21 0 8 22 16 28 30</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 25 26 33 5 27</file>
+ <file> 17 21 0 8 22 16 28 30</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\Debug\Exe\cantest.out</name>
+ <name>$PROJ_DIR$\Startup\75x_vect.s</name>
<outputs>
<tool>
- <name>OBJCOPY</name>
- <file> 3</file>
+ <name>AARM</name>
+ <file> 20</file>
</tool>
</outputs>
- <inputs>
- <tool>
- <name>ILINK</name>
- <file> 14 17 23 40 8 29 12 11 32 2 7 28 1</file>
- </tool>
- </inputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_eic.c</name>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_can.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 19</file>
+ <file> 39</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 23</file>
+ <file> 38</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 22 26 33 5</file>
+ <file> 16 21 0 8 22</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 22 26 33 5</file>
+ <file> 16 21 0 8 22</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\main.c</name>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_mrcc.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 4</file>
+ <file> 6</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 2</file>
+ <file> 18</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 24 26 33 5 27 0 25 22</file>
+ <file> 22 21 0 8</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 24 26 33 5 27 0 25 22</file>
+ <file> 22 21 0 8</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\Startup\75x_vect.s</name>
+ <name>$PROJ_DIR$\Debug\Obj\cantest.pbd</name>
+ <inputs>
+ <tool>
+ <name>BILINK</name>
+ <file> 39 31 3 12 35 6 9</file>
+ </tool>
+ </inputs>
+ </file>
+ <file>
+ <name>[ROOT_NODE]</name>
<outputs>
<tool>
- <name>AARM</name>
- <file> 32</file>
+ <name>ILINK</name>
+ <file> 7</file>
</tool>
</outputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_lib.c</name>
+ <name>$PROJ_DIR$\75x_it.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 18</file>
+ <file> 12</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 12</file>
+ <file> 34</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 24 26 33 5 27 0 25 22</file>
+ <file> 17 21 0 8 22 16 28 30</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 24 26 33 5 27 0 25 22</file>
+ <file> 17 21 0 8 22 16 28 30</file>
</tool>
</inputs>
</file>
@@ -210,53 +209,53 @@
<outputs>
<tool>
<name>AARM</name>
- <file> 8</file>
+ <file> 1</file>
</tool>
</outputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_mrcc.c</name>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_eic.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 6</file>
+ <file> 31</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 11</file>
+ <file> 24</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 27 26 33 5</file>
+ <file> 30 21 0 8</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 27 26 33 5</file>
+ <file> 30 21 0 8</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\75x_it.c</name>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_lib.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 9</file>
+ <file> 35</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 29</file>
+ <file> 11</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 24 26 33 5 27 0 25 22</file>
+ <file> 17 21 0 8 22 16 28 30</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 24 26 33 5 27 0 25 22</file>
+ <file> 17 21 0 8 22 16 28 30</file>
</tool>
</inputs>
</file>
Modified: trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt 2008-03-14 08:05:37 UTC (rev 868)
+++ trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt 2008-04-06 19:56:56 UTC (rev 869)
@@ -27,7 +27,7 @@
- <Wnd3>
+ <Wnd0>
<Tabs>
<Tab>
<Identity>TabID-14394-3889</Identity>
@@ -43,7 +43,7 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd3><Wnd4>
+ <SelectedTab>0</SelectedTab></Wnd0><Wnd1>
<Tabs>
<Tab>
<Identity>TabID-25142-3892</Identity>
@@ -55,7 +55,7 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd4><Wnd5>
+ <SelectedTab>0</SelectedTab></Wnd1><Wnd2>
<Tabs>
<Tab>
<Identity>TabID-3123-3895</Identity>
@@ -65,20 +65,20 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd5></Windows>
+ <SelectedTab>0</SelectedTab></Wnd2></Windows>
<Editor>
- <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>287</YPos><SelStart>7812</SelStart><SelEnd>7812</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>110</YPos><SelStart>8871</SelStart><SelEnd>8871</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
+ <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>287</YPos><SelStart>7822</SelStart><SelEnd>7822</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>110</YPos><SelStart>8871</SelStart><SelEnd>8871</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
- <Top><Row0><Sizes><Toolbar-01353cd8><key>iaridepm.enu1</key></Toolbar-01353cd8></Sizes></Row0><Row1><Sizes><Toolbar-09daed18><key>debuggergui.enu1</key></Toolbar-09daed18></Sizes></Row1></Top><Left><Row0><Sizes><Wnd4><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd4></Sizes></Row0></Left><Right><Row0><Sizes><Wnd5><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd5></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>122</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>124</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>180233</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
+ <Top><Row0><Sizes><Toolbar-01353bf8><key>iaridepm.enu1</key></Toolbar-01353bf8></Sizes></Row0><Row1><Sizes><Toolbar-05a17050><key>debuggergui.enu1</key></Toolbar-05a17050></Sizes></Row1></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd2></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>122</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>124</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>180233</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd0></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Project>
Modified: trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt 2008-03-14 08:05:37 UTC (rev 868)
+++ trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt 2008-04-06 19:56:56 UTC (rev 869)
@@ -25,7 +25,7 @@
<Windows>
- <Wnd2>
+ <Wnd0>
<Tabs>
<Tab>
<Identity>TabID-32711-27921</Identity>
@@ -37,7 +37,7 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd2><Wnd3>
+ <SelectedTab>0</SelectedTab></Wnd0><Wnd1>
<Tabs>
<Tab>
<Identity>TabID-18303-27987</Identity>
@@ -47,20 +47,20 @@
</Tab>
<Tab><Identity>TabID-7248-23799</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs>
- <SelectedTab>0</SelectedTab></Wnd3></Windows>
+ <SelectedTab>0</SelectedTab></Wnd1></Windows>
<Editor>
- <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>287</YPos><SelStart>7812</SelStart><SelEnd>7812</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>110</YPos><SelStart>8871</SelStart><SelEnd>8871</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
+ <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>287</YPos><SelStart>7822</SelStart><SelEnd>7822</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>110</YPos><SelStart>8871</SelStart><SelEnd>8871</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
- <Top><Row0><Sizes><Toolbar-01353cd8><key>iaridepm.enu1</key></Toolbar-01353cd8></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>446</Bottom><Right>282</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>277344</sizeVertCX><sizeVertCY>651163</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>200</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
+ <Top><Row0><Sizes><Toolbar-01353bf8><key>iaridepm.enu1</key></Toolbar-01353bf8></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>446</Bottom><Right>282</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>277344</sizeVertCX><sizeVertCY>651163</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>200</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>
Modified: trunk/firmware/common/vscp_serial.c
===================================================================
--- trunk/firmware/common/vscp_serial.c 2008-03-14 08:05:37 UTC (rev 868)
+++ trunk/firmware/common/vscp_serial.c 2008-04-06 19:56:56 UTC (rev 869)
@@ -491,7 +491,9 @@
// vs_initSlidingWndFrames
//
-void vs_initSlidingWndFrames( vs_swStruct *pSlide )
+void vs_initSlidingWndFrames( vs_swStruct *pSlide,
+ uint32_t timeout,
+ uint8_t resend )
{
int i;
@@ -500,8 +502,9 @@
pSlide->Frames[ i ].send_count = 0;
}
- vs_cntSlidingWndFrames = 0;
-
+ pSlide->cntOutstanding = 0;
+ pSlide->maxresend = resend;
+ pSlide->maxtime = timeout;
}
@@ -527,13 +530,35 @@
return NULL;
}
+///////////////////////////////////////////////////////////////////////////////
+// vs_findFreeFlyingFrame
+//
+vs_swFrameStruct *
+vs_findFreeFlyingFrame( vs_swStruct *pSlide )
+{
+ int i;
+
+ if ( pSlide->cntOutstanding >= VSCP_SERIAL_MAX_SLIDING_WINDOW_FRAMES ) {
+ return NULL;
+ }
+
+ for ( i=0; i<VSCP_SERIAL_MAX_SLIDING_WINDOW_FRAMES; i++ ) {
+ if ( ( 0 == pSlide->Frames[ i ].timestamp ) &&
+ ( 0 == pSlide->Frames[ i ].send_count ) ) {
+ return &( pSlide->Frames[ i ] );
+ }
+ }
+
+ return NULL;
+}
+
///////////////////////////////////////////////////////////////////////////////
// vs_addSlidingWndFrame
//
BOOL vs_addSlidingWndFrame( vs_swStruct *pSlide,
- vs_swFrameStruct *pFrame,
+ vs_frame *pFrame,
uint32_t now )
{
int i;
@@ -548,7 +573,7 @@
if ( 0 == pSlide->Frames[ i ].timestamp ) {
memcpy( &pSlide->Frames[ i ].frame,
pFrame,
- sizeof( vs_swStruct ) );
+ sizeof( vs_frame ) );
pSlide->Frames[ i ].timestamp = now;
pSlide->Frames[ i ].send_count = 0;
pSlide->cntOutstanding++; // Another frame added
@@ -576,7 +601,7 @@
( seqnumber == pSlide->Frames[ i ].frame.seqnumber ) ) {
pSlide->Frames[ i ].timestamp = 0;
pSlide->Frames[ i ].send_count = 0;
- pSlide->cntOutstanding++; // Another frame removed
+ pSlide->cntOutstanding--; // Another frame removed
return TRUE;
}
}
@@ -596,7 +621,10 @@
uint32_t diff;
for ( i=0; i<VSCP_SERIAL_MAX_SLIDING_WINDOW_FRAMES; i++ ) {
- diff = pSlide->Frames[ i ].timestamp - now;
+ // Skip unused positions
+ if ( 0 == pSlide->Frames[ i ].timestamp ) continue;
+
+ diff = now - pSlide->Frames[ i ].timestamp;
if ( diff > pSlide->maxtime ) {
if ( pSlide->Frames[ i ].send_count > pSlide->maxresend ) {
// Abort sending of this frame
Modified: trunk/firmware/common/vscp_serial.h
===================================================================
--- trunk/firmware/common/vscp_serial.h 2008-03-14 08:05:37 UTC (rev 868)
+++ trunk/firmware/common/vscp_serial.h 2008-04-06 19:56:56 UTC (rev 869)
@@ -263,14 +263,44 @@
#ifdef VSCP_SERIAL_ENABLE_SLIDING_WINDOWS
+/*!
+ Initialize the sliding window structure.
+ @param pSlide Pointer to the sliding window struccture.
+ @param timeout Timeout value in milliseconds.
+ @param resend Number of times to resend a frame before giving up.
+*/
+void vs_initSlidingWndFrames( vs_swStruct *pSlide,
+ uint32_t timeout,
+ uint8_t resend );
/*!
+ Find a specific frame
+ @param pSlide Pointer to the sliding window struccture.
+ @param channel The channel for the frame.
+ @param seqnumber Rge sequency number for the frame.
+ @return Found frame structure or NULL if not found.
+*/
+vs_swFrameStruct *
+vs_findFlyingFrame( vs_swStruct *pSlide,
+ uint8_t channel,
+ uint8_t seqnumber );
+
+/*!
+ Find a position that is not used.
+ @param pSlide Pointer to the sliding window struccture
+ @return Frame structure or NULL if no free location found.
+*/
+
+vs_swFrameStruct *
+vs_findFreeFlyingFrame( vs_swStruct *pSlide );
+
+/*!
Add sliding window frame
Frames get added to the structure while waiting for ACK's
for them.
*/
BOOL vs_addSlidingWndFrame( vs_swStruct *pSlide,
- vs_swFrameStruct *pFrame,
+ vs_frame *pFrame,
uint32_t now );
/*!
Modified: trunk/src/vscp/common/canal.h
===================================================================
--- trunk/src/vscp/common/canal.h 2008-03-14 08:05:37 UTC (rev 868)
+++ trunk/src/vscp/common/canal.h 2008-04-06 19:56:56 UTC (rev 869)
@@ -390,14 +390,17 @@
// * * * * Constants * * * *
/// CANAL Open i/f flags
-#define CANAL_NONBLOCK 1 // read/write are none blocking
+#define CANAL_NONBLOCK 1
+
+// read/write are none blocking
+
/// ID flags
-#define CANAL_IDFLAG_STANDARD 0x00000000 // Standard message id (11-bit)
-#define CANAL_IDFLAG_EXTENDED 0x00000001 // Extended message id (29-bit)
-#define CANAL_IDFLAG_RTR 0x00000002 // RTR-Frame
-#define CANAL_IDFLAG_ERROR 0x00000004 // This package is an error indication (id holds error code...
[truncated message content] |
|
From: <ak...@us...> - 2008-04-09 12:58:58
|
Revision: 872
http://can.svn.sourceforge.net/can/?rev=872&view=rev
Author: akhe
Date: 2008-04-09 05:58:39 -0700 (Wed, 09 Apr 2008)
Log Message:
-----------
Fixed bug in serial protocol/sliding Window driver where buffer was not initialized correctly.
Modified Paths:
--------------
trunk/firmware/common/vscp.h
trunk/firmware/common/vscp_serial.c
trunk/src/common/libwxctb-0.13/src/gpib.cpp
trunk/src/vscp/common/canal.h
Property Changed:
----------------
trunk/src/common/libwxctb-0.13/build/
trunk/src/common/libwxctb-0.13/lib/
Modified: trunk/firmware/common/vscp.h
===================================================================
--- trunk/firmware/common/vscp.h 2008-04-07 16:12:27 UTC (rev 871)
+++ trunk/firmware/common/vscp.h 2008-04-09 12:58:39 UTC (rev 872)
@@ -64,8 +64,8 @@
// The node will not try to find a nickname on startup.
-#include "vscp_compiler.h" // This file should be in your project folder
-#include "vscp_projdefs.h" // This file should be in your project folder
+#include <vscp_compiler.h> // This file should be in your project folder
+#include <vscp_projdefs.h> // This file should be in your project folder
#include <inttypes.h>
Modified: trunk/firmware/common/vscp_serial.c
===================================================================
--- trunk/firmware/common/vscp_serial.c 2008-04-07 16:12:27 UTC (rev 871)
+++ trunk/firmware/common/vscp_serial.c 2008-04-09 12:58:39 UTC (rev 872)
@@ -172,11 +172,17 @@
if ( 0 == vs_checksum ) {
rv = TRUE;
// Ack the frame
- vs_sendAck( vs_msgbuffer[ 2 ], vs_msgbuffer[ 3 ] );
+ if ( ( VSCP_SERIAL_OPCODE_ACK != vs_msgbuffer[ 0 ] ) &&
+ ( VSCP_SERIAL_OPCODE_SENT_ACK != vs_msgbuffer[ 0 ] ) ) {
+ vs_sendAck( vs_msgbuffer[ 2 ], vs_msgbuffer[ 3 ] );
+ }
}
else {
// Nack the frame
- vs_sendNack( vs_msgbuffer[ 2 ], vs_msgbuffer[ 3 ] );
+ if ( ( VSCP_SERIAL_OPCODE_NACK != vs_msgbuffer[ 0 ] ) &&
+ ( VSCP_SERIAL_OPCODE_SENT_NACK != vs_msgbuffer[ 0 ] ) ) {
+ vs_sendNack( vs_msgbuffer[ 2 ], vs_msgbuffer[ 3 ] );
+ }
}
vs_init();
@@ -225,7 +231,7 @@
pFrame->channel = vs_msgbuffer[ 2 ];
pFrame->seqnumber = vs_msgbuffer[ 3 ];
pFrame->vscpclass = vs_msgbuffer[ 4 ];
- pFrame->vscptype = vs_msgbuffer [5 ];
+ pFrame->vscptype = vs_msgbuffer [ 5 ];
memcpy( pFrame->data, ( vs_msgbuffer + 6 ), 16 );
return TRUE;
@@ -238,6 +244,8 @@
BOOL vs_sendAck( uint8_t channel, uint8_t seqnumber )
{
uint8_t checksum = 0;
+
+ vs_buffer_cnt = 0;
// Start of frame
vs_bufferSerialByte( DLE );
@@ -245,6 +253,9 @@
// ACK Code
vs_bufferSerialByteSubst( &checksum, VSCP_SERIAL_OPCODE_ACK );
+
+ // Flags
+ vs_bufferSerialByteSubst( &checksum, 0 );
// Channel
vs_bufferSerialByteSubst( &checksum, channel );
@@ -277,12 +288,17 @@
{
uint8_t checksum = 0;
+ vs_buffer_cnt = 0;
+
// Start of frame
vs_bufferSerialByte( DLE );
vs_bufferSerialByte( STX );
// ACK Code
vs_bufferSerialByteSubst( &checksum, VSCP_SERIAL_OPCODE_NACK );
+
+ // Flags
+ vs_bufferSerialByteSubst( &checksum, 0 );
// Channel
vs_bufferSerialByteSubst( &checksum, channel );
@@ -316,6 +332,8 @@
{
int i;
uint8_t checksum = 0;
+
+ vs_buffer_cnt = 0;
// Check pointer
if ( NULL == pFrame ) return FALSE;
@@ -343,8 +361,8 @@
vs_bufferSerialByteSubst( &checksum, pFrame->vscptype );
// data
- for ( i=0; i < ( pFrame->flags & 0x0f ); i++ ) {
- vs_bufferSerialByteSubst( &checksum, pFrame->data[ i ] );
+ for ( i=0; i < ( pFrame->flags & 0x1f ); i++ ) {
+ vs_bufferSerialByteSubst( &checksum, pFrame->data[ i ] );
}
// Checksum
@@ -356,8 +374,8 @@
// Send the buffer content
if ( !vs_sendBuffer( vs_msgbuffer, vs_buffer_cnt ) ) {
- vs_buffer_cnt = 0;
- return FALSE;
+ vs_buffer_cnt = 0;
+ return FALSE;
}
vs_buffer_cnt = 0;
@@ -378,6 +396,8 @@
int i;
uint8_t checksum = 0;
+ vs_buffer_cnt = 0;
+
// Check pointer - Must be at least command byte
if ( NULL == pData ) return FALSE;
@@ -434,6 +454,8 @@
int i;
uint8_t checksum = 0;
+ vs_buffer_cnt = 0;
+
// Check pointer - must at least be error byte
if ( NULL == pData ) return FALSE;
@@ -621,6 +643,7 @@
uint32_t diff;
for ( i=0; i<VSCP_SERIAL_MAX_SLIDING_WINDOW_FRAMES; i++ ) {
+
// Skip unused positions
if ( 0 == pSlide->Frames[ i ].timestamp ) continue;
Property changes on: trunk/src/common/libwxctb-0.13/build
___________________________________________________________________
Name: svn:ignore
+ debug
release
Property changes on: trunk/src/common/libwxctb-0.13/lib
___________________________________________________________________
Name: svn:ignore
+ *.dll
*.lib
*.ilk
*.pdb
Modified: trunk/src/common/libwxctb-0.13/src/gpib.cpp
===================================================================
--- trunk/src/common/libwxctb-0.13/src/gpib.cpp 2008-04-07 16:12:27 UTC (rev 871)
+++ trunk/src/common/libwxctb-0.13/src/gpib.cpp 2008-04-09 12:58:39 UTC (rev 872)
@@ -222,6 +222,7 @@
int wxGPIB::FindListeners(int board)
{
+ int i;
int listeners = 0;
if((unsigned int)board > 1) {
return -1;
@@ -233,7 +234,7 @@
Addr4882_t addrlist[31];
// The range of valid addresses is 1...30, 0 is reservated by the
// controller, 31 is not valid
- for(int i = 0;i < 30; i++) addrlist[i] = (Addr4882_t) i + 1;
+ for( i = 0;i < 30; i++) addrlist[i] = (Addr4882_t) i + 1;
addrlist[30] = NOADDR;
// place to store the results
Addr4882_t results[31];
@@ -242,7 +243,7 @@
if(ibsta & ERR) {
return -1;
}
- for(int i=0;i<=30;i++) {
+ for( i=0;i<=30;i++) {
if(results[i]) {
listeners |= 1 << results[i];
}
Modified: trunk/src/vscp/common/canal.h
===================================================================
--- trunk/src/vscp/common/canal.h 2008-04-07 16:12:27 UTC (rev 871)
+++ trunk/src/vscp/common/canal.h 2008-04-09 12:58:39 UTC (rev 872)
@@ -59,17 +59,17 @@
#define CANAL_MAIN_VERSION 1
#define CANAL_MINOR_VERSION 0
-#define CANAL_SUB_VERSION 6
+#define CANAL_SUB_VERSION 6
// Canal Levels
-#define CANAL_LEVEL_STANDARD 1
+#define CANAL_LEVEL_STANDARD 1
#define CANAL_LEVEL_USES_TCPIP 2
// VSCP daemon version information positions
#define POS_VSCPD_MAJOR_VERSION 1
#define POS_VSCPD_MINOR_VERSION 2
-#define POS_VSCPD_SUB_VERSION 3
+#define POS_VSCPD_SUB_VERSION 3
// VSCP Daemon client Open types
@@ -83,8 +83,8 @@
/// Return types
-#define PACKAGE_ACK 0
-#define PACKAGE_NACK 1
+#define PACKAGE_ACK 0
+#define PACKAGE_NACK 1
#define PACKAGE_TIMEOUT -1
#define PACKAGE_UNKNOWN -1
@@ -398,9 +398,9 @@
/// ID flags
#define CANAL_IDFLAG_STANDARD 0x00000000 // Standard message id (11-bit)
#define CANAL_IDFLAG_EXTENDED 0x00000001 // Extended message id (29-bit)
-#define CANAL_IDFLAG_RTR 0x00000002 // RTR-Frame
+#define CANAL_IDFLAG_RTR 0x00000002 // RTR-Frame
#define CANAL_IDFLAG_ERROR 0x00000004 // This package is an error indication (id holds error code)
-#define CANAL_IDFLAG_SEND 0x80000000 // Reserved for use by application software to indicate send
+#define CANAL_IDFLAG_SEND 0x80000000 // Reserved for use by application software to indicate send
/// Communicaton speeds
#define CANAL_BAUD_USER 0 // User specified (In CANAL i/f DLL).
@@ -415,116 +415,116 @@
#define CANAL_BAUD_10 9 // 10 Kbit
/// Status codes
-#define CANAL_STATUS_NONE 0x00000000
-#define CANAL_STATUS_ACTIVE 0x10000000
-#define CANAL_STATUS_PASSIVE 0x40000000
-#define CANAL_STATUS_BUS_OFF 0x80000000
-#define CANAL_STATUS_BUS_WARN 0x40000000
-#define CANAL_STATUS_PHY_FAULT 0x08000000
-#define CANAL_STATUS_PHY_H 0x04000000
-#define CANAL_STATUS_PHY_L 0x02000000
-#define CANAL_STATUS_SLEEPING 0x01000000
-#define CANAL_STATUS_STOPPED 0x00800000
+#define CANAL_STATUS_NONE 0x00000000
+#define CANAL_STATUS_ACTIVE 0x10000000
+#define CANAL_STATUS_PASSIVE 0x40000000
+#define CANAL_STATUS_BUS_OFF 0x80000000
+#define CANAL_STATUS_BUS_WARN 0x40000000
+#define CANAL_STATUS_PHY_FAULT 0x08000000
+#define CANAL_STATUS_PHY_H 0x04000000
+#define CANAL_STATUS_PHY_L 0x02000000
+#define CANAL_STATUS_SLEEPING 0x01000000
+#define CANAL_STATUS_STOPPED 0x00800000
#define CANAL_STATUS_RECIVE_BUFFER_FULL 0x00400000 // Drivers buffer
#define CANAL_STATUS_TRANSMIT_BUFFER_FULL 0x00200000 // Drivers buffer
/// Error Codes
-#define CANAL_ERROR_SUCCESS 0 // All is OK
-#define CANAL_ERROR_BAUDRATE 1 // Baudrate error
-#define CANAL_ERROR_BUS_OFF 2 // Bus off error
+#define CANAL_ERROR_SUCCESS 0 // All is OK
+#define CANAL_ERROR_BAUDRATE 1 // Baudrate error
+#define CANAL_ERROR_BUS_OFF 2 // Bus off error
#define CANAL_ERROR_BUS_PASSIVE 3 // Bus Passive error
#define CANAL_ERROR_BUS_WARNING 4 // Bus warning error
-#define CANAL_ERROR_CAN_ID 5 // Invalid CAN ID
+#define CANAL_ERROR_CAN_ID 5 // Invalid CAN ID
#define CANAL_ERROR_CAN_MESSAGE 6 // Invalid CAN message
-#define CANAL_ERROR_CHANNEL 7 // Invalid channel
+#define CANAL_ERROR_CHANNEL 7 // Invalid channel
#define CANAL_ERROR_FIFO_EMPTY 8 // FIFO is empty
-#define CANAL_ERROR_FIFO_FULL 9 // FIFI is full
-#define CANAL_ERROR_FIFO_SIZE 10 // FIFO size error
-#define CANAL_ERROR_FIFO_WAIT 11
-#define CANAL_ERROR_GENERIC 12 // Generic error
-#define CANAL_ERROR_HARDWARE 13 // Hardware error
-#define CANAL_ERROR_INIT_FAIL 14 // Initialization failed
+#define CANAL_ERROR_FIFO_FULL 9 // FIFI is full
+#define CANAL_ERROR_FIFO_SIZE 10 // FIFO size error
+#define CANAL_ERROR_FIFO_WAIT 11
+#define CANAL_ERROR_GENERIC 12 // Generic error
+#define CANAL_ERROR_HARDWARE 13 // Hardware error
+#define CANAL_ERROR_INIT_FAIL 14 // Initialization failed
#define CANAL_ERROR_INIT_MISSING 15
#define CANAL_ERROR_INIT_READY 16
#define CANAL_ERROR_NOT_SUPPORTED 17 // Not supported
-#define CANAL_ERROR_OVERRUN 18 // Overrun
-#define CANAL_ERROR_RCV_EMPTY 19 // Receive buffer empty
-#define CANAL_ERROR_REGISTER 20 // Register value error
-#define CANAL_ERROR_TRM_FULL 21
+#define CANAL_ERROR_OVERRUN 18 // Overrun
+#define CANAL_ERROR_RCV_EMPTY 19 // Receive buffer empty
+#define CANAL_ERROR_REGISTER 20 // Register value error
+#define CANAL_ERROR_TRM_FULL 21
#define CANAL_ERROR_ERRFRM_STUFF 22 // Errorframe: stuff error detected
#define CANAL_ERROR_ERRFRM_FORM 23 // Errorframe: form error detected
#define CANAL_ERROR_ERRFRM_ACK 24 // Errorframe: acknowledge error
#define CANAL_ERROR_ERRFRM_BIT1 25 // Errorframe: bit 1 error
#define CANAL_ERROR_ERRFRM_BIT0 26 // Errorframe: bit 0 error
#define CANAL_ERROR_ERRFRM_CRC 27 // Errorframe: CRC error
-#define CANAL_ERROR_LIBRARY 28 // Unable to load library
-#define CANAL_ERROR_PROCADDRESS 29 // Unable get library proc address
+#define CANAL_ERROR_LIBRARY 28 // Unable to load library
+#define CANAL_ERROR_PROCADDRESS 29 // Unable get library proc address
#define CANAL_ERROR_ONLY_ONE_INSTANCE 30 // Only one instance allowed
-#define CANAL_ERROR_SUB_DRIVER 31 // Problem with sub driver call
-#define CANAL_ERROR_TIMEOUT 32 // Blocking call timeout
+#define CANAL_ERROR_SUB_DRIVER 31 // Problem with sub driver call
+#define CANAL_ERROR_TIMEOUT 32 // Blocking call timeout
#define CANAL_ERROR_NOT_OPEN 33 // The device is not open.
#define CANAL_ERROR_PARAMETER 34 // A parameter is invalid.
#define CANAL_ERROR_MEMORY 35 // Memory exhausted.
#define CANAL_ERROR_INTERNAL 36 // Some kind of internal program error
-#define CANAL_ERROR_COMMUNICATION 37 // Some kind of communication error
+#define CANAL_ERROR_COMMUNICATION 37 // Some kind of communication error
// CANAL commands sent over the pipe interface (depricated)
-#define CANAL_COMMAND_NOOP 0 // No command
-#define CANAL_COMMAND_OPEN 1 // Open channel
-#define CANAL_COMMAND_CLOSE 2 // Close channel
-#define CANAL_COMMAND_SEND 3 // Send message
-#define CANAL_COMMAND_RECEIVE 4 // Receive message
-#define CANAL_COMMAND_CHECKDATA 5 // Check if data is available
-#define CANAL_COMMAND_BAUDRATE 6 // Set Baudrate
-#define CANAL_COMMAND_STATUS 7 // Get status
-#define CANAL_COMMAND_STATISTICS 8 // Get statistics
-#define CANAL_COMMAND_FILTER 9 // Set filter
-#define CANAL_COMMAND_MASK 10 // Set mask
-#define CANAL_COMMAND_VERSION 11 // CANAL version
-#define CANAL_COMMAND_DLL_VERSION 12 // CANAL DLL version
-#define CANAL_COMMAND_VENDOR_STRING 13 // CANAL vendor string
-#define CANAL_COMMAND_LEVEL 14 // CANAL Level bitarray
+#define CANAL_COMMAND_NOOP 0 // No command
+#define CANAL_COMMAND_OPEN 1 // Open channel
+#define CANAL_COMMAND_CLOSE 2 // Close channel
+#define CANAL_COMMAND_SEND 3 // Send message
+#define CANAL_COMMAND_RECEIVE 4 // Receive message
+#define CANAL_COMMAND_CHECKDATA 5 // Check if data is available
+#define CANAL_COMMAND_BAUDRATE 6 // Set Baudrate
+#define CANAL_COMMAND_STATUS 7 // Get status
+#define CANAL_COMMAND_STATISTICS 8 // Get statistics
+#define CANAL_COMMAND_FILTER 9 // Set filter
+#define CANAL_COMMAND_MASK 10 // Set mask
+#define CANAL_COMMAND_VERSION 11 // CANAL version
+#define CANAL_COMMAND_DLL_VERSION 12 // CANAL DLL version
+#define CANAL_COMMAND_VENDOR_STRING 13 // CANAL vendor string
+#define CANAL_COMMAND_LEVEL 14 // CANAL Level bitarray
// CANAL responses sent over the pipe interface (depricated)
-#define CANAL_RESPONSE_NONE 0 //
-#define CANAL_RESPONSE_SUCCESS 1 // OK message
-#define CANAL_RESPONSE_ERROR 2 // ERROR message
-#define CANAL_RESPONSE_MESSAGE 3 // Response to read
+#define CANAL_RESPONSE_NONE 0 //
+#define CANAL_RESPONSE_SUCCESS 1 // OK message
+#define CANAL_RESPONSE_ERROR 2 // ERROR message
+#define CANAL_RESPONSE_MESSAGE 3 // Response to read
// CANAL error codes sent over the client interface
// on error responses
-#define CANAL_IFERROR_GENERAL 128 // General error
-#define CANAL_IFERROR_UNKNOWN_COMMAND 129
-#define CANAL_IFERROR_CHANNEL_OPEN 130
-#define CANAL_IFERROR_CHANNEL_CLOSED 131
-#define CANAL_IFERROR_SEND_SUCCESS 132
+#define CANAL_IFERROR_GENERAL 128 // General error
+#define CANAL_IFERROR_UNKNOWN_COMMAND 129
+#define CANAL_IFERROR_CHANNEL_OPEN 130
+#define CANAL_IFERROR_CHANNEL_CLOSED 131
+#define CANAL_IFERROR_SEND_SUCCESS 132
#define CANAL_IFERROR_SEND_MSG_ALLOCATON 133
-#define CANAL_IFERROR_BUFFER_EMPTY 134
-#define CANAL_IFERROR_BUFFER_FULL 135
-#define CANAL_IFERROR_READ_FAILURE 136
-#define CANAL_IFERROR_SEND_STORAGE 137
+#define CANAL_IFERROR_BUFFER_EMPTY 134
+#define CANAL_IFERROR_BUFFER_FULL 135
+#define CANAL_IFERROR_READ_FAILURE 136
+#define CANAL_IFERROR_SEND_STORAGE 137
// * * * TCP/IP FAST mode interface constants
// FAST mode primary states
-#define CANAL_BINARY_FRAME_TYPE_VSCP 0 // VSCP event
-#define CANAL_BINARY_FRAME_TYPE_ERROR 1 // ACK/NACK/errors
+#define CANAL_BINARY_FRAME_TYPE_VSCP 0 // VSCP event
+#define CANAL_BINARY_FRAME_TYPE_ERROR 1 // ACK/NACK/errors
#define CANAL_BINARY_FRAME_TYPE_COMMAND 2 // Command frame
-#define CANAL_BINARY_FRAME_TYPE_CAN 3 // CAN Frame
+#define CANAL_BINARY_FRAME_TYPE_CAN 3 // CAN Frame
-#define CANAL_BINARY_COMMAND_NOOP 0 // No operation
-#define CANAL_BINARY_COMMAND_READ 1 // Read one frame
-#define CANAL_BINARY_COMMAND_CLOSE 2 // Close communication channel
+#define CANAL_BINARY_COMMAND_NOOP 0 // No operation
+#define CANAL_BINARY_COMMAND_READ 1 // Read one frame
+#define CANAL_BINARY_COMMAND_CLOSE 2 // Close communication channel
// FAST error codes
-#define CANAL_BINARY_ERROR_NONE 0 // OK
-#define CANAL_BINARY_ERROR_GENERAL 1 // General error
-#define CANAL_BINARY_ERROR_TO_SMALL 2 // Packet smaller then min packet
-#define CANAL_BINARY_ERROR_FORMAT 3 // Packet have bad format
+#define CANAL_BINARY_ERROR_NONE 0 // OK
+#define CANAL_BINARY_ERROR_GENERAL 1 // General error
+#define CANAL_BINARY_ERROR_TO_SMALL 2 // Packet smaller then min packet
+#define CANAL_BINARY_ERROR_FORMAT 3 // Packet have bad format
#define CANAL_BINARY_ERROR_UNKNOW_FRAME 4 // Unknown frame type
-#define CANAL_BINARY_ERROR_MEMORY 5 // No room for event
-#define CANAL_BINARY_ERROR_NO_DATA 6 // No data available
+#define CANAL_BINARY_ERROR_MEMORY 5 // No room for event
+#define CANAL_BINARY_ERROR_NO_DATA 6 // No data available
#define CANAL_BINARY_ERROR_INVALID_CMD 7 // Command not recognized.
// Filter mask settings
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-04-14 20:56:42
|
Revision: 874
http://can.svn.sourceforge.net/can/?rev=874&view=rev
Author: akhe
Date: 2008-04-14 13:56:11 -0700 (Mon, 14 Apr 2008)
Log Message:
-----------
Added description for debian build problem
Changed required version fro wxWidgets to 2.8.0 instead of 2.6.0
Modified Paths:
--------------
trunk/INSTALL
trunk/configure.in
trunk/m4/Makefile
trunk/src/vscp/common/canal.h
trunk/src/vscp/linuxvscpl1/Makefile
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2008-04-13 15:49:02 UTC (rev 873)
+++ trunk/INSTALL 2008-04-14 20:56:11 UTC (rev 874)
@@ -33,6 +33,10 @@
Solution: On Ubuntu at least install libssl-dev
+Complains ‘class wxXmlNode’ has no member named ‘GetNodeContent’
+================================================================
+You ned wxWidgets 2.8.0 or newer.
+
---------------------------------------------------------------------
Compile errors when issuing Make. This can be due to many things. One cause is tht the wxBase version of the wxWidgets library is used instead of the full library (wxGTK2 library). You can check if this is the cause of the failure by looking in src/canal/cancmd/Makefile. The
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2008-04-13 15:49:02 UTC (rev 873)
+++ trunk/configure.in 2008-04-14 20:56:11 UTC (rev 874)
@@ -147,9 +147,9 @@
AC_PATH_PROG( WX_CONFIG, ${WXWINDOWS_NAME}, no, ${WXWINDOWS_PATH} )
if test "${WX_CONFIG}" != "no" -a "${CXX}" != ""
then
-if expr 2.6.0 \> `${WX_CONFIG} --version` >/dev/null
+if expr 2.8.0 \> `${WX_CONFIG} --version` >/dev/null
then
- AC_MSG_ERROR([Your development package for wxWindows is too old, you need at least version 2.6.0. Please upgrade and try again.])
+ AC_MSG_ERROR([Your development package for wxWindows is too old, you need at least version 2.8.0. Please upgrade and try again.])
fi
Modified: trunk/m4/Makefile
===================================================================
--- trunk/m4/Makefile 2008-04-13 15:49:02 UTC (rev 873)
+++ trunk/m4/Makefile 2008-04-14 20:56:11 UTC (rev 874)
@@ -13,7 +13,7 @@
# PARTICULAR PURPOSE.
-SHELL = /bin/bash
+SHELL = /bin/sh
srcdir = .
top_srcdir = ..
@@ -80,12 +80,12 @@
STRIP = @STRIP@
VERSION = @VERSION@
WXLIBS =
-WX_CONFIG = /usr/local/bin/wx-config
+WX_CONFIG = /usr/bin/wx-config
YACC = yacc
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
-top_wxbuilddir = /usr/local
+top_wxbuilddir = /usr
NULL =
EXTRA_DIST = \
Modified: trunk/src/vscp/common/canal.h
===================================================================
--- trunk/src/vscp/common/canal.h 2008-04-13 15:49:02 UTC (rev 873)
+++ trunk/src/vscp/common/canal.h 2008-04-14 20:56:11 UTC (rev 874)
@@ -152,8 +152,10 @@
typedef canalStatus * PCANALSTATUS;
-// This is the define for the received callback method
+// This is the define for the received callback methodi
+#ifdef WIN32
typedef void ( __stdcall * LPFNDLL_RECEIVE_CALLBACK) ( canalMsg *pMsg );
+#endif
// CAN driver open handle
typedef long CANHANDLE;
Modified: trunk/src/vscp/linuxvscpl1/Makefile
===================================================================
--- trunk/src/vscp/linuxvscpl1/Makefile 2008-04-13 15:49:02 UTC (rev 873)
+++ trunk/src/vscp/linuxvscpl1/Makefile 2008-04-14 20:56:11 UTC (rev 874)
@@ -8,12 +8,12 @@
top_srcdir = ../../..
top_wxsrcdir = @top_wxsrcdir@
top_builddir = ../../..
-top_wxbuilddir = /usr/local
+top_wxbuilddir = /usr
CXX = g++
-CXXFLAGS = -g -O2 -I/usr/local/lib/wx/include/gtk2-unicode-debug-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXGTK__ -pthread -fPIC -fPIC
+CXXFLAGS = -g -O2 -I/usr/lib/wx/include/base-unicode-release-2.6 -I/usr/include/wx-2.6 -DwxUSE_GUI=0 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -fPIC -fPIC
CPPFLAGS = -fPIC -fPIC
CFLAGS = -fPIC
-LDFLAGS = -L/usr/local/lib -pthread -lwx_gtk2ud_aui-2.8 -lwx_gtk2ud_xrc-2.8 -lwx_gtk2ud_qa-2.8 -lwx_gtk2ud_html-2.8 -lwx_gtk2ud_adv-2.8 -lwx_gtk2ud_core-2.8 -lwx_baseud_xml-2.8 -lwx_baseud_net-2.8 -lwx_baseud-2.8
+LDFLAGS = -pthread -lwx_baseu_xml-2.6 -lwx_baseu_net-2.6 -lwx_baseu-2.6
EXTRALIBS = -pthread -W1,--version-script -lz -ldl -lm -lcrypto
DLFLAGS = -g -shared -fPIC
TRIP = strip
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-04-15 12:21:54
|
Revision: 879
http://can.svn.sourceforge.net/can/?rev=879&view=rev
Author: akhe
Date: 2008-04-15 05:21:45 -0700 (Tue, 15 Apr 2008)
Log Message:
-----------
Added some Unix build instructions.
Modified Paths:
--------------
trunk/BUILD_UNIX
trunk/TODO
trunk/src/vscp/common/old/udpreceivethread_unix.cpp~
trunk/src/vscp/vscpworks/vscpworks.pjd
Modified: trunk/BUILD_UNIX
===================================================================
--- trunk/BUILD_UNIX 2008-04-15 11:50:45 UTC (rev 878)
+++ trunk/BUILD_UNIX 2008-04-15 12:21:45 UTC (rev 879)
@@ -1,2 +1,159 @@
-Follow instructions in the file INSTALL in the root directory of the
-distribution.
+To build VSCP and friends type
+
+".configure --enable-unicode"
+
+followed by
+
+"make"
+
+and "make install" as root user.
+
+You can use ./configure --help to get help about available switches. Use --enable-debug to use the debug
+version of wxWidgets and use --enable-unicode to use the unicode version. The use of the unicode version
+is recommended.
+
+
+To compile the package you need the wxWidgets libraries (GTK2). The toolkit can be found at
+http://www.wxwidgets.org. At the moment use the graphical version of the library (not base) even if you
+only will use the nongraphic components.
+
+If you want the VSCP Works application to compile the wxWidgets library has to be configured with the
+--enable-richtext otherwise it will not compile.
+
+Configuration files should be located in /etc/vscp and there are samples of configuration files here in the root.
+The names should be vscpd.conf for the daemon and vscpworks.conf for VSCP works. The daemon can be started with
+a path to a configuration file in anoter location using the -c switch.
+
+
+Have Fun!
+/Ake <ak...@do...>
+
+
+
+Common Problems and notes
+=========================
+
+
+
+vscpworks does not compile
+==========================
+Check that you configured the wxWidgets package with --enable-richtext. If you issue "wx-config --libs" you should see the richtext library.
+
+
+
+
+Problems with missing libcrypto
+===============================
+
+Compile complains that it can't find openssl/md5.h
+
+Solution: On Ubuntu at least install libssl-dev. libcurl2-opemssl-dev also works on debian etch.
+
+
+
+Complains ‘class wxXmlNode’ has no member named ‘GetNodeContent’
+================================================================
+You need wxWidgets 2.8.0 or newer.
+
+
+
+---------------------------------------------------------------------
+
+Compile errors when issuing Make. This can be due to many things. One cause is that the wxBase version of the
+wxWidgets library is used instead of the full library (wxGTK2 library). You can check if this is the cause of
+the failure by looking in src/canal/cancmd/Makefile. The
+Makefile should have a CXXFLAGS entry that looks something like below. if it have
+-I/usr/local/lib/wx/include/base... the base library of the wxWidgets toolkit is installed and you should
+install the full version instead.
+
+CXXFLAGS = -g -O2 -I/usr/local/lib/wx/include/gtk2-ansi-debug-2.6 -I/usr/local/include/wx-2.6 -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA
+
+
+Use "wx-config" to check wxWidgets configurations
+
+
+Debian etch
+===========
+make sure libopenssl-debv and libgtk2.0-dev is installed. Fet wxWidgets-1.8.7 or later from the wxWidgets site
+and configure with
+
+./configure --enable-unicode
+
+Unsure if --enable-richtext really is needed. If you get compiants about it add the switch.
+
+Make the library with "make" and install it with "make install" if it compiled OK.
+
+tiff, gif, and librarues are needed for wxWidgets to compile install them. You can seach the package names with
+
+apt-cache search libxxx | grep libxx | less
+
+Remember to add the path to /usr/local/lib to /etc/ld.so.conf.d/i486-linux-gnu.conf and then issue "ldconfig"
+after installing the libs.
+
+After this just build and install VSCP & Friends.
+
+
+Fedora Core 4
+=============
+libwx_gtk2_xrc-2.6.so.0 is missing when you try to start cw. This means that the path to it cant be found. Add the path to /etc/ld.conf.d (new entry with /usr/local/lib) and the problem will be resolved.
+
+Known configuration that compiles out of the box on Fedora Core 4 is 2.6, ansi, debug. Release build should also work.
+
+The wx libraries was built with the following swithes
+
+./configure --enable-debug --disable-unicode
+
+"wx-config" gives the following output
+
+wx-config --prefix
+/usr/local
+
+wx-config --exec-prefix
+/usr/local
+
+wx-config --release
+2.6
+
+wx-config --list
+
+ Default config is gtk2-ansi-debug-2.6
+
+ Default config will be used for output
+
+ Alternate matches:
+ base-ansi-debug-2.6
+ base-ansi-release-2.6
+ gtk2-ansi-release-2.6
+
+wx-config --version
+2.6.3
+
+wx-config --basename
+wx_gtk2d
+
+wx-config --cc
+gcc
+
+wx-config --cppflags
+-I/usr/local/lib/wx/include/gtk2-ansi-debug-2.6 -I/usr/local/include/wx-2.6 -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA
+
+wx-config --cxxflags
+-I/usr/local/lib/wx/include/gtk2-ansi-debug-2.6 -I/usr/local/include/wx-2.6 -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA
+
+wx-config --libs
+-L/usr/local/lib -pthread -L/usr/X11R6/lib -lwx_gtk2d_xrc-2.6 -lwx_gtk2d_qa-2.6 -lwx_gtk2d_html-2.6 -lwx_gtk2d_adv-2.6 -lwx_gtk2d_core-2.6 -lwx_based_xml-2.6 -lwx_based_net-2.6 -lwx_based-2.6
+
+wx-config --cxx
+g++
+
+wx-config --ld
+g++ -shared -fPIC -o
+
+wx-config --linkdeps
+
+
+
+
+
+
+
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2008-04-15 11:50:45 UTC (rev 878)
+++ trunk/TODO 2008-04-15 12:21:45 UTC (rev 879)
@@ -8,6 +8,7 @@
VSCP Works
==========
+- No date gives garage in data field (scroll) or date???
- Edit receive events
- Add note to receive events
- Detect Connetion Lost.
@@ -17,6 +18,8 @@
Daemon
======
+- Debug levels for the daeon in runtime version.
+- syslog logging under Linux.
- Fix filter
- Variable defines
- Scheduler.
Modified: trunk/src/vscp/common/old/udpreceivethread_unix.cpp~
===================================================================
--- trunk/src/vscp/common/old/udpreceivethread_unix.cpp~ 2008-04-15 11:50:45 UTC (rev 878)
+++ trunk/src/vscp/common/old/udpreceivethread_unix.cpp~ 2008-04-15 12:21:45 UTC (rev 879)
@@ -4,25 +4,25 @@
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version
// 2 of the License, or (at your option) any later version.
-//
-// This file is part of the VSCP (http://can.sourceforge.net)
//
+// This file is part of the VSCP (http://can.sourceforge.net)
+//
// Copyright (C) 2000-2007 Ake Hedman, Eurosource,<ak...@eu...>
-//
+//
// This file 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 General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this file see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
-// $RCSfile: udpreceivethread_unix.cpp,v $
-// $Date: 2006/03/11 13:57:05 $
-// $Author: akhe $
-// $Revision: 1.13 $
+// $RCSfile: udpreceivethread_unix.cpp,v $
+// $Date: 2006/03/11 13:57:05 $
+// $Author: akhe $
+// $Revision: 1.13 $
#define _POSIX
@@ -68,237 +68,256 @@
//
//
-void udpReceiveThread( void *pObject )
+void udpReceiveThread ( void *pObject )
{
- unsigned long errorCode = 0;
- socklen_t nLen;
-
- unsigned char buf[ 1024 ];
- unsigned char *p;
+ unsigned long errorCode = 0;
+ socklen_t nLen;
- crcInit();
- CControlObject *pctrlObject = (CControlObject *)pObject;
+ unsigned char buf[ 1024 ];
+ unsigned char *p;
- char szName[ 128 ];
- struct hostent * lpLocalHostEntry;
-
- if ( -1 == gethostname( szName, sizeof( szName ) ) ) {
- wxLogError( _("UDP Receive Thread: Failed to get hostname\n") );
- pthread_exit( &errorCode );
- }
+ crcInit();
+ CControlObject *pctrlObject = ( CControlObject * ) pObject;
- wxLogDebug( _("udpReceiceThread: Hostname: %s"), szName );
-
- lpLocalHostEntry = gethostbyname( szName );
- if ( NULL == lpLocalHostEntry ) {
- wxLogError( _("UDP Receive Thread: Failed to get hostaddress\n") );
- pthread_exit( &errorCode );
- }
-
- // Get the address
- //localaddr = (in_addr_t *)lpLocalHostEntry->h_addr_list[ 0 ];
+ char szName[ 128 ];
+ struct hostent * lpLocalHostEntry;
- // Get all local addresses of the local machine
- int idx = -1;
- void *pAddr;
- in_addr_t localaddr[ 16 ]; // max 16 local addresses
- do {
- idx++;
- localaddr[ idx ] = 0;
- pAddr = (in_addr_t *)lpLocalHostEntry->h_addr_list[ idx ];
- if ( NULL != pAddr ) localaddr[ idx ] = *( ( in_addr_t *)pAddr);
- if ( NULL != pAddr )wxLogDebug( _("udpReceiceThread: Local address: %X"), *(in_addr_t *)pAddr );
- } while ( ( NULL != pAddr ) && ( idx < 16 ) );
+ if ( -1 == gethostname ( szName, sizeof ( szName ) ) )
+ {
+ wxLogError ( _ ( "UDP Receive Thread: Failed to get hostname\n" ) );
+ pthread_exit ( &errorCode );
+ }
- //
- // Create a UDP/IP datagram socket
- //
- int theSocket;
-
- theSocket = socket( AF_INET, SOCK_DGRAM, 0 );
- if ( -1 == theSocket ) {
- pthread_exit( &errorCode );
- }
-
- int on = 1; // As suggested by Charles Tewiah
- setsockopt( theSocket,
- SOL_SOCKET,
- SO_REUSEADDR,
- (const char *)&on,
- sizeof ( on ) );
-
- //
- // Fill in the address structure
- //
- struct sockaddr_in saServer;
+ wxLogDebug ( _ ( "udpReceiceThread: Hostname: %s" ), szName );
- saServer.sin_family = AF_INET;
- saServer.sin_addr.s_addr = INADDR_ANY;
- saServer.sin_port = htons( pctrlObject->m_UDPPort );
+ lpLocalHostEntry = gethostbyname ( szName );
+ if ( NULL == lpLocalHostEntry )
+ {
+ wxLogError ( _ ( "UDP Receive Thread: Failed to get hostaddress\n" ) );
+ pthread_exit ( &errorCode );
+ }
- //
- // bind the name to the socket
- //
+ // Get the address
+ //localaddr = (in_addr_t *)lpLocalHostEntry->h_addr_list[ 0 ];
- int nRet;
+ // Get all local addresses of the local machine
+ int idx = -1;
+ void *pAddr;
+ in_addr_t localaddr[ 16 ]; // max 16 local addresses
+ do
+ {
+ idx++;
+ localaddr[ idx ] = 0;
+ pAddr = ( in_addr_t * ) lpLocalHostEntry->h_addr_list[ idx ];
+ if ( NULL != pAddr ) localaddr[ idx ] = * ( ( in_addr_t * ) pAddr );
+ if ( NULL != pAddr ) wxLogDebug ( _ ( "udpReceiceThread: Local address: %X" ), * ( in_addr_t * ) pAddr );
+ }
+ while ( ( NULL != pAddr ) && ( idx < 16 ) );
- nRet = bind( theSocket,
- ( struct sockaddr * )&saServer,
- sizeof (struct sockaddr ) );
+ //
+ // Create a UDP/IP datagram socket
+ //
+ int theSocket;
- if ( -1 == nRet ) {
- pthread_exit( &errorCode );
- }
+ theSocket = socket ( AF_INET, SOCK_DGRAM, 0 );
+ if ( -1 == theSocket )
+ {
+ pthread_exit ( &errorCode );
+ }
- struct sockaddr_in saClient;
- nLen = sizeof( struct sockaddr_in );
+ int on = 1; // As suggested by Charles Tewiah
+ setsockopt ( theSocket,
+ SOL_SOCKET,
+ SO_REUSEADDR,
+ ( const char * ) &on,
+ sizeof ( on ) );
- wxLogDebug( _("udpReceiceThread: Ready to Work!") );
-
- // Receive loop
-
- while ( !pctrlObject->m_bQuit ) {
+ //
+ // Fill in the address structure
+ //
+ struct sockaddr_in saServer;
- bzero( ( uint8_t *)&saClient, sizeof( saClient ) );
- nLen = sizeof( struct sockaddr_in );
- bzero( ( uint8_t *)buf, sizeof( buf ) );
-
- // Wait for data from the client
-
- nRet = recvfrom( theSocket,
- buf,
- sizeof(buf ),
- 0,
- ( struct sockaddr * )&saClient,
- &nLen );
+ saServer.sin_family = AF_INET;
+ saServer.sin_addr.s_addr = INADDR_ANY;
+ saServer.sin_port = htons ( pctrlObject->m_UDPPort );
- if ( ( 0 == nRet ) || ( -1 == nRet ) || ( nRet < 25 ) ) {
- continue;
- }
+ //
+ // bind the name to the socket
+ //
- wxLogDebug( _("UDPReceiveThread: Incoming event. Addr=%X"),
- (in_addr_t)saClient.sin_addr.s_addr);
+ int nRet;
+ nRet = bind ( theSocket,
+ ( struct sockaddr * ) &saServer,
+ sizeof ( struct sockaddr ) );
- // Handle received package
+ if ( -1 == nRet )
+ {
+ pthread_exit ( &errorCode );
+ }
- // If this is a packet sent from this machine
- // we just disregards it
- //if ( *localaddr == saClient.sin_addr.s_addr ) continue;
- bool bLocalAddress = false;
- idx = 0;
- while ( ( 0 != localaddr[ idx ] ) && ( idx < 16 ) ) {
- if ( localaddr[ idx ] == (in_addr_t)saClient.sin_addr.s_addr ) {
- bLocalAddress = true;
- }
- idx++;
- }
- if ( bLocalAddress ) continue;
+ struct sockaddr_in saClient;
+ nLen = sizeof ( struct sockaddr_in );
- wxLogDebug( _("UDPReceiveThread: It's from another machine.") );
-
- // Check size
- // The size member must be low enough for the data to fit
- // in the package
- unsigned short size;
- p = (unsigned char *)&size;
- *(p+0) = buf[ VSCP_UDP_POS_SIZE + 1 ];
- *(p+1) = buf[ VSCP_UDP_POS_SIZE + 0 ];
-
- if ( ( size + 25 ) > nRet ) {
- // Wrong size -> Package faulty
- continue;
- }
-
- // Calculate CRC if requested
- if ( !( buf[ VSCP_UDP_POS_HEAD + 0 ] & VSCP_NO_CRC_CALC ) ) {
- if ( !crcFast( buf, size ) ) continue; // Faulty CRC
- }
+ wxLogDebug ( _ ( "udpReceiceThread: Ready to Work!" ) );
- vscpEvent *pEvent = new vscpEvent;
+ // Receive loop
- if ( NULL != pEvent ) {
+ while ( !pctrlObject->m_bQuit )
+ {
- // Head
- p = (unsigned char *)&pEvent->head;
- *(p+0) = buf[ VSCP_UDP_POS_HEAD + 0 ];
-
- // VSCP class
- p = (unsigned char *)&pEvent->vscp_class;
- *(p+0) = buf[ VSCP_UDP_POS_CLASS + 1 ];
- *(p+1) = buf[ VSCP_UDP_POS_CLASS + 0 ];
+ bzero ( ( uint8_t * ) &saClient, sizeof ( saClient ) );
+ nLen = sizeof ( struct sockaddr_in );
+ bzero ( ( uint8_t * ) buf, sizeof ( buf ) );
- // VSCP type
- p = (unsigned char *)&pEvent->vscp_type;
- *(p+0) = buf[ VSCP_UDP_POS_TYPE + 1 ];
- *(p+1) = buf[ VSCP_UDP_POS_TYPE + 0 ];
-
- // Node address
- p = (unsigned char *)&pEvent->GUID;
- memcpy( p, &buf[ VSCP_UDP_POS_GUID + 0 ], 16 );
+ // Wait for data from the client
- // Number of valid data bytes
- pEvent->sizeData = size;
+ nRet = recvfrom ( theSocket,
+ buf,
+ sizeof ( buf ),
+ 0,
+ ( struct sockaddr * ) &saClient,
+ &nLen );
- if ( pEvent->sizeData > 487 ) {
- // Can't be a VSCP package
- delete pEvent;
- continue;
- }
-
- // CRC
- p = (unsigned char *)&pEvent->crc;
- *(p+0) = buf[ VSCP_UDP_POS_CRC + 1 ];
- *(p+1) = buf[ VSCP_UDP_POS_CRC + 0 ];
+ if ( ( 0 == nRet ) || ( -1 == nRet ) || ( nRet < 25 ) )
+ {
+ continue;
+ }
- pEvent->pdata = NULL;
+ wxLogDebug ( _ ( "UDPReceiveThread: Incoming event. Addr=%X" ),
+ ( in_addr_t ) saClient.sin_addr.s_addr );
- if ( 0 != pEvent->sizeData ) {
-
- // Allocate storage for data
- unsigned char *pDataArea = new unsigned char[ pEvent->sizeData ];
- if ( NULL != pDataArea ) {
-
- // Data Max 487 (512- 25) bytes
- pEvent->pdata = pDataArea;
+ // Handle received package
- // size = sz - command_byte - control_bytes
- memcpy( pEvent->pdata, &buf[ VSCP_UDP_POS_DATA ], pEvent->sizeData );
+ // If this is a packet sent from this machine
+ // we just disregards it
+ //if ( *localaddr == saClient.sin_addr.s_addr ) continue;
+ bool bLocalAddress = false;
+ idx = 0;
+ while ( ( 0 != localaddr[ idx ] ) && ( idx < 16 ) )
+ {
+ if ( localaddr[ idx ] == ( in_addr_t ) saClient.sin_addr.s_addr )
+ {
+ bLocalAddress = true;
+ }
+ idx++;
+ }
+ if ( bLocalAddress ) continue;
- }
- }
-
- // Get mutex
- pctrlObject->m_wxUDPMutex.Lock();
+ wxLogDebug ( _ ( "UDPReceiveThread: It's from another machine." ) );
- // Must be room for the package
- if ( pctrlObject->m_UDPQueue.nCount <
- MAX_ITEMS_UDP_RECEIVE_QUEUE ) {
+ // Check size
+ // The size member must be low enough for the data to fit
+ // in the package
+ unsigned short size;
+ p = ( unsigned char * ) &size;
+ * ( p+0 ) = buf[ VSCP_UDP_POS_SIZE + 1 ];
+ * ( p+1 ) = buf[ VSCP_UDP_POS_SIZE + 0 ];
- dllnode *pnewudpmsg = new dllnode;
- if ( NULL != pnewudpmsg ) {
+ if ( ( size + 25 ) > nRet )
+ {
+ // Wrong size -> Package faulty
+ continue;
+ }
- // Add to in queue
- pnewudpmsg->Key = 0;
- pnewudpmsg->pKey = &pnewudpmsg->Key ;
- pnewudpmsg->pObject = pEvent;
-
- if ( !dll_addNode( &pctrlObject->m_UDPQueue, pnewudpmsg ) ) {
- delete pnewudpmsg;
+ // Calculate CRC if requested
+ if ( ! ( buf[ VSCP_UDP_POS_HEAD + 0 ] & VSCP_NO_CRC_CALC ) )
+ {
+ if ( !crcFast ( buf, size ) ) continue; // Faulty CRC
+ }
- }
- }
- }
+ vscpEvent *pEvent = new vscpEvent;
- // Release mutex
- pctrlObject->m_wxUDPMutex.Unlock();
+ if ( NULL != pEvent )
+ {
- }
- }
+ // Head
+ p = ( unsigned char * ) &pEvent->head;
+ * ( p+0 ) = buf[ VSCP_UDP_POS_HEAD + 0 ];
- close( theSocket );
- pthread_exit( &errorCode );
+ // VSCP class
+ p = ( unsigned char * ) &pEvent->vscp_class;
+ * ( p+0 ) = buf[ VSCP_UDP_POS_CLASS + 1 ];
+ * ( p+1 ) = buf[ VSCP_UDP_POS_CLASS + 0 ];
+ // VSCP type
+ p = ( unsigned char * ) &pEvent->vscp_type;
+ * ( p+0 ) = buf[ VSCP_UDP_POS_TYPE + 1 ];
+ * ( p+1 ) = buf[ VSCP_UDP_POS_TYPE + 0 ];
+
+ // Node address
+ p = ( unsigned char * ) &pEvent->GUID;
+ memcpy ( p, &buf[ VSCP_UDP_POS_GUID + 0 ], 16 );
+
+ // Number of valid data bytes
+ pEvent->sizeData = size;
+
+ if ( pEvent->sizeData > 487 )
+ {
+ // Can't be a VSCP package
+ delete pEvent;
+ continue;
+ }
+
+ // CRC
+ p = ( unsigned char * ) &pEvent->crc;
+ * ( p+0 ) = buf[ VSCP_UDP_POS_CRC + 1 ];
+ * ( p+1 ) = buf[ VSCP_UDP_POS_CRC + 0 ];
+
+ pEvent->pdata = NULL;
+
+ if ( 0 != pEvent->sizeData )
+ {
+
+ // Allocate storage for data
+ unsigned char *pDataArea = new unsigned char[ pEvent->sizeData ];
+
+ if ( NULL != pDataArea )
+ {
+
+ // Data Max 487 (512- 25) bytes
+ pEvent->pdata = pDataArea;
+
+ // size = sz - command_byte - control_bytes
+ memcpy ( pEvent->pdata, &buf[ VSCP_UDP_POS_DATA ], pEvent->sizeData );
+
+ }
+ }
+
+ // Get mutex
+ pctrlObject->m_wxUDPMutex.Lock();
+
+ // Must be room for the package
+ if ( pctrlObject->m_UDPQueue.nCount <
+ MAX_ITEMS_UDP_RECEIVE_QUEUE )
+ {
+
+ dllnode *pnewudpmsg = new dllnode;
+ if ( NULL != pnewudpmsg )
+ {
+
+ // Add to in queue
+ pnewudpmsg->Key = 0;
+ pnewudpmsg->pKey = &pnewudpmsg->Key ;
+ pnewudpmsg->pObject = pEvent;
+
+ if ( !dll_addNode ( &pctrlObject->m_UDPQueue, pnewudpmsg ) )
+ {
+ delete pnewudpmsg;
+
+ }
+ }
+ }
+
+ // Release mutex
+ pctrlObject->m_wxUDPMutex.Unlock();
+
+ }
+ }
+
+ close ( theSocket );
+ pthread_exit ( &errorCode );
+
}
Modified: trunk/src/vscp/vscpworks/vscpworks.pjd
===================================================================
--- trunk/src/vscp/vscpworks/vscpworks.pjd 2008-04-15 11:50:45 UTC (rev 878)
+++ trunk/src/vscp/vscpworks/vscpworks.pjd 2008-04-15 12:21:45 UTC (rev 879)
@@ -20,7 +20,7 @@
<string name="resource_prefix">""</string>
<bool name="use_two_step_construction">1</bool>
<bool name="use_enums">1</bool>
- <string name="current_platform">"<All platforms>"</string>
+ <string name="current_platform">"__WXGTK__"</string>
<string name="target_wx_version">"<Any>"</string>
<string name="cpp_header_comment">"/////////////////////////////////////////////////////////////////////////////
// Name: %HEADER-FILENAME%
@@ -270,6 +270,7 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<document>
<string name="title">"VC++ Project Debug"</string>
<string name="type">"vc-project-config-data-document"</string>
@@ -323,6 +324,7 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<string name="Project make command">"%AUTO%"</string>
<string name="Project build command">"%AUTO%"</string>
<string name="Project rebuild command">"%AUTO%"</string>
@@ -386,6 +388,7 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<string name="Project make command">"%AUTO%"</string>
<string name="Project build command">"%AUTO%"</string>
<string name="Project rebuild command">"%AUTO%"</string>
@@ -451,7 +454,12 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<string name="Command for wx-config">"%AUTO%"</string>
+ <string name="SDK path">"%AUTO%"</string>
+ <string name="Minimum OS version">"%AUTO%"</string>
+ <string name="Info.plist location">"%AUTO%"</string>
+ <string name="Icns location">"%AUTO%"</string>
</document>
<document>
<string name="title">"GCC Release shared Unicode"</string>
@@ -508,7 +516,12 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<string name="Command for wx-config">"%AUTO%"</string>
+ <string name="SDK path">"%AUTO%"</string>
+ <string name="Minimum OS version">"%AUTO%"</string>
+ <string name="Info.plist location">"%AUTO%"</string>
+ <string name="Icns location">"%AUTO%"</string>
</document>
<document>
<string name="title">"GCC Debug"</string>
@@ -565,7 +578,12 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<string name="Command for wx-config">"%AUTO%"</string>
+ <string name="SDK path">"%AUTO%"</string>
+ <string name="Minimum OS version">"%AUTO%"</string>
+ <string name="Info.plist location">"%AUTO%"</string>
+ <string name="Icns location">"%AUTO%"</string>
</document>
<document>
<string name="title">"GCC Release"</string>
@@ -622,7 +640,12 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<string name="Command for wx-config">"%AUTO%"</string>
+ <string name="SDK path">"%AUTO%"</string>
+ <string name="Minimum OS version">"%AUTO%"</string>
+ <string name="Info.plist location">"%AUTO%"</string>
+ <string name="Icns location">"%AUTO%"</string>
</document>
<document>
<string name="title">"GCC Unicode Debug"</string>
@@ -679,7 +702,12 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<string name="Command for wx-config">"%AUTO%"</string>
+ <string name="SDK path">"%AUTO%"</string>
+ <string name="Minimum OS version">"%AUTO%"</string>
+ <string name="Info.plist location">"%AUTO%"</string>
+ <string name="Icns location">"%AUTO%"</string>
</document>
<document>
<string name="title">"GCC Unicode Release"</string>
@@ -736,7 +764,12 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<string name="Command for wx-config">"%AUTO%"</string>
+ <string name="SDK path">"%AUTO%"</string>
+ <string name="Minimum OS version">"%AUTO%"</string>
+ <string name="Info.plist location">"%AUTO%"</string>
+ <string name="Icns location">"%AUTO%"</string>
</document>
<document>
<string name="title">"VC++ Project Unicode Release"</string>
@@ -791,6 +824,7 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<string name="Project make command">"%AUTO%"</string>
<string name="Project build command">"%AUTO%"</string>
<string name="Project rebuild command">"%AUTO%"</string>
@@ -853,6 +887,7 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<string name="CFG">""</string>
</document>
<document>
@@ -907,6 +942,7 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<string name="CFG">""</string>
</document>
<document>
@@ -962,6 +998,7 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
+ <bool name="Suppress source rules">0</bool>
<string name="Project make command">"%AUTO%"</string>
<string name="Project build command">"%AUTO%"</string>
<string name="Project rebuild command">"%AUTO%"</string>
@@ -25634,6 +25671,14 @@
<string name="proxy-type">"wbBoxSizerProxy"</string>
<string name="proxy-Orientation">"Vertical"</string>
<string name="proxy-Member variable name">""</string>
+ <string name="proxy-AlignH">"Centre"</string>
+ <string name="proxy-AlignV">"Centre"</string>
+ <long name="proxy-Stretch factor">0</long>
+ <long name="proxy-Border">5</long>
+ <bool name="proxy-wxLEFT">1</bool>
+ <bool name="proxy-wxRIGHT">1</bool>
+ <bool name="proxy-wxTOP">1</bool>
+ <bool name="proxy-wxBOTTOM">1</bool>
<bool name="proxy-wxSHAPED">0</bool>
<bool name="proxy-wxADJUST_MINSIZE">0</bool>
<bool name="proxy-wxFIXED_MINSIZE">0</bool>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-04-15 16:23:14
|
Revision: 881
http://can.svn.sourceforge.net/can/?rev=881&view=rev
Author: akhe
Date: 2008-04-15 09:22:52 -0700 (Tue, 15 Apr 2008)
Log Message:
-----------
canal.h updated with message status codes.
Modified Paths:
--------------
trunk/firmware/common/vscp_serial.c
trunk/firmware/common/vscp_serial.h
trunk/src/vscp/common/canal.h
trunk/src/vscp/common/tcpipclientthread.cpp
trunk/src/vscp/samples/testinterface/testInterface.ncb
trunk/src/vscp/samples/testinterface/testInterface.opt
trunk/src/vscp/vscpworks/vscpworks.dsp
Modified: trunk/firmware/common/vscp_serial.c
===================================================================
--- trunk/firmware/common/vscp_serial.c 2008-04-15 12:26:35 UTC (rev 880)
+++ trunk/firmware/common/vscp_serial.c 2008-04-15 16:22:52 UTC (rev 881)
@@ -175,14 +175,14 @@
// Ack the frame
if ( ( VSCP_SERIAL_OPCODE_ACK != vs_msgbuffer[ 0 ] ) &&
( VSCP_SERIAL_OPCODE_SENT_ACK != vs_msgbuffer[ 0 ] ) ) {
- //vs_sendAck( vs_msgbuffer[ 2 ], vs_msgbuffer[ 3 ] );
+ //vs_sendAck( vs_msgbuffer[ 2 ], vs_msgbuffer[ 3 ] );
}
}
else {
// Nack the frame
if ( ( VSCP_SERIAL_OPCODE_NACK != vs_msgbuffer[ 0 ] ) &&
( VSCP_SERIAL_OPCODE_SENT_NACK != vs_msgbuffer[ 0 ] ) ) {
- //vs_sendNack( vs_msgbuffer[ 2 ], vs_msgbuffer[ 3 ] );
+ //vs_sendNack( vs_msgbuffer[ 2 ], vs_msgbuffer[ 3 ] );
}
}
@@ -401,6 +401,7 @@
BOOL vs_sendCommandFrame( uint8_t channel,
uint8_t seqnumber,
+ uint16_t command,
uint8_t count,
uint8_t *pData )
{
@@ -426,6 +427,10 @@
// Channel
vs_bufferSerialByteSubst( &checksum, channel );
+
+ // Command
+ vs_bufferSerialByteSubst( &checksum, ( command & 0xff ) );
+ vs_bufferSerialByteSubst( &checksum, ( ( command >> 8 ) & 0xff ) );
// Counter
vs_bufferSerialByteSubst( &checksum, seqnumber );
Modified: trunk/firmware/common/vscp_serial.h
===================================================================
--- trunk/firmware/common/vscp_serial.h 2008-04-15 12:26:35 UTC (rev 880)
+++ trunk/firmware/common/vscp_serial.h 2008-04-15 16:22:52 UTC (rev 881)
@@ -81,6 +81,7 @@
#define VSCP_SERIAL_OPCODE_LEVEL2_EVENT 2
#define VSCP_SERIAL_OPCODE_POLL_EVENT 3
#define VSCP_SERIAL_OPCODE_NO_EVENT 4
+#define VSCP_SERIAL_OPCODE_CAN_FRAME 5
#define VSCP_SERIAL_OPCODE_RESERVED_DLE 10
#define VSCP_SERIAL_OPCODE_SENT_ACK 249
#define VSCP_SERIAL_OPCODE_SENT_NACK 250
@@ -93,7 +94,7 @@
// CAN flag bits (uses data byte 0-3 for id and
// bit 32 is Extended id, bit 31 RTR
#define VSCP_SERIAL_CAN_DATA0_EXTENDED 0x80
-#define VSCP_SERIAL_CAN_DATA0_RTR 0x40
+#define VSCP_SERIAL_CAN_DATA0_RTR 0x40
// The serial frame
typedef struct {
@@ -103,7 +104,7 @@
uint8_t seqnumber;
uint8_t vscpclass;
uint8_t vscptype;
- uint8_t data[16];
+ uint8_t data[ 16 ];
} vs_frame;
#ifdef VSCP_SERIAL_ENABLE_SLIDING_WINDOWS
@@ -246,12 +247,14 @@
First byte of data is command code
@param channel Channel number NACK is sent for.
@param seqnumber Id for packet which is NACK'ed
+ @param command Command code.
@param count Number of databytes (0-16)
@param pData Pointer to data.
@return TRUE och success. FALSE on failure.
*/
BOOL vs_sendCommandFrame( uint8_t channel,
uint8_t seqnumber,
+ uint16_t command,
uint8_t count,
uint8_t *pData );
Modified: trunk/src/vscp/common/canal.h
===================================================================
--- trunk/src/vscp/common/canal.h 2008-04-15 12:26:35 UTC (rev 880)
+++ trunk/src/vscp/common/canal.h 2008-04-15 16:22:52 UTC (rev 881)
@@ -401,7 +401,7 @@
#define CANAL_IDFLAG_STANDARD 0x00000000 // Standard message id (11-bit)
#define CANAL_IDFLAG_EXTENDED 0x00000001 // Extended message id (29-bit)
#define CANAL_IDFLAG_RTR 0x00000002 // RTR-Frame
-#define CANAL_IDFLAG_ERROR 0x00000004 // This package is an error indication (id holds error code)
+#define CANAL_IDFLAG_STATUS 0x00000004 // This package is a status indication (id holds error code)
#define CANAL_IDFLAG_SEND 0x80000000 // Reserved for use by application software to indicate send
/// Communicaton speeds
@@ -416,7 +416,21 @@
#define CANAL_BAUD_20 8 // 20 Kbit
#define CANAL_BAUD_10 9 // 10 Kbit
-/// Status codes
+/// Status message codes ( in received message)
+#define CANAL_STATUSMSG_OK 0x00 // Normal condition.
+#define CANAL_STATUSMSG_OVERRUN 0x01 // Overrun occured when sending data to CAN bus.
+#define CANAL_STATUSMSG_BUSLIGHT 0x02 // Error counter has reached 96.
+#define CANAL_STATUSMSG_BUSHEAVY 0x03 // Error counter has reached 128.
+#define CANAL_STATUSMSG_BUSOFF 0x04 // Device is in BUSOFF. CANAL_STATUS_OK is
+ // sent when returning to operational mode.
+#define CANAL_STATUSMSG_STUFF 0x20 // Stuff Error.
+#define CANAL_STATUSMSG_FORM 0x21 // Form Error.
+#define CANAL_STATUSMSG_ACK 0x23 // Ack Error.
+#define CANAL_STATUSMSG_BIT1 0x24 // Bit1 Error.
+#define CANAL_STATUSMSG_BIT0 0x25 // Bit0 Error.
+#define CANAL_STATUSMSG_CRC 0x27 // CRC Error.
+
+/// Status codes /returned by status request)
#define CANAL_STATUS_NONE 0x00000000
#define CANAL_STATUS_ACTIVE 0x10000000
#define CANAL_STATUS_PASSIVE 0x40000000
Modified: trunk/src/vscp/common/tcpipclientthread.cpp
===================================================================
--- trunk/src/vscp/common/tcpipclientthread.cpp 2008-04-15 12:26:35 UTC (rev 880)
+++ trunk/src/vscp/common/tcpipclientthread.cpp 2008-04-15 16:22:52 UTC (rev 881)
@@ -90,7 +90,7 @@
// Create the socket
server = new wxSocketServer ( addr, wxSOCKET_BLOCK | wxSOCKET_REUSEADDR );
- m_pCtrlObject->logMsg ( _T ( "TCP ClientThread: Start." ), DAEMON_LOGMSG_INFO );
+ m_pCtrlObject->logMsg ( _T ( "TCP ClientListenThread: Start." ), DAEMON_LOGMSG_INFO );
if ( server->Ok() )
{
Modified: trunk/src/vscp/samples/testinterface/testInterface.ncb
===================================================================
(Binary files differ)
Modified: trunk/src/vscp/samples/testinterface/testInterface.opt
===================================================================
(Binary files differ)
Modified: trunk/src/vscp/vscpworks/vscpworks.dsp
===================================================================
--- trunk/src/vscp/vscpworks/vscpworks.dsp 2008-04-15 12:26:35 UTC (rev 880)
+++ trunk/src/vscp/vscpworks/vscpworks.dsp 2008-04-15 16:22:52 UTC (rev 881)
@@ -31,7 +31,7 @@
MTL=midl.exe
RSC=rc.exe
-!IF "$(CFG)" == "vscpworks - Win32 Debug"
+!IF "$(CFG)" == "vscpworks - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -43,20 +43,20 @@
# PROP Output_Dir "VCProjectDebug"
# PROP Intermediate_Dir "VCProjectDebug"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /Fd"VCProjectDebug\vscpworks.pdb" /MDd /Od /GR /EHsc /W4 /Zi /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD CPP /nologo /FD /Fd"VCProjectDebug\vscpworks.pdb" /MDd /Od /GR /EHsc /W4 /Zi /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD BASE MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /D_UNICODE /mktyplib203 /win32
-# ADD MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /D_UNICODE /mktyplib203 /win32
-# ADD BASE RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
-# ADD RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
+# ADD BASE CPP /nologo /MDd /W4 /GR /Zi /Od /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /D "_UNICODE" /Fd"VCProjectDebug\vscpworks.pdb" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W4 /GR /Zi /Od /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /D "_UNICODE" /Fd"VCProjectDebug\vscpworks.pdb" /FD /EHsc /c
+# ADD BASE MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /D "_UNICODE" /mktyplib203 /win32
+# ADD MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /D "_UNICODE" /mktyplib203 /win32
+# ADD BASE RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS" /d "__WXDEBUG__" /d "_DEBUG" /d "_UNICODE"
+# ADD RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/mswud" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS" /d "__WXDEBUG__" /d "_DEBUG" /d "_UNICODE"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw28ud_richtext.lib wxmsw28ud_aui.lib wxmsw28ud_core.lib wxbase28ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxmsw28ud_adv.lib wxmsw28ud_html.lib wxmsw28ud_xrc.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG /out:"VCProjectDebug\vscpworks.exe"
-# ADD LINK32 wxmsw28ud_richtext.lib wxmsw28ud_aui.lib wxmsw28ud_core.lib wxbase28ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxmsw28ud_adv.lib wxmsw28ud_html.lib wxmsw28ud_xrc.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG /out:"VCProjectDebug\vscpworks.exe"
+# ADD BASE LINK32 wxmsw28ud_richtext.lib wxmsw28ud_aui.lib wxmsw28ud_core.lib wxbase28ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxmsw28ud_adv.lib wxmsw28ud_html.lib wxmsw28ud_xrc.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
+# ADD LINK32 wxmsw28ud_richtext.lib wxmsw28ud_aui.lib wxmsw28ud_core.lib wxbase28ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxmsw28ud_adv.lib wxmsw28ud_html.lib wxmsw28ud_xrc.lib wxbase28ud_net.lib wxbase28ud_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
-!ELSEIF "$(CFG)" == "vscpworks - Win32 Release"
+!ELSEIF "$(CFG)" == "vscpworks - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -67,21 +67,22 @@
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "VCProjectRelease"
# PROP Intermediate_Dir "VCProjectRelease"
+# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /Fd"VCProjectRelease\vscpworks.pdb" /MD /O2 /GR /EHsc /W4 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD CPP /nologo /FD /Fd"VCProjectRelease\vscpworks.pdb" /MD /O2 /GR /EHsc /W4 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD BASE MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /mktyplib203 /win32
-# ADD MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /mktyplib203 /win32
-# ADD BASE RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
-# ADD RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
+# ADD BASE CPP /nologo /MD /W4 /GR /O2 /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /Fd"VCProjectRelease\vscpworks.pdb" /FD /EHsc /c
+# ADD CPP /nologo /MD /W4 /GR /O2 /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /Fd"VCProjectRelease\vscpworks.pdb" /FD /EHsc /c
+# ADD BASE MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /mktyplib203 /win32
+# ADD MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /mktyplib203 /win32
+# ADD BASE RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS"
+# ADD RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/msw" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw28_richtext.lib wxmsw28_aui.lib wxmsw28_core.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxmsw28_adv.lib wxmsw28_html.lib wxmsw28_xrc.lib wxbase28_net.lib wxbase28_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /out:"VCProjectRelease\vscpworks.exe"
-# ADD LINK32 wxmsw28_richtext.lib wxmsw28_aui.lib wxmsw28_core.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxmsw28_adv.lib wxmsw28_html.lib wxmsw28_xrc.lib wxbase28_net.lib wxbase28_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /out:"VCProjectRelease\vscpworks.exe"
+# ADD BASE LINK32 wxmsw28_richtext.lib wxmsw28_aui.lib wxmsw28_core.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxmsw28_adv.lib wxmsw28_html.lib wxmsw28_xrc.lib wxbase28_net.lib wxbase28_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
+# ADD LINK32 wxmsw28_richtext.lib wxmsw28_aui.lib wxmsw28_core.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxmsw28_adv.lib wxmsw28_html.lib wxmsw28_xrc.lib wxbase28_net.lib wxbase28_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
-!ELSEIF "$(CFG)" == "vscpworks - Win32 Unicode Release"
+!ELSEIF "$(CFG)" == "vscpworks - Win32 Unicode Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -93,20 +94,20 @@
# PROP Output_Dir "VCProjectUnicodeRelease"
# PROP Intermediate_Dir "VCProjectUnicodeRelease"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /Fd"VCProjectUnicodeRelease\vscpworks.pdb" /MD /O2 /GR /EHsc /W4 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD CPP /nologo /FD /Fd"VCProjectUnicodeRelease\vscpworks.pdb" /MD /O2 /GR /EHsc /W4 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD BASE MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D_UNICODE /mktyplib203 /win32
-# ADD MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D_UNICODE /mktyplib203 /win32
-# ADD BASE RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
-# ADD RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D_UNICODE /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
+# ADD BASE CPP /nologo /MD /W4 /GR /O2 /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "_UNICODE" /Fd"VCProjectUnicodeRelease\vscpworks.pdb" /FD /EHsc /c
+# ADD CPP /nologo /MD /W4 /GR /O2 /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "_UNICODE" /Fd"VCProjectUnicodeRelease\vscpworks.pdb" /FD /EHsc /c
+# ADD BASE MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "_UNICODE" /mktyplib203 /win32
+# ADD MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "_UNICODE" /mktyplib203 /win32
+# ADD BASE RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS" /d "_UNICODE"
+# ADD RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/mswu" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS" /d "_UNICODE"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw28u_richtext.lib wxmsw28u_aui.lib wxmsw28u_core.lib wxbase28u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxmsw28u_adv.lib wxmsw28u_html.lib wxmsw28u_xrc.lib wxbase28u_net.lib wxbase28u_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /out:"VCProjectUnicodeRelease\vscpworks.exe"
-# ADD LINK32 wxmsw28u_richtext.lib wxmsw28u_aui.lib wxmsw28u_core.lib wxbase28u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxmsw28u_adv.lib wxmsw28u_html.lib wxmsw28u_xrc.lib wxbase28u_net.lib wxbase28u_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /out:"VCProjectUnicodeRelease\vscpworks.exe"
+# ADD BASE LINK32 wxmsw28u_richtext.lib wxmsw28u_aui.lib wxmsw28u_core.lib wxbase28u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxmsw28u_adv.lib wxmsw28u_html.lib wxmsw28u_xrc.lib wxbase28u_net.lib wxbase28u_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
+# ADD LINK32 wxmsw28u_richtext.lib wxmsw28u_aui.lib wxmsw28u_core.lib wxbase28u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxmsw28u_adv.lib wxmsw28u_html.lib wxmsw28u_xrc.lib wxbase28u_net.lib wxbase28u_xml.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
-!ELSEIF "$(CFG)" == "vscpworks - Win32 unicode Debug"
+!ELSEIF "$(CFG)" == "vscpworks - Win32 unicode Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -118,20 +119,20 @@
# PROP Output_Dir "VCProjectunicodeDebug"
# PROP Intermediate_Dir "VCProjectunicodeDebug"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /Fd"VCProjectunicodeDebug\vscpworks.pdb" /MDd /Od /GR /EHsc /W4 /Zi /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD CPP /nologo /FD /Fd"VCProjectunicodeDebug\vscpworks.pdb" /MDd /Od /GR /EHsc /W4 /Zi /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /c
-# ADD BASE MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /mktyplib203 /win32
-# ADD MTL /nologo /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /mktyplib203 /win32
-# ADD BASE RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
-# ADD RSC /l 0x405 /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /I "C:\Program Files\Microsoft Visual Studio\vc98\include"
+# ADD BASE CPP /nologo /MDd /W4 /GR /Zi /Od /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /Fd"VCProjectunicodeDebug\vscpworks.pdb" /FD /EHsc /c
+# ADD CPP /nologo /MDd /W4 /GR /Zi /Od /I "D:\wxWidgets-2.8.7/include" /I "D:\wxWidgets-2.8.7/contrib/include" /I "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /I "C:\Program Files\Microsoft Visual Studio\vc98\include" /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /Fd"VCProjectunicodeDebug\vscpworks.pdb" /FD /EHsc /c
+# ADD BASE MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NOPCH" /D "WIN32" /D "__WXMSW__" /D "_WINDOWS" /D "__WXDEBUG__" /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS" /d "__WXDEBUG__" /d "_DEBUG"
+# ADD RSC /l 0x405 /i "D:\wxWidgets-2.8.7/include" /i "D:\wxWidgets-2.8.7/contrib/include" /i "D:\wxWidgets-2.8.7/lib/vc_lib/mswd" /i "C:\Program Files\Microsoft Visual Studio\vc98\include" /d "NOPCH" /d "WIN32" /d "__WXMSW__" /d "_WINDOWS" /d "__WXDEBUG__" /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 wxmsw28d_richtext.lib wxmsw28d_aui.lib wxmsw28d_core.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxmsw28d_adv.lib wxmsw28d_html.lib wxmsw28d_xrc.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG /out:"VCProjectunicodeDebug\vscpworks.exe"
-# ADD LINK32 wxmsw28d_richtext.lib wxmsw28d_aui.lib wxmsw28d_core.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxmsw28d_adv.lib wxmsw28d_html.lib wxmsw28d_xrc.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG /out:"VCProjectunicodeDebug\vscpworks.exe"
+# ADD BASE LINK32 wxmsw28d_richtext.lib wxmsw28d_aui.lib wxmsw28d_core.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxmsw28d_adv.lib wxmsw28d_html.lib wxmsw28d_xrc.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
+# ADD LINK32 wxmsw28d_richtext.lib wxmsw28d_aui.lib wxmsw28d_core.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxmsw28d_adv.lib wxmsw28d_html.lib wxmsw28d_xrc.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /libpath:"D:\wxWidgets-2.8.7/lib/vc_lib" /libpath:"C:\Program Files\Microsoft Visual Studio\vc98\lib"
-!ENDIF
+!ENDIF
# Begin Target
@@ -144,47 +145,43 @@
# PROP Default_Filter ""
# Begin Source File
-SOURCE="dlgvscpmsg.cpp"
+SOURCE="..\common\canalsuperwrapper.cpp"
# End Source File
# Begin Source File
-SOURCE="dlgselectdaemoninterface.cpp"
+SOURCE="..\..\common\crc.c"
# End Source File
# Begin Source File
-SOURCE="frmmain.cpp"
+SOURCE="dlgconfiguration.cpp"
# End Source File
# Begin Source File
-SOURCE="vscpworks.cpp"
+SOURCE="dlgnewvscpsession.cpp"
# End Source File
# Begin Source File
-SOURCE="frmvscpsession.cpp"
+SOURCE="dlgselectdaemoninterface.cpp"
# End Source File
# Begin Source File
-SOURCE="dlgnewvscpsession.cpp"
+SOURCE="dlgvscpfilter.cpp"
# End Source File
# Begin Source File
-SOURCE="dlgconfiguration.cpp"
-# End Source File
-# Begin Source File
-
SOURCE="dlgvscpinterfacesettings.cpp"
# End Source File
# Begin Source File
-SOURCE="dlgvscpfilter.cpp"
+SOURCE="dlgvscpmsg.cpp"
# End Source File
# Begin Source File
-SOURCE="vscpbootloader.cpp"
+SOURCE="dlgvscptrmit.cpp"
# End Source File
# Begin Source File
-SOURCE="dlgvscptrmit.cpp"
+SOURCE="..\common\dllwrapper.cpp"
# End Source File
# Begin Source File
@@ -192,47 +189,47 @@
# End Source File
# Begin Source File
-SOURCE="readregiister.cpp"
+SOURCE="frmmain.cpp"
# End Source File
# Begin Source File
-SOURCE="writeregister.cpp"
+SOURCE="frmvscpsession.cpp"
# End Source File
# Begin Source File
-SOURCE="readmsfurl.cpp"
+SOURCE="gridtable.cpp"
# End Source File
# Begin Source File
-SOURCE="readmdffile.cpp"
+SOURCE="..\common\guid.c...
[truncated message content] |
|
From: <ak...@us...> - 2008-04-16 18:35:39
|
Revision: 883
http://can.svn.sourceforge.net/can/?rev=883&view=rev
Author: akhe
Date: 2008-04-16 11:35:26 -0700 (Wed, 16 Apr 2008)
Log Message:
-----------
Fixed bug that allowed for space(s) before hostname which did not resolve and therefore not connect.
Modified Paths:
--------------
trunk/TODO
trunk/src/vscp/common/vscptcpif.cpp
trunk/src/vscp/vscpworks/vscpworks.cpp
trunk/src/vscp/vscpworks/vscpworks.pjd
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2008-04-16 09:35:56 UTC (rev 882)
+++ trunk/TODO 2008-04-16 18:35:26 UTC (rev 883)
@@ -17,7 +17,9 @@
- Check direct CANAL interface.
- Hide transmit windows in receive mode.
- Connection is not lost when server restarts.
+- Dialog needed for "test connection"
+
Daemon
======
- Debug levels for the daeon in runtime version.
Modified: trunk/src/vscp/common/vscptcpif.cpp
===================================================================
--- trunk/src/vscp/common/vscptcpif.cpp 2008-04-16 09:35:56 UTC (rev 882)
+++ trunk/src/vscp/common/vscptcpif.cpp 2008-04-16 18:35:26 UTC (rev 883)
@@ -1,2198 +1,2201 @@
-///////////////////////////////////////////////////////////////////////////////
-// vscptcpif.cpp:
-//
-// This file is part is part of CANAL (CAN Abstraction Layer)
-// http://can.sourceforge.net)
-//
-// Copyright (C) 2000-2008 Ake Hedman, eurosource, <ak...@eu...>
-//
-// 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
-//
-// $RCSfile: canaltcpif.cpp,v $
-// $Date: 2005/08/24 21:56:55 $
-// $Author: akhe $
-// $Revision: 1.4 $
-///////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifdef __GNUG__
- //#pragma implementation
-#endif
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#ifdef __WXMSW__
- #include "wx/ownerdrw.h"
-#endif
-
-#ifdef WIN32
-#include "winsock.h"
-#endif
-
-#include <wx/thread.h>
-#include <wx/datetime.h>
-#include <wx/socket.h>
-#include <wx/tokenzr.h>
-#include <wx/listimpl.cpp>
-#include <wx/event.h>
-
-#include "canal_macro.h"
-#include "canal_win32_ipc.h"
-#include "../common/canal.h"
-#include "vscptcpif.h"
-
-WX_DEFINE_LIST( EVENT_RX_QUEUE );
-WX_DEFINE_LIST( EVENT_TX_QUEUE );
-
-
-
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
-
-VscpTcpIf::VscpTcpIf()
-{
- m_psock = NULL;
- m_bModeReceiveLoop = false;
- m_responseTimeOut = DEFAULT_RESPONSE_TIMEOUT;
-}
-
-
-VscpTcpIf::~VscpTcpIf()
-{
- if ( NULL != m_psock ) delete m_psock;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// checkReturnValue
-//
-
-bool VscpTcpIf::checkReturnValue( void )
-{
- bool rv = false;
- bool bDone = false;
- wxString wxstr;
- char buf[ 512 ];
- wxDateTime start,now;
-
- start.SetToCurrent();
-
- m_strReply.Empty();
-
- do {
-
- wxTimeSpan tt = wxDateTime::Now() - start;
-
- // Check for timeout
- if ( tt.GetSeconds() > m_responseTimeOut ) {
- wxLogDebug( _("CHECKRETURNVALUE: TCP/IP Timeout") );
- return false;
- }
-
- memset( buf, 0, sizeof( buf ) - 1 );
-
- m_psock->Read( buf, sizeof( buf ) - 1 );
- if ( m_psock->Error() ) {
- unsigned long errorcode = m_psock->LastError();
- wxLogDebug( _("CHECKRETURNVALUE: TCP/IP Communication error = %d"), errorcode );
- if ( errorcode != wxSOCKET_TIMEDOUT ) {
- return false; // return on all errors except timeout
- }
- }
-
- if ( m_psock->LastCount() > 0 ) {
- buf[ m_psock->LastCount() ] = 0;
- //wxLogDebug( _("Length of reply = %d"), m_psock->LastCount() );
- wxString str(buf, wxConvUTF8);
- m_strReply += str;
- //wxLogDebug( _("CHECKRETURNVALUE :") + str );
- }
-
- if ( wxNOT_FOUND != m_strReply.Find(_("+OK")) ) {
- //wxLogDebug( _("CHECKRETURNVALUE: Command suceeded!") );
- bDone = TRUE;
- rv = true;
- }
- else if ( wxNOT_FOUND != m_strReply.Find(_("-OK")) ) {
- //wxLogDebug( _("CHECKRETURNVALUE: Command failed!") );
- bDone = TRUE;
- rv = false;
- }
-
- }
- while ( !bDone );
-
- return rv;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// doCommand
-//
-
-bool VscpTcpIf::doCommand( unsigned char cmd )
-{
- cmd = cmd; // supress warning
- return true;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdOpen
-//
-
-long VscpTcpIf::doCmdOpen( const wxString& strInterface, unsigned long flags )
-{
- //int pos;
- bool bUsePassword = false;
- short port = VSCP_LEVEL2_TCP_PORT;
-
- wxString wxstr;
- wxString strUsername;
- wxString strPassword;
- wxString strHostname;
-
- flags=flags; // supress warning
-
- wxLogDebug( _("strInterface = ") );
- wxLogDebug( strInterface );
-
- // Create working copy
- wxString strBuf = strInterface;
-
- wxStringTokenizer tkz( strInterface, _(";") );
-
- // Username
- strUsername = tkz.GetNextToken();
- if ( strUsername.length() ) {
- // If a username is given a password is required
- bUsePassword = true;
- }
-
- wxLogDebug( _("strUsername = ") );
- wxLogDebug( strUsername );
-
- // Password
- strPassword = tkz.GetNextToken();
- wxLogDebug( _("strPassword = ") );
- wxLogDebug( strPassword );
-
- // Hostname
- wxstr = tkz.GetNextToken();
- if ( wxstr.length() ) {
- strHostname = wxstr;
- }
-
- wxLogDebug( _("strHostname = ") );
- wxLogDebug( strHostname );
-
- // Port
- long val;
- wxstr = tkz.GetNextToken();
- if ( wxstr.length() ) {
- wxstr.ToLong( &val );
- port = (short)val;
- }
-
-
- return doCmdOpen( strHostname,
- port,
- strUsername,
- strPassword );
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdOpen
-//
-
-long VscpTcpIf::doCmdOpen( const wxString& strHostname,
- const short port,
- const wxString& strUsername,
- const wxString& strPassword )
-{
- wxString strBuf;
-
- // Create the socket
- if ( NULL == ( m_psock = new wxSocketClient( wxSOCKET_BLOCK ) ) ) return CANAL_ERROR_GENERIC;
-
- // Here if we are connected
- //m_psock->SetFlags( wxSOCKET_NOWAIT );
- m_psock->SetTimeout(2);
-
- wxIPV4address addr;
- addr.Hostname( strHostname );
- addr.Service( port );
-
- // Connect to server
- m_psock->Connect( addr, false );
-
- wxLogDebug( _("Connect in progress with server ") + strHostname );
-
- if ( !m_psock->WaitOnConnect( 30 ) ) {
- return 0;
- }
-
-
- wxLogDebug( _("Checking server respons") );
-
- if ( !checkReturnValue() ) {
- wxLogDebug( _("No response from ") + strHostname );
- wxLogDebug( _("------------------------------------------------------") );
- wxLogDebug( _("No response from ") + strHostname );
- wxLogDebug( _("------------------------------------------------------") );
- return 0;
- }
-
- wxLogDebug( _("Successfully connected to ") + strHostname );
-
- // Username
- strBuf = _("USER ") + strUsername + _("\r\n");
- m_psock->Write( strBuf.mb_str(), strBuf.length() );
- if ( !checkReturnValue() ) return 0;
-
- // Password
- strBuf = _("PASS ") + strPassword + _("\r\n");
- m_psock->Write( strBuf.mb_str(), strBuf.length() );
- if ( !checkReturnValue() ) return 0;
-
- wxLogDebug( _("Successfull log in to VSCP server") );
-
- return 1922; // Driver hanle == any value
-}
-
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// close
-//
-
-int VscpTcpIf::doCmdClose( void )
-{
- int rv;
-
- if ( NULL == m_psock ) return CANAL_ERROR_GENERIC; // Must have a valid socket
- if ( !m_psock->IsOk() ) return CANAL_ERROR_GENERIC; // Must be connected
-
- wxString strCmd(_("QUIT\r\n"));
- m_psock->Write( strCmd.mb_str(), strCmd.length() );
-
- if ( checkReturnValue() ) {
- rv = CANAL_ERROR_SUCCESS;
- }
- else {
- rv = CANAL_ERROR_GENERIC;
- }
-
- m_psock->Close();
- if ( NULL != m_psock ) delete m_psock;
- m_psock = NULL;
-
- return rv;
-}
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdNOOP
-//
-
-int VscpTcpIf::doCmdNOOP( void )
-{
- if ( NULL == m_psock ) return CANAL_ERROR_PARAMETER; // Must have a valid socket
- if ( !m_psock->IsOk() ) return CANAL_ERROR_PARAMETER; // Must be connected
-
- // If receive loop active terminate
- if ( m_bModeReceiveLoop ) return CANAL_ERROR_PARAMETER;
-
- wxString strCmd(_("NOOP\r\n"));
- m_psock->Write( strCmd.mb_str(), strCmd.length() );
-
- if ( checkReturnValue() ) {
- return CANAL_ERROR_SUCCESS;
- }
- else {
- return CANAL_ERROR_GENERIC;
- }
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdSend
-//
-
-
-int VscpTcpIf::doCmdSend( const vscpEvent *pEvent )
-{
- uint16_t i;
-
- if ( NULL == m_psock ) return CANAL_ERROR_PARAMETER; // Must have a valid socket
- if ( !m_psock->IsOk() ) return CANAL_ERROR_PARAMETER; // Must be connected
-
- // If receive loop active terminate
- if ( m_bModeReceiveLoop ) return CANAL_ERROR_PARAMETER;
-
- wxString strBuf, strWrk, strGUID;
- unsigned char guidsum = 0;
-
- // Must be a valid data pointer if data
- if ( ( pEvent->sizeData > 0 ) && ( NULL == pEvent->pdata ) ) return CANAL_ERROR_GENERIC;
-
- //send head,class,type,obid,timestamp,GUID,data1,data2,data3....
- strBuf.Printf( _("SEND %d,%d,%d,%lu,%lu,"),
- pEvent->head,
- pEvent->vscp_class,
- pEvent->vscp_type,
- pEvent->obid,
- pEvent->timestamp );
-
- // GUID
- for ( i=0; i<16; i++ ) {
-
- guidsum += pEvent->GUID[ i ];
- strWrk.Printf( _("%d"), pEvent->GUID[ i ] );
- if ( i != 15 ) {
- strWrk += _(":");
- }
-
- strGUID += strWrk;
- }
-
- if ( 0 == guidsum ) {
- strBuf += _("-");
- }
- else {
- strBuf += strGUID;
- }
-
- strBuf += _(",");
-
- // Data
- for ( i=0; i<pEvent->sizeData; i++ ) {
- strWrk.Printf( _("%d"), pEvent->pdata[ i ] );
- strBuf += strWrk;
- if ( i != ( pEvent->sizeData - 1 ) ) {
- strBuf += _(",");
- }
- }
-
- strBuf += _("\r\n");
-
- m_psock->Write( strBuf.mb_str(), strBuf.length() );
-
- if ( checkReturnValue() ) {
- return CANAL_ERROR_SUCCESS;
- }
- else {
- return CANAL_ERROR_GENERIC;
- }
-
-}
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdSendEx
-//
-
-int VscpTcpIf::doCmdSendEx( const vscpEventEx *pEvent )
-{
- uint16_t i;
- wxString strBuf, strWrk, strGUID;
- unsigned char guidsum = 0;
-
- if ( NULL == m_psock ) return CANAL_ERROR_PARAMETER; // Must have a valid socket
- if ( !m_psock->IsOk() ) return CANAL_ERROR_PARAMETER; // Must be connected
-
- // If receive loop active terminate
- if ( m_bModeReceiveLoop ) return CANAL_ERROR_PARAMETER;
-
- //send head,class,type,obid,timestamp,GUID,data1,data2,data3....
- strBuf.Printf( _("SEND %d,%d,%d,%lu,%lu,"),
- pEvent->head,
- pEvent->vscp_class,
- pEvent->vscp_type,
- pEvent->obid,
- pEvent->timestamp );
-
- // GUID
- for ( i=0; i<16; i++ ) {
-
- guidsum += pEvent->GUID[ i ];
- strWrk.Printf(_("%02X"), pEvent->GUID[ i ] );
-
- if ( i != 15 ) {
- strWrk += _(":");
- }
- strGUID += strWrk;
- }
-
- if ( 0 == guidsum ) {
- strBuf += _("-");
- }
- else {
- strBuf += strGUID;
- }
-
- strBuf += _(",");
-
- // Data
- for ( i=0; i<pEvent->sizeData; i++ ) {
- strWrk.Printf( _("%d"), pEvent->data[ i ] );
- strBuf += strWrk;
- if ( i != ( pEvent->sizeData - 1 ) ) {
- strBuf += _(",");
- }
- }
-
- strBuf += _("\r\n");
-
- m_psock->Write( strBuf.mb_str(), strBuf.length() );
-
- if ( checkReturnValue() ) {
- return CANAL_ERROR_SUCCESS;
- }
- else {
- return CANAL_ERROR_GENERIC;
- }
-
-}
-
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdSendLevel1
-//
-
-int VscpTcpIf::doCmdSendLevel1( const canalMsg *pCanalMsg )
-{
- vscpEventEx event;
-
- if ( NULL == m_psock ) return CANAL_ERROR_PARAMETER; // Must have a valid socket
- if ( !m_psock->IsOk() ) return CANAL_ERROR_PARAMETER; // Must be connected
-
- // If receive loop active terminate
- if ( m_bModeReceiveLoop ) return CANAL_ERROR_PARAMETER;
-
- event.vscp_class = (unsigned short)( 0x1ff & ( pCanalMsg->id >> 16 ) );
- event.vscp_type = (unsigned char)( 0xff & ( pCanalMsg->id >> 8 ) );
- event.obid = pCanalMsg->obid;
- event.timestamp = pCanalMsg->timestamp;
- event.head = (unsigned char)( 0xf0 & ( pCanalMsg->id >> 20 ) ) | VSCP_HEADER_CAN_MSG;
-
- if ( pCanalMsg->flags & CANAL_IDFLAG_EXTENDED) {
- event.head |= VSCP_HEADER_CAN_EXTENDED;
- }
-
- if ( pCanalMsg->flags & CANAL_IDFLAG_RTR) {
- event.head |= VSCP_HEADER_CAN_RTR;
- }
-
- memset( event.GUID, 0, 16);
-
- event.GUID[ 15 ] = pCanalMsg->id & 0xff;
-
- event.sizeData = pCanalMsg->sizeData;
- memcpy( event.data, pCanalMsg->data, pCanalMsg->sizeData );
-
- return doCmdSendEx( &event );
-
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// getEventFromLine
-//
-
-bool VscpTcpIf::getEventFromLine( const wxString& strLine, vscpEvent *pEvent )
-{
- wxStringTokenizer strTokens;
- wxString strWrk;
- wxString strGUID;
- long val;
-
- // Check pointer
- if ( NULL == pEvent ) return false;
-
- // Tokinize the string
- strTokens.SetString( strLine, _(",\r\n") );
-
- // Get head
- pEvent->head = 0;
- if ( strTokens.HasMoreTokens() ) {
- strWrk = strTokens.GetNextToken();
-
- strWrk.ToLong( &val );
- pEvent->head = (uint8_t)val;
-
- }
-
- // Get Class
- pEvent->vscp_class = 0;
- if ( strTokens.HasMoreTokens() ) {
-
- strWrk = strTokens.GetNextToken();
-
- strWrk.ToLong( &val );
- pEvent->vscp_class = (uint16_t)val;
-
- }
-
-
- // Get Type
- pEvent->vscp_type = 0;
- if ( strTokens.HasMoreTokens() ) {
-
- strWrk = strTokens.GetNextToken();
-
- strWrk.ToLong( &val );
- pEvent->vscp_type = (uint16_t)val;
-
- }
-
-
-
- // Get OBID
- pEvent->obid = 0;
- if ( strTokens.HasMoreTokens() ) {
-
- strWrk = strTokens.GetNextToken();
-
- strWrk.ToLong( &val );
- pEvent->obid = (uint16_t)val;
-
- }
-
-
- // Get Timestamp
- pEvent->timestamp = 0;
- if ( strTokens.HasMoreTokens() ) {
-
- strWrk = strTokens.GetNextToken();
-
- strWrk.ToLong( &val );
- pEvent->timestamp = (uint16_t)val;
-
- }
-
-
- // Get GUID
- if ( strTokens.HasMoreTokens() ) {
- strGUID = strTokens.GetNextToken();
- }
-
- // Must have a GUID
- if ( 0 == strGUID.length() ) return false;
-
-
- // Handle data
- pEvent->sizeData = 0;
- char data[ 512 ];
-
- while ( strTokens.HasMoreTokens() && ( pEvent->sizeData < 512 ) ) {
-
- strWrk = strTokens.GetNextToken();
- data[ pEvent->sizeData ] = readStringValue( strWrk );
- pEvent->sizeData++;
-
- }
-
- // Continue to handle GUID
- getGuidFromString( pEvent, strGUID );
-
-
- // Copy in the data
- pEvent->pdata = new unsigned char[ pEvent->sizeData ];
- if ( NULL != pEvent->pdata ) {
- memcpy( pEvent->pdata, data, pEvent->sizeData );
- }
-
- return true;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdReceive
-//
-
-int VscpTcpIf::doCmdReceive( vscpEvent *pEvent )
-{
- int pos;
- wxStringTokenizer strTokens;
- wxString strLine;
- wxString strWrk;
- wxString strGUID;
-
- if ( NULL == m_psock ) return CANAL_ERROR_PARAMETER; // Must have a valid socket
- if ( !m_psock->IsOk() ) return CANAL_ERROR_PARAMETER; // Must be connected
-
- if ( NULL == pEvent ) return CANAL_ERROR_GENERIC;
-
- // If receive loop active terminate
- if ( m_bModeReceiveLoop ) return CANAL_ERROR_PARAMETER;
-
- wxString strCmd(_("RETR\r\n"));
- m_psock->Write( strCmd.mb_str(), strCmd.length() );
- if ( !checkReturnValue() ) return CANAL_ERROR_GENERIC;
-
- // Handle the data (if any)
- pos = m_strReply.Find(_("\r"));
- if ( !pos ) {
- return CANAL_ERROR_GENERIC; // No reply data
- }
-
- // Save the line
- strLine = m_strReply.Left( pos );
-
- // Take away the line we work on
- m_strReply = m_strReply.Right( m_strReply.length() - pos - 1 );
-
- if ( !getEventFromLine( strLine, pEvent ) ) return CANAL_ERROR_PARAMETER;
-
- return CANAL_ERROR_SUCCESS;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdReceiveEx
-//
-
-int VscpTcpIf::doCmdReceiveEx( vscpEventEx *pEventEx )
-{
- int pos;
- wxStringTokenizer strTokens;
- wxString strLine;
- wxString strBuf;
- wxString strWrk;
- wxString strGUID;
-
- if ( NULL == m_psock ) return CANAL_ERROR_PARAMETER; // Must have a valid socket
- if ( !m_psock->IsOk() ) return CANAL_ERROR_PARAMETER; // Must be connected
- if ( NULL == pEventEx ) return CANAL_ERROR_PARAMETER;
-
- // If receive loop active terminate
- if ( m_bModeReceiveLoop ) return CANAL_ERROR_PARAMETER;
-
- wxString strCmd(_("RETR\r\n"));
- m_psock->Write( strCmd.mb_str(), strCmd.length() );
- if ( !checkReturnValue() ) return CANAL_ERROR_GENERIC;
-
- // Handle the data (if any)
- pos = m_strReply.Find(_("\r") );
- if ( !pos ) {
- return CANAL_ERROR_GENERIC; // No reply data
- }
-
- // Save the line
- strLine = m_strReply.Left( pos );
-
- vscpEvent *pEvent = new vscpEvent;
- if ( NULL == pEvent) return CANAL_ERROR_PARAMETER;
-
- if ( !getEventFromLine( strLine, pEvent ) ) return CANAL_ERROR_PARAMETER;
-
- if ( !convertVSCPtoEx( pEventEx, pEvent ) ) {
- delete pEvent;
- return CANAL_ERROR_PARAMETER;
- }
-
- delete pEvent;
-
- return CANAL_ERROR_SUCCESS;
-
-}
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdReceiveLevel1
-//
-
-int VscpTcpIf::doCmdReceiveLevel1( canalMsg *pCanalMsg )
-{
- vscpEventEx event;
-
- if ( NULL == m_psock ) return CANAL_ERROR_PARAMETER; // Must have a valid socket
- if ( !m_psock->IsOk() ) return CANAL_ERROR_PARAMETER; // Must be connected
-
- // Must have a valid pointer
- if ( NULL == pCanalMsg ) return CANAL_ERROR_PARAMETER;
-
- // If receive loop active terminate
- if ( m_bModeReceiveLoop ) return CANAL_ERROR_PARAMETER;
-
- // Fetch event
- if ( CANAL_ERROR_SUCCESS != doCmdReceiveEx( &event ) ) return CANAL_ERROR_GENERIC;
-
- // No CAN or Level I event if data is > 8
- if ( event.sizeData > 8 ) return CANAL_ERROR_GENERIC;
-
-
- pCanalMsg->id = (unsigned long)( ( event.head >> 5 ) << 20 ) |
- ( (unsigned long)event.vscp_class << 16 ) |
- ( (unsigned long)event.vscp_type << 8) |
- event.GUID[ 15 ];
-
- pCanalMsg->obid = event.obid;
- pCanalMsg->sizeData = event.sizeData;
- if ( pCanalMsg->sizeData ) {
- memcpy( pCanalMsg->data, event.data, event.sizeData );
- }
-
- pCanalMsg->timestamp = event.timestamp;
-
- return CANAL_ERROR_SUCCESS;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdEnterReceiveLoop
-//
-
-int VscpTcpIf::doCmdEnterReceiveLoop( void )
-{
-
- // If receive loop active terminate
- if ( m_bModeReceiveLoop ) return CANAL_ERROR_PARAMETER;
-
- wxString strCmd(_("RCVLOOP\r\n"));
- m_psock->SetTimeout( 2 );
- m_psock->Write( strCmd.mb_str(), strCmd.length() );
- if ( !checkReturnValue() ) return CANAL_ERROR_GENERIC;
-
- m_strReply = _("");
- m_bModeReceiveLoop = true;
- return CANAL_ERROR_SUCCESS;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdBlockReceive
-//
-
-int VscpTcpIf::doCmdBlockReceive( vscpEvent *pEvent, uint32_t timeout )
-{
- char buf[512];
- static wxString strBuf = _("");
- wxString strReply;
-
- timeout = timeout;
-
- // If not receive loop active terminate
- if ( !m_bModeReceiveLoop ) return CANAL_ERROR_PARAMETER;
-
- // TODO This eats 100% CPU time on Windows. Why!?
- //if ( !m_psock->WaitForRead( 0, timeout ) ) {
- // return CANAL_ERROR_TIMEOUT;
- //}
-
- m_psock->Read( buf, sizeof( buf ) - 1 );
-
- if ( m_psock->Error() ) {
- if ( wxSOCKET_TIMEDOUT == m_psock->LastError() ) {
- return CANAL_ERROR_TIMEOUT;
- }
- else if ( wxSOCKET_INVOP == m_psock->LastError() ) {
- return CANAL_ERROR_COMMUNICATION;
- }
- else if ( wxSOCKET_IOERR == m_psock->LastError() ) {
- return CANAL_ERROR_COMMUNICATION;
- }
- else if ( wxSOCKET_INVADDR == m_psock->LastError() ) {
- return CANAL_ERROR_COMMUNICATION;
- }
- else if ( wxSOCKET_INVSOCK == m_psock->LastError() ) {
- return CANAL_ERROR_COMMUNICATION;
- }
- else if ( wxSOCKET_NOHOST == m_psock->LastError() ) {
- return CANAL_ERROR_COMMUNICATION;
- }
- else if ( wxSOCKET_INVPORT == m_psock->LastError() ) {
- return CANAL_ERROR_COMMUNICATION;
- }
- else if ( wxSOCKET_WOULDBLOCK == m_psock->LastError() ) {
- return CANAL_ERROR_FIFO_EMPTY;
- }
- else if ( wxSOCKET_MEMERR == m_psock->LastError() ) {
- return CANAL_ERROR_COMMUNICATION;
- }
- else {
- return CANAL_ERROR_COMMUNICATION;
- }
- }
-
- if ( m_psock->LastCount() > 0 ) {
- buf[ m_psock->LastCount() ] = 0;
- //wxLogDebug( _("Length of reply = %d"), m_psock->LastCount() );
- strBuf += wxString( buf, wxConvUTF8 );
- //wxLogDebug( strBuf );
- }
-
- int pos;
- int rv = CANAL_ERROR_SUCCESS;
- while ( ( pos = strBuf.Find( 0x0A ) ) ) {
-
- if ( wxNOT_FOUND == pos ) return CANAL_ERROR_FIFO_EMPTY;
- if ( 0 == pos ) {
- //wxLogDebug( _("pos == NULL") );
- strBuf = strBuf.Right( strBuf.Length() - 1 );
- //wxLogDebug( strBuf );
- rv = CANAL_ERROR_PARAMETER;
- continue;
- }
-
- wxString strLine;
- strLine = strBuf.Mid( 0, pos );
- strBuf = strBuf.Mid( pos + 1 );
-
- //wxLogDebug( _("[") + strLine + _("]") );
-
- if ( wxNOT_FOUND != strLine.Find(_("+OK")) ) {
- rv = CANAL_ERROR_FIFO_EMPTY; // No data
- continue;
- }
-
- //wxMessageBox( _("Line=") + strLine );
- //wxMessageBox( _("Buf=") + strBuf );
-
- // Get the event
- if ( !getEventFromLine( strLine, pEvent ) ) {
- rv = CANAL_ERROR_PARAMETER;
- continue;
- }
-
- return CANAL_ERROR_SUCCESS;
-
- }
-
- return rv;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdDataAvailable
-//
-
-int VscpTcpIf::doCmdDataAvailable( void )
-{
- wxString strLine;
- int pos;
- int nMsg = 0;
-
-
- // If receive loop active terminate
- if ( m_bModeReceiveLoop ) return 0;
-
- wxString strCmd(_("CDTA\r\n"));
- m_psock->Write( strCmd.mb_str(), strCmd.length() );
- if ( !checkReturnValue() ) return 0;
-
- // Handle the data (if any)
- pos = m_strReply.Find(_("\r") );
- if ( !pos ) {
- return 0; // No reply data
- }
-
- // Save the line
- strLine = m_strReply.Left( pos );
-
- long val;
- if ( strLine.ToLong(&val) ) {
- nMsg = (uint16_t)val;
- }
-
- return nMsg;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdState
-//
-
-int VscpTcpIf::doCmdStatus( canalStatus *pStatus )
-{
- int pos;
- long val;
- wxString strBuf;
- wxString strWrk;
- wxString strLine;
- wxStringTokenizer strTokens;
-
- if ( NULL == m_psock ) return CANAL_ERROR_PARAMETER; // Must have a valid socket
- if ( !m_psock->IsOk() ) return CANAL_ERROR_PARAMETER; // Must be connected
-
- // If receive loop active terminate
- if ( m_bModeReceiveLoop ) return CANAL_ERROR_PARAMETER;
-
- wxString strCmd(_("INFO\r\n"));
- m_psock->Write( strCmd.mb_str(), strCmd.length() );
- if ( !checkReturnValue() ) return CANAL_ERROR_GENERIC;
-
- // Handle the data (if any)
- pos = m_strReply.Find(_("\r") );
- if ( !pos ) {
- return CANAL_ERROR_GENERIC; // No reply data
- }
-
- // Save the line
- strLine = m_strReply.Left( pos );
-
- // channelstatus
- strTokens.SetString( strLine, _(",\r\n") );
-
- // lasterrorcode
- if ( !strTokens.HasMoreTokens() ) return CANAL_ERROR_GENERIC;
- ( strTokens.GetNextToken() ).ToLong( &val );
- pStatus->lasterrorcode = val;
-
-
- // lasterrorsubcode
- if ( !strTokens.HasMoreTokens() ) return CANAL_ERROR_GENERIC;
- ( strTokens.GetNextToken() ).ToLong( &val );
- pStatus->lasterrorsubcode = val;
-
-
- // lasterrorsubcode
- if ( !strTokens.HasMoreTokens() ) return CANAL_ERROR_GENERIC;
- strWrk = strTokens.GetNextToken();
- memcpy( pStatus->lasterrorstr, strWrk, sizeof(pStatus->lasterrorstr) );
-
- return CANAL_ERROR_SUCCESS;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdStatistics
-//
-
-int VscpTcpIf::doCmdStatistics( canalStatistics *pStatistics )
-{
- int pos;
- long val;
- wxString strBuf;
- wxString strWrk;
- wxString strLine;
- wxStringTokenizer strTokens;
-
- if ( NULL == m_psock ) return CANAL_ERROR_PARAMETER; // Must have a valid socket
- if ( !m_psock->IsOk() ) return CANAL_ERROR_PARAMETER; // Must be connected
-
- // If receive loop active terminate
- if ( m_bModeReceiveLoop ) return CANAL_ERROR_PARAMETER;
-
- wxString strCmd(_("STAT\r\n"));
- m_psock->Write( strCmd.mb_str(), strCmd.length() );
- if ( !checkReturnValue() ) return CANAL_ERROR_GENERIC;
-
- // Handle the data (if any)
- pos = m_strReply.Find(_("\r") );
- if ( !pos ) {
- return CANAL_ERROR_GENERIC; // No reply data
- }
-
- // Save the line
- strLine = m_strReply.Left( pos );
-
- strTokens.SetString( strLine, _(",\r\n"));
-
- // Busoff
- pStatistics->cntBusOff = 0;
- if ( ( strTokens.GetNextToken() ).ToLong( &val ) ) {
- pStatistics->cntBusOff = val;
- }
- else {
- return CANAL_ERROR_GENERIC;
- }
-
-
- // Buswarnings
- pStatistics->cntBusWarnings = 0;
- if ( ( strTokens.GetNextToken() ).ToLong( &val ) ) {
- pStatistics->cntBusWarnings = val;
- }
- else {
- return CANAL_ERROR_GENERIC;
- }
-
-
-
- // Overruns
- pStatistics->cntOverruns = 0;
- if ( ( strTokens.GetNextToken() ).ToLong( &val ) ) {
- pStatistics->cntOverruns = val;
- }
- else {
- return CANAL_ERROR_GENERIC;
- }
-
-
- // Received data
- pStatistics->cntReceiveData = 0;
- if ( ( strTokens.GetNextToken() ).ToLong( &val ) ) {
- pStatistics->cntReceiveData = val;
- }
- else {
- return CANAL_ERROR_GENERIC;
- }
-
-
-
- // Received Frames
- pStatistics->cntReceiveFrames = 0;
- if ( ( strTokens.GetNextToken() ).ToLong( &val ) ) {
- pStatistics->cntReceiveFrames = val;
- }
- else {
- return CANAL_ERROR_GENERIC;
- }
-
-
-
- // Transmitted data
- pStatistics->cntTransmitData = 0;
- if ( ( strTokens.GetNextToken() ).ToLong( &val ) ) {
- pStatistics->cntReceiveFrames = val;
- }
- else {
- return CANAL_ERROR_GENERIC;
- }
-
-
- // Transmitted frames
- pStatistics->cntTransmitFrames = 0;
- if ( ( strTokens.GetNextToken() ).ToLong( &val ) ) {
- pStatistics->cntTransmitFrames = val;
- }
- else {
- return CANAL_ERROR_GENERIC;
- }
-
- return CANAL_ERROR_SUCCESS;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// doCmdFilter
-//
-
-int VscpTcpIf::doCmdFilter( vscpEventFilter *pFilter )
-{
- wxString strCmd;
-
- if ( NULL == m_psock ) return CANAL_ERROR_PARAMETER; // Must have a valid socket
- if ( !m_psock->IsOk() ) return CANAL_ERROR_PARAMETER; // Must be connected
-
- // If receive loop active terminate
- if ( m_bModeReceiveLoop ) return CANAL_ERROR_PARAMETER;
-
- // filter-priority, filter-class, filter-type, filter-GUID
- strCmd.Printf( _("SFLT %d,%d,%d,%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d\r\n"),
- pFilter->filter_priority,
- pFilter->filter_class,
- pFilter->filter_type,
- pFilter->filter_GUID[ 0 ],
- pFilter->filter_GUID[ 1 ],
- pFilter->filter_GUID[ 2 ],
- pFilter->filter_GUID[ 3 ],
- pFilter->filter_GUID[ 4 ],
- pFilter->filter_GUID[ 5 ],
- pFilter->filter_GUID[ 6 ],
- pFilter->filter_GUID[ 7 ],
- pFilter->filter_GUID[ 8 ],
- pFilter->filter_GUID[ 9 ],
- pFilter->filter_GUID[ 10 ],
- pFilter->filter_GUID[ 11 ],
- pFilter->filter_GUID[ 12 ],
- pFilter->filter_GUID[ 13 ],
- pFilter->filter_GUID[ 14 ],
- pFilter->filter_GUID[ 15 ] );
-
- m_psock->Write( strCmd.mb_str(), strCmd.length() );
- if ( !checkReturnValue() ) return CANAL_ERROR_GENERIC;
-
-
- // mask-priority, mask-class, mask-type, mask-GUID
- strCmd.Printf( _("SFLT %d,%d,%d,%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d\r\n"),
- pFilter->mask_priority,
- pFilter->mask_class,
- pFilter->mask_type,
- pFilter->mask_GUID[ 0 ],
- pFilter->mask_GUID[ 1 ],
- pFilter->mask_GUID[ 2 ],
- pFilter->mask_GUID[ 3 ],
- pFilter->mask_GUID[ 4 ],
- pFilter->mask_GUID[ 5 ],
- pFil...
[truncated message content] |
|
From: <ak...@us...> - 2008-04-16 20:26:56
|
Revision: 884
http://can.svn.sourceforge.net/can/?rev=884&view=rev
Author: akhe
Date: 2008-04-16 13:26:51 -0700 (Wed, 16 Apr 2008)
Log Message:
-----------
Trim problem fixed (again ;-/ )
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c
trunk/src/vscp/common/canal.h
trunk/src/vscp/common/vscptcpif.cpp
trunk/src/vscp/vscpworks/dlgnewvscpsession.cpp
trunk/src/vscp/vscpworks/vscpworks.cpp
Modified: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c 2008-04-16 18:35:26 UTC (rev 883)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c 2008-04-16 20:26:51 UTC (rev 884)
@@ -56,12 +56,16 @@
/* Private variables ---------------------------------------------------------*/
/* array of pre-defined timing parameters for standard bitrates*/
-u16 CanTimings[] = { /* value bitrate NTQ TSEG1 TSEG2 SJW BRP */
- CAN_TIMING(11, 4, 4, 5), /* 0x3AC4 100 kbit/s 16 11 4 4 5 */
- CAN_TIMING(11, 4, 4, 4), /* 0x3AC3 125 kbit/s 16 11 4 4 4 */
- CAN_TIMING( 4, 3, 3, 4), /* 0x2383 250 kbit/s 8 4 3 3 4 */
- CAN_TIMING(13, 2, 1, 1), /* 0x1C00 500 kbit/s 16 13 2 1 1 */
- CAN_TIMING( 4, 3, 1, 1), /* 0x2300 1 Mbit/s 8 4 3 1 1 */
+u16 CanTimings[] = { /* value bitrate NTQ TSEG1 TSEG2 SJW BRP Sample point */
+ CAN_TIMING(11, 4, 4, 5), /* 10 kbit/s 24 16 7 4 32 70.8% */
+ CAN_TIMING(12, 2, 2, 25), /* 20 kbit/s 16 12 2 1 25 87.5% */
+ CAN_TIMING(12, 2, 2, 10), /* 50 kbit/s 16 12 2 1 10 87.5% */
+ CAN_TIMING(11, 4, 4, 5), /* 0x3AC4 100 kbit/s 16 11 4 4 5 75% */
+ CAN_TIMING(11, 4, 4, 4), /* 0x3AC3 125 kbit/s 16 11 4 4 4 75% */
+ CAN_TIMING( 4, 3, 3, 4), /* 0x2383 250 kbit/s 8 4 3 3 4 62.5% */
+ CAN_TIMING(13, 2, 1, 1), /* 0x1C00 500 kbit/s 16 13 2 1 1 87.5% */
+ CAN_TIMING(13, 2, 1, 1), /* 800 kbit/s 10 7 2 1 1 80% */
+ CAN_TIMING( 4, 3, 1, 1), /* 0x2300 1 Mbit/s 8 4 3 1 1 62.5% */
};
/* Private function prototypes -----------------------------------------------*/
Modified: trunk/src/vscp/common/canal.h
===================================================================
--- trunk/src/vscp/common/canal.h 2008-04-16 18:35:26 UTC (rev 883)
+++ trunk/src/vscp/common/canal.h 2008-04-16 20:26:51 UTC (rev 884)
@@ -416,7 +416,7 @@
#define CANAL_BAUD_20 8 // 20 Kbit
#define CANAL_BAUD_10 9 // 10 Kbit
-/// Status message codes ( in received message)
+/// Status message codes ( in received message )
#define CANAL_STATUSMSG_OK 0x00 // Normal condition.
#define CANAL_STATUSMSG_OVERRUN 0x01 // Overrun occured when sending data to CAN bus.
#define CANAL_STATUSMSG_BUSLIGHT 0x02 // Error counter has reached 96.
Modified: trunk/src/vscp/common/vscptcpif.cpp
===================================================================
--- trunk/src/vscp/common/vscptcpif.cpp 2008-04-16 18:35:26 UTC (rev 883)
+++ trunk/src/vscp/common/vscptcpif.cpp 2008-04-16 20:26:51 UTC (rev 884)
@@ -184,7 +184,8 @@
// Username
strUsername = tkz.GetNextToken();
- strUsername.Trim();
+ strUsername.Trim(false);
+ strUsername.Trim();
if ( strUsername.length() ) {
// If a username is given a password is required
bUsePassword = true;
@@ -195,7 +196,8 @@
// Password
strPassword = tkz.GetNextToken();
- strPassword.Trim();
+ strPassword.Trim(false);
+ strPassword.Trim();
wxLogDebug( _("strPassword = ") );
wxLogDebug( strPassword );
@@ -204,8 +206,9 @@
if ( wxstr.length() ) {
strHostname = wxstr;
}
- strHostname.Trim();
-
+ strHostname.Trim(false);
+ strHostname.Trim();
+
wxLogDebug( _("strHostname = ") );
wxLogDebug( strHostname );
@@ -233,17 +236,20 @@
const wxString& strUsername,
const wxString& strPassword )
{
- wxString strBuf;
-
- // Create the socket
+ wxString strBuf;
+ wxString wxstr;
+
+ // Create the socket
if ( NULL == ( m_psock = new wxSocketClient( wxSOCKET_BLOCK ) ) ) return CANAL_ERROR_GENERIC;
// Here if we are connected
//m_psock->SetFlags( wxSOCKET_NOWAIT );
m_psock->SetTimeout(2);
-
+
+ wxstr = strHostname;
+ wxstr.Trim(false);
wxIPV4address addr;
- addr.Hostname( strHostname );
+ addr.Hostname( wxstr );
addr.Service( port );
// Connect to server
@@ -268,13 +274,17 @@
wxLogDebug( _("Successfully connected to ") + strHostname );
- // Username
- strBuf = _("USER ") + strUsername + _("\r\n");
+ // Username
+ wxstr = strUsername;
+ wxstr.Trim(false);
+ strBuf = _("USER ") + wxstr + _("\r\n");
m_psock->Write( strBuf.mb_str(), strBuf.length() );
if ( !checkReturnValue() ) return 0;
- // Password
- strBuf = _("PASS ") + strPassword + _("\r\n");
+ // Password
+ wxstr = strPassword;
+ wxstr.Trim(false);
+ strBuf = _("PASS ") + wxstr + _("\r\n");
m_psock->Write( strBuf.mb_str(), strBuf.length() );
if ( !checkReturnValue() ) return 0;
Modified: trunk/src/vscp/vscpworks/dlgnewvscpsession.cpp
===================================================================
--- trunk/src/vscp/vscpworks/dlgnewvscpsession.cpp 2008-04-16 18:35:26 UTC (rev 883)
+++ trunk/src/vscp/vscpworks/dlgnewvscpsession.cpp 2008-04-16 20:26:51 UTC (rev 884)
@@ -344,8 +344,14 @@
if ( NULL != pInfo ) {
pInfo->m_strDescription = dlg.m_RemoteServerDescription->GetValue();
pInfo->m_strHost = dlg.m_RemoteServerURL->GetValue();
+ pInfo->m_strHost.Trim(false);
+ pInfo->m_strHost.Trim();
pInfo->m_strUser = dlg.m_RemoteServerUsername->GetValue();
+ pInfo->m_strUser.Trim(false);
+ pInfo->m_strUser.Trim();
pInfo->m_strPassword = dlg.m_RemoteServerPassword->GetValue();
+ pInfo->m_strPassword.Trim(false);
+ pInfo->m_strPassword.Trim();
dlg.m_RemoteServerPort->GetValue().ToULong( &pInfo->m_port );
wxString str;
str = dlg.m_GUID0->GetValue();
Modified: trunk/src/vscp/vscpworks/vscpworks.cpp
===================================================================
--- trunk/src/vscp/vscpworks/vscpworks.cpp 2008-04-16 18:35:26 UTC (rev 883)
+++ trunk/src/vscp/vscpworks/vscpworks.cpp 2008-04-16 20:26:51 UTC (rev 884)
@@ -2068,9 +2068,8 @@
}
else if (subsubchild->GetName() == wxT("host")) {
-
- pVSCPif->m_strHost = subsubchild->GetNodeContent().Trim();
-
+ pVSCPif->m_strHost = subsubchild->GetNodeContent();
+ pVSCPif->m_strHost.Trim(false);
}
else if (subsubchild->GetName() == wxT("port")) {
@@ -2086,12 +2085,16 @@
}
else if (subsubchild->GetName() == wxT("username")) {
- pVSCPif->m_strUser = subsubchild->GetNodeContent().Trim();
+ pVSCPif->m_strUser = subsubchild->GetNodeContent().Trim();
+ pVSCPif->m_strUser.Trim(false);
+ pVSCPif->m_strUser.Trim();
}
else if (subsubchild->GetName() == wxT("password")) {
- pVSCPif->m_strPassword = subsubchild->GetNodeContent().Trim();
+ pVSCPif->m_strPassword = subsubchild->GetNodeContent().Trim();
+ pVSCPif->m_strPassword.Trim(false);
+ pVSCPif->m_strPassword.Trim();
}
else if (subsubchild->GetName() == wxT("guid")) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-04-17 11:21:29
|
Revision: 885
http://can.svn.sourceforge.net/can/?rev=885&view=rev
Author: akhe
Date: 2008-04-17 04:21:20 -0700 (Thu, 17 Apr 2008)
Log Message:
-----------
Fixed bug for command frame send.
Renamed ...RESPONSE opcode to ...REPLY
Modified Paths:
--------------
trunk/firmware/common/vscp_serial.c
trunk/firmware/common/vscp_serial.h
Property Changed:
----------------
trunk/src/vscp/
trunk/src/vscp/common/
trunk/src/vscp/samples/testinterface/VCProjectDebug/
trunk/src/vscp/samples/testinterface/VCUnicodeDebug/
Modified: trunk/firmware/common/vscp_serial.c
===================================================================
--- trunk/firmware/common/vscp_serial.c 2008-04-16 20:26:51 UTC (rev 884)
+++ trunk/firmware/common/vscp_serial.c 2008-04-17 11:21:20 UTC (rev 885)
@@ -420,7 +420,7 @@
vs_bufferSerialByte( STX );
// ACK Code
- vs_bufferSerialByteSubst( &checksum, VSCP_SERIAL_OPCODE_ERROR );
+ vs_bufferSerialByteSubst( &checksum, VSCP_SERIAL_OPCODE_COMMAND );
// Flags: Data byte count
vs_bufferSerialByteSubst( &checksum, count );
Modified: trunk/firmware/common/vscp_serial.h
===================================================================
--- trunk/firmware/common/vscp_serial.h 2008-04-16 20:26:51 UTC (rev 884)
+++ trunk/firmware/common/vscp_serial.h 2008-04-17 11:21:20 UTC (rev 885)
@@ -88,7 +88,7 @@
#define VSCP_SERIAL_OPCODE_ACK 251
#define VSCP_SERIAL_OPCODE_NACK 252
#define VSCP_SERIAL_OPCODE_ERROR 253
-#define VSCP_SERIAL_OPCODE_RESPONSE 254
+#define VSCP_SERIAL_OPCODE_REPLY 254
#define VSCP_SERIAL_OPCODE_COMMAND 255
// CAN flag bits (uses data byte 0-3 for id and
Property changes on: trunk/src/vscp
___________________________________________________________________
Name: svn:ignore
- Deliveryx
Delivery
*.ncb
*.opt
delivery
deliveryx
VCProjectunicodeDebug
+ Deliveryx
Delivery
*.ncb
*.opt
delivery
deliveryx
VCProjectunicodeDebug
ReleaseDll
Release
Property changes on: trunk/src/vscp/common
___________________________________________________________________
Name: svn:ignore
+ Debug
Property changes on: trunk/src/vscp/samples/testinterface/VCProjectDebug
___________________________________________________________________
Name: svn:ignore
+ *.obj
*.exe
*.ilk
Property changes on: trunk/src/vscp/samples/testinterface/VCUnicodeDebug
___________________________________________________________________
Name: svn:ignore
+ *.obj
*.exe
*.ilk
*.pdb
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-04-24 11:45:46
|
Revision: 889
http://can.svn.sourceforge.net/can/?rev=889&view=rev
Author: akhe
Date: 2008-04-24 04:45:41 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
VSCP moved to m2m
Removed Paths:
-------------
trunk/BUILD
trunk/BUILD_UNIX
trunk/BUILD_WIN32.txt
trunk/LPC2_CANFull_V110/
trunk/ODIN/
trunk/docs/vscp/
trunk/firmware/
trunk/src/common/Comm.cpp
trunk/src/common/Comm.h
trunk/src/common/MSG00001.bin
trunk/src/common/NTService.cpp
trunk/src/common/NTService.h
trunk/src/common/com.cpp
trunk/src/common/com.h
trunk/src/common/com_linux.cpp
trunk/src/common/com_linux.h
trunk/src/common/com_win32.cpp
trunk/src/common/com_win32.h
trunk/src/common/configfile.cpp
trunk/src/common/configfile.h
trunk/src/common/crc.c
trunk/src/common/crc.h
trunk/src/common/dl/
trunk/src/common/dllist.c
trunk/src/common/dllist.h
trunk/src/common/hashtable.c
trunk/src/common/hashtable.cpp
trunk/src/common/hashtable.h
trunk/src/common/kwxIndControlSource-0.3.0/
trunk/src/common/libwxctb-0.13/
trunk/src/common/libwxctb-0.8/
trunk/src/common/md5.cpp
trunk/src/common/md5.h
trunk/src/common/msglog.cpp
trunk/src/common/msglog.h
trunk/src/common/node.cpp
trunk/src/common/node.h
trunk/src/common/ntservmsg.h
trunk/src/common/ntservmsg.rc
trunk/src/common/pdu.cpp
trunk/src/common/pdu.h
trunk/src/common/rscalc.c
trunk/src/common/stdafx.h
trunk/src/common/wxMySQL/
trunk/src/devtest/
trunk/src/vscp/
Deleted: trunk/BUILD
===================================================================
--- trunk/BUILD 2008-04-20 20:51:25 UTC (rev 888)
+++ trunk/BUILD 2008-04-24 11:45:41 UTC (rev 889)
@@ -1,11 +0,0 @@
-Run "./configure" and then "make all"
-
-If you get "permission denied" when you run configure add exceution rights to it.
-
-wxWidgets should be installed before build. Use ANSI and DEBUg build for best results.
-
-automake/autoconf
-=================
-Check http://howto.ewtoo.org/show.cgi?howto=autoconf.txt
-
-Special build instructions is in BUILD_UNIX and BUILD_WIN32.txt
Deleted: trunk/BUILD_UNIX
===================================================================
--- trunk/BUILD_UNIX 2008-04-20 20:51:25 UTC (rev 888)
+++ trunk/BUILD_UNIX 2008-04-24 11:45:41 UTC (rev 889)
@@ -1,159 +0,0 @@
-To build VSCP and friends type
-
-".configure --enable-unicode"
-
-followed by
-
-"make"
-
-and "make install" as root user.
-
-You can use ./configure --help to get help about available switches. Use --enable-debug to use the debug
-version of wxWidgets and use --enable-unicode to use the unicode version. The use of the unicode version
-is recommended.
-
-
-To compile the package you need the wxWidgets libraries (GTK2). The toolkit can be found at
-http://www.wxwidgets.org. At the moment use the graphical version of the library (not base) even if you
-only will use the nongraphic components.
-
-If you want the VSCP Works application to compile the wxWidgets library has to be configured with the
---enable-richtext otherwise it will not compile.
-
-Configuration files should be located in /etc/vscp and there are samples of configuration files here in the root.
-The names should be vscpd.conf for the daemon and vscpworks.conf for VSCP works. The daemon can be started with
-a path to a configuration file in anoter location using the -c switch.
-
-
-Have Fun!
-/Ake <ak...@do...>
-
-
-
-Common Problems and notes
-=========================
-
-
-
-vscpworks does not compile
-==========================
-Check that you configured the wxWidgets package with --enable-richtext. If you issue "wx-config --libs" you should see the richtext library.
-
-
-
-
-Problems with missing libcrypto
-===============================
-
-Compile complains that it can't find openssl/md5.h
-
-Solution: On Ubuntu at least install libssl-dev. libcurl2-opemssl-dev also works on debian etch.
-
-
-
-Complains ‘class wxXmlNode’ has no member named ‘GetNodeContent’
-================================================================
-You need wxWidgets 2.8.0 or newer.
-
-
-
----------------------------------------------------------------------
-
-Compile errors when issuing Make. This can be due to many things. One cause is that the wxBase version of the
-wxWidgets library is used instead of the full library (wxGTK2 library). You can check if this is the cause of
-the failure by looking in src/canal/cancmd/Makefile. The
-Makefile should have a CXXFLAGS entry that looks something like below. if it have
--I/usr/local/lib/wx/include/base... the base library of the wxWidgets toolkit is installed and you should
-install the full version instead.
-
-CXXFLAGS = -g -O2 -I/usr/local/lib/wx/include/gtk2-ansi-debug-2.6 -I/usr/local/include/wx-2.6 -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA
-
-
-Use "wx-config" to check wxWidgets configurations
-
-
-Debian etch
-===========
-make sure libopenssl-debv and libgtk2.0-dev is installed. Fet wxWidgets-1.8.7 or later from the wxWidgets site
-and configure with
-
-./configure --enable-unicode
-
-Unsure if --enable-richtext really is needed. If you get compiants about it add the switch.
-
-Make the library with "make" and install it with "make install" if it compiled OK.
-
-tiff, gif, and librarues are needed for wxWidgets to compile install them. You can seach the package names with
-
-apt-cache search libxxx | grep libxx | less
-
-Remember to add the path to /usr/local/lib to /etc/ld.so.conf.d/i486-linux-gnu.conf and then issue "ldconfig"
-after installing the libs.
-
-After this just build and install VSCP & Friends.
-
-
-Fedora Core 4
-=============
-libwx_gtk2_xrc-2.6.so.0 is missing when you try to start cw. This means that the path to it cant be found. Add the path to /etc/ld.conf.d (new entry with /usr/local/lib) and the problem will be resolved.
-
-Known configuration that compiles out of the box on Fedora Core 4 is 2.6, ansi, debug. Release build should also work.
-
-The wx libraries was built with the following swithes
-
-./configure --enable-debug --disable-unicode
-
-"wx-config" gives the following output
-
-wx-config --prefix
-/usr/local
-
-wx-config --exec-prefix
-/usr/local
-
-wx-config --release
-2.6
-
-wx-config --list
-
- Default config is gtk2-ansi-debug-2.6
-
- Default config will be used for output
-
- Alternate matches:
- base-ansi-debug-2.6
- base-ansi-release-2.6
- gtk2-ansi-release-2.6
-
-wx-config --version
-2.6.3
-
-wx-config --basename
-wx_gtk2d
-
-wx-config --cc
-gcc
-
-wx-config --cppflags
--I/usr/local/lib/wx/include/gtk2-ansi-debug-2.6 -I/usr/local/include/wx-2.6 -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA
-
-wx-config --cxxflags
--I/usr/local/lib/wx/include/gtk2-ansi-debug-2.6 -I/usr/local/include/wx-2.6 -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA
-
-wx-config --libs
--L/usr/local/lib -pthread -L/usr/X11R6/lib -lwx_gtk2d_xrc-2.6 -lwx_gtk2d_qa-2.6 -lwx_gtk2d_html-2.6 -lwx_gtk2d_adv-2.6 -lwx_gtk2d_core-2.6 -lwx_based_xml-2.6 -lwx_based_net-2.6 -lwx_based-2.6
-
-wx-config --cxx
-g++
-
-wx-config --ld
-g++ -shared -fPIC -o
-
-wx-config --linkdeps
-
-
-
-
-
-
-
Deleted: trunk/BUILD_WIN32.txt
===================================================================
--- trunk/BUILD_WIN32.txt 2008-04-20 20:51:25 UTC (rev 888)
+++ trunk/BUILD_WIN32.txt 2008-04-24 11:45:41 UTC (rev 889)
@@ -1,36 +0,0 @@
-How Set up development environment VSCP under WIN32
-===================================================
-
-1.) All files are placed relative to a drive "J" which contains the root VSCP folder. This
- driver can be created with the "subst" command as "subst J: path_to_VSCP_root". There is
- a batch file "setenv_vscp.bat" in the root folder that do this for a system where the files is placed in the
- folder "development" of the root folder.
-
-2.) Install and build wxWidgets 2.6.0 or higher. 2.8.0 Recommended but others will probably
- do to
-
-3.) Make an environment variable WXWIN that points to the wxWidgets installation directory.
- (e.g. c:\wxWidgets-2.6.0).
-
-4.) Add the wxwin include directory to the list of include files under
- tools->options->directories ($WXWIN)\include (c:\wxWidgets-2.6.0\include).
-
-5.) To build the APOX driver the include path (tools->options->directories) needs to point
- to the FTD2DXX directory which contains FTD2XX.h This driver is available from ftdi
- (http://www.ftdichip.com/). Also the library path needs to point to this directory to
- find FTD2XX.LIB.
-
-6.) To build ccsdrv include must point to directory which contains can.h and LIB must point
- to directory that contains can.lib and candbg.lib (tools->options->directories).
-
-7.) To build ixxatvcidrv you need to add the ixxat include directory and also add the ixxat
- lib directory to LIB( Xat11Reg.lib vci11un6.lib ) (tools->options->directories).
-
-8.) lircdrv: expat is needed you build the lircdrv as well as winlirc. Set include in
- tools->options->directories to point to expat.h in <expat install dir>/source/lib and
- LIB to expat lib <expat install dir>/StaticLibs. Expat is available here
- http://sourceforge.net/projects/expat/ and winlirc is here http://sourceforge.net/projects/winlirc/
-
-9.) To build the vector driver (vectordrv) the INCLUDE and LIB paths must point to
- to the vector directories LIB and INCLUDE.
-
\ No newline at end of file
Deleted: trunk/src/common/Comm.cpp
===================================================================
--- trunk/src/common/Comm.cpp 2008-04-20 20:51:25 UTC (rev 888)
+++ trunk/src/common/Comm.cpp 2008-04-24 11:45:41 UTC (rev 889)
@@ -1,314 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// COMComm.cpp:
-//
-// Copyright (C) 2000-2008 Ake Hedman, eurosource, <ak...@eu...>
-//
-// This software is placed into
-// the public domain and may be used for any purpose. However, this
-// notice must not be changed or removed and no warranty is either
-// expressed or implied by its publication or distribution.
-//
-// $RCSfile: Comm.cpp,v $
-// $Date: 2005/08/30 11:00:13 $
-// $Author: akhe $
-// $Revision: 1.3 $
-///////////////////////////////////////////////////////////////////////////////
-
-#include "stdafx.h"
-#include "Comm.h"
-
-#ifdef _DEBUG
-#undef THIS_FILE
-static char THIS_FILE[]=__FILE__;
-#define new DEBUG_NEW
-#endif
-
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Constructor
-//
-
-CComm::CComm()
-{
- m_hCommPort = NULL;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// Destructor
-//
-
-CComm::~CComm()
-{
- if ( NULL != m_hCommPort ) {
- CloseHandle( m_hCommPort );
- }
-}
-
-
-/////////////////////////////////////////////////////////////////////////////
-// init
-//
-
-bool CComm::init( unsigned char nComPort,
- DWORD nBaudRate,
- unsigned char nDatabits,
- unsigned char nParity,
- unsigned char nStopbits,
- unsigned char nHandshake )
-{
- char szComPort[10];
- COMMTIMEOUTS ct;
- DCB dcbCommPort; // ONESTOPBIT
-
- // Check com-port data
- if ( nComPort!= 0 ) {
- sprintf( szComPort, "COM%d", nComPort );
- }
- else {
- return false;
- }
-
- if ( INVALID_HANDLE_VALUE ==
- ( m_hCommPort = CreateFile( szComPort,
- GENERIC_READ | GENERIC_WRITE,
- 0,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL ) ) ) {
- return false;
- }
-
- memset( &ct, 0, sizeof( ct ) );
-
- // Set timeouts
- ct.ReadIntervalTimeout = 200;
- ct.ReadTotalTimeoutMultiplier = 0;
- ct.ReadTotalTimeoutConstant = 200;
- ct.WriteTotalTimeoutMultiplier = 0;
- ct.WriteTotalTimeoutConstant = 200;
- SetCommTimeouts( m_hCommPort, &ct );
-
- // Comm state
- if ( !GetCommState( m_hCommPort, &dcbCommPort ) ) {
- CloseHandle( m_hCommPort );
- return false;
- }
-
- dcbCommPort.DCBlength = sizeof( DCB );
- dcbCommPort.BaudRate = nBaudRate;
- if ( nParity != NOPARITY ) {
- dcbCommPort.fParity = true;
- }
- else {
- dcbCommPort.fParity = false;
- }
-
- dcbCommPort.Parity = nParity;
- dcbCommPort.fDtrControl = DTR_CONTROL_ENABLE;
- dcbCommPort.fDsrSensitivity = DTR_CONTROL_DISABLE;
- dcbCommPort.ByteSize = nDatabits;
- dcbCommPort.StopBits = nStopbits;
-
- if ( HANDSHAKE_HARDWARE == nHandshake ) {
-
- // Software flow control
- dcbCommPort.fOutX = FALSE;
- dcbCommPort.fInX = FALSE;
-
- // Hardware flow control
- dcbCommPort.fOutxCtsFlow = TRUE;
- dcbCommPort.fOutxDsrFlow = TRUE;
-
- }
- else if ( HANDSHAKE_SOFTWARE == nHandshake ) {
-
- // Software flow control
- dcbCommPort.fOutX = TRUE;
- dcbCommPort.fInX = TRUE;
-
- // Hardware flow control
- dcbCommPort.fOutxCtsFlow = FALSE;
- dcbCommPort.fOutxDsrFlow = FALSE;
-
- }
- else { // HANDSHAKE_NONE
-
- // Software flow control
- dcbCommPort.fOutX = FALSE;
- dcbCommPort.fInX = FALSE;
-
- // Hardware flow control
- dcbCommPort.fOutxCtsFlow = FALSE;
- dcbCommPort.fOutxDsrFlow = FALSE;
- }
-
- if ( !SetCommState( m_hCommPort, &dcbCommPort ) ) {
- CloseHandle( m_hCommPort );
- return false;
- }
-
- //COMMPROP prop;
- //GetCommProperties( m_hCommPort, &prop );
-
- return true;
-}
-
-
-/////////////////////////////////////////////////////////////////////////////
-// readChar
-//
-
-char CComm::readChar( int* cnt )
-{
- char c = 0;
- DWORD dwCount;
-
- int result = 0;
-
- result = ReadFile( m_hCommPort, &c, 1, &dwCount, NULL );
- if (result == 0) {
- int err = GetLastError();
- }
-
- *cnt = dwCount;
- return c;
-}
-
-
-/////////////////////////////////////////////////////////////////////////////
-// write
-//
-
-void CComm::write( char* String, bool bCRLF, bool bNoLF )
-{
- DWORD dwCount;
- char c;
-
- //for (int i = 0;i < ((signed)strlen(String)); i++) {
- WriteFile( m_hCommPort, String, strlen( String ), &dwCount, NULL );
- //}
-
- if ( bCRLF ) {
- c = 13;
- WriteFile( m_hCommPort, &c, 1, &dwCount, NULL );
-
- if ( !bNoLF ) {
- c = 10;
- WriteFile( m_hCommPort, &c, 1, &dwCount, NULL );
- }
- }
-}
-
-
-/////////////////////////////////////////////////////////////////////////////
-// write
-//
-
-BOOL CComm::writebuf( unsigned char * p, unsigned short cnt )
-{
- DWORD dwCount;
- return WriteFile( m_hCommPort, p, cnt, &dwCount, NULL );
-}
-
-
-/////////////////////////////////////////////////////////////////////////////
-// writeChar
-//
-
-void CComm::writeChar( unsigned char b )
-{
- DWORD dwCount;
-
- WriteFile( m_hCommPort, &b, 1, &dwCount, NULL );
-}
-
-
-
-/////////////////////////////////////////////////////////////////////////////
-// close
-//
-
-void CComm::close()
-{
- CloseHandle( m_hCommPort );
- m_hCommPort = NULL;
-}
-
-
-/////////////////////////////////////////////////////////////////////////////
-// drainInput
-//
-
-void CComm::drainInput()
-{
- int cnt;
- unsigned char c;
-
- do {
- c = readChar( &cnt );
-
- } while ( cnt );
-}
-
-
-/////////////////////////////////////////////////////////////////////////////
-// sendCommand
-//
-
-bool CComm::sendCommand( char * pCmd, char *pResponse, unsigned long timeout )
-{
- bool rv = false;
- DWORD tstart;
- int cnt;
- char buf[256];
- unsigned short pos = 0;
-
- memset( buf, 0, sizeof( buf ) );
-
- drainInput();
- write( pCmd, true, true );
- tstart = GetTickCount();
- while ( ( GetTickCount() - tstart ) < timeout ) {
- buf[ pos ] = readChar ( &cnt );
- if ( cnt ) {
- if ( NULL != strstr( buf, pResponse ) ) return true;
- pos++;
- if ( pos > sizeof( buf ) ) break;
- }
- }
-
- return rv;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// readBuf
-//
-
-unsigned short CComm::readBuf( char *pBuf,
- unsigned short size,
- short cntRead,
- unsigned long timeout )
-{
- char *p = pBuf;
- DWORD tstart;
- int cnt;
- unsigned short pos = 0;
-
- memset( pBuf, 0, size );
- tstart = GetTickCount();
- while ( ( GetTickCount() - tstart ) < timeout ) {
- p[ pos ] = readChar ( &cnt );
- if ( cnt ) {
- if ( ( -1 == cntRead ) && ( 0x0d == p[ pos ] ) ) return true;
- pos++;
- if ( pos > size ) break;
- }
- }
-
- return pos;
-}
\ No newline at end of file
Deleted: trunk/src/common/Comm.h
===================================================================
--- trunk/src/common/Comm.h 2008-04-20 20:51:25 UTC (rev 888)
+++ trunk/src/common/Comm.h 2008-04-24 11:45:41 UTC (rev 889)
@@ -1,190 +0,0 @@
-/*!
- * \file Comm.h
- * \brief interface for the Linux comm class.
- * \author Ake Hedman, eurosource,
- * \author ak...@us...
- * \date 2002-2005
- *
-*/
-
-///////////////////////////////////////////////////////////////////////////////
-// Comm.h
-//
-//
-// This file is part is part of CANAL (CAN Abstraction Layer)
-// http://can.sourceforge.net)
-//
-// Copyright (C) 2000-2008 Ake Hedman, eurosource, <ak...@eu...>
-//
-// This software is placed into
-// the public domain and may be used for any purpose. However, this
-// notice must not be changed or removed and no warranty is either
-// expressed or implied by its publication or distribution.
-//
-// $RCSfile: Comm.h,v $
-// $Date: 2005/08/30 11:00:13 $
-// $Author: akhe $
-// $Revision: 1.3 $
-///////////////////////////////////////////////////////////////////////////////
-
-#if !defined(AFX_COMCOMM_H__E2F5A961_FF34_437B_91E1_8D7DEA1E94C9__INCLUDED_)
-#define AFX_COMCOMM_H__E2F5A961_FF34_437B_91E1_8D7DEA1E94C9__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#define HANDSHAKE_NONE 0
-#define HANDSHAKE_HARDWARE 1
-#define HANDSHAKE_SOFTWARE 2
-
-/*!
- * \class CCommParams
- * \brief This class hat encapsulate communication parameters
- * \brief for a serial communication port.
- * \author Ake Hedman, eurosource, ak...@eu...
- * \version 1
- * \date 2002-2005
- */
-
-class CCommParams
-{
-
-public:
-
- /// The port number to use
- unsigned char m_nPort;
-
- /// The baudrate to use
- DWORD m_nBaudRate;
-
- /// # of stopbits to use
- unsigned char m_nDatabits;
-
- /// Patity to use
- unsigned char m_nParity;
-
- /// # of stopbits to use
- unsigned char m_nStopbits;
-
-};
-
-/*! \class CComm
- * \brief A class that handles serial port communication.
- * \author Ake Hedman, eurosource, ak...@eu...
- * \version 1
- * \date 2002-2005
- */
-
-
-class CComm
-{
-
-public:
-
- /// Constructor
- CComm();
-
- /// Destructor
- virtual ~CComm();
-
- /*!
- Initialise the serial communication port
-
- \param nComPort Index for communication port (default to COM1).
- \param nBaudRate Baudrate for the selected port (defaults to 9600).
- \param nDatabits Number of databits ( defeaults to 8 ).
- \param nParity Parity (defaults to no parity ).
- \param nStopbits Number of stopbits (defaults to one stopbit).
- \return True on success.
- */
- bool init( unsigned char nComPort=1,
- DWORD nBaudRate = CBR_9600,
- unsigned char nDatabits = 8,
- unsigned char nParity= NOPARITY,
- unsigned char nStopbits=ONESTOPBIT,
- unsigned char nHandshake = HANDSHAKE_NONE );
-
- /*!
- Read a byte from the port (if one is available).
-
- \param cnt pointer to variable holding number of characters read.
- \return Character read from comm port depending on param
- */
- char readChar( int* cnt );
-
- /*!
- Read a number of bytes from the port (if available) within a
- certain time.
-
- \param Pointer to buffer that receives data.
- \param Size for buffer.
- \param cntRead nr of character we want or if a negative number return
- when CR is found.
- \return Number of characters read or zero on timeout.
- */
- unsigned short readBuf( char *p,
- unsigned short size,
- short cntRead = -1,
- unsigned long timeout = 500 );
-
- /*!
- Write a string of charcters to the communication port.
-
- @param str String to send.
- @param bCRLF If true a CRLF will be sent after the string has been sent.
- @param bNoLF If true only CR is sent instead of CRLF.
- */
- void write( char *str, bool bCRLF = false, bool bNoLF = false );
-
- /*!
- Write a buffer to the channel
-
- \param p Pointer to buffer that holds data that should be written.
- \param cnt Number of bytes to send.
- \return If the function succeeds, the return value is nonzero.
- \return If the function fails, the return value is zero.
- */
- BOOL writebuf( unsigned char * p, unsigned short cnt );
-
- /*!
- Send a byte to the communication port.
-
- \param b byte to send.
- */
- void writeChar( unsigned char b );
-
- /*!
- Drain the input queue
- */
- void drainInput( void );
-
- /*!
- Close the communication channel.
- */
- void close( void );
-
- /*!
- sendCmd
-
- */
- bool sendCommand( char * pCmd, char *pResponse, unsigned long timeout = 500 );
-
- /*!
- Get the handle to the communication port.
-
- \return handle to an open communication port or NULL if
- \return the port is't open.
- */
- HANDLE getHandle( void ) { return m_hCommPort; };
-
-private :
-
- /*!
- Handle to the communication port
- */
- HANDLE m_hCommPort;
-
-};
-
-#endif // !defined(AFX_COMCOMM_H__E2F5A961_FF34_437B_91E1_8D7DEA1E94C9__INCLUDED_)
Deleted: trunk/src/common/MSG00001.bin
===================================================================
(Binary files differ)
Deleted: trunk/src/common/NTService.cpp
===================================================================
--- trunk/src/common/NTService.cpp 2008-04-20 20:51:25 UTC (rev 888)
+++ trunk/src/common/NTService.cpp 2008-04-24 11:45:41 UTC (rev 889)
@@ -1,683 +0,0 @@
-// NTService.cpp
-//
-// Implementation of CNTService
-
-#ifdef __GNUG__
- //#pragma implementation
-#endif
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#ifdef __WXMSW__
- #include "wx/ownerdrw.h"
-#endif
-
-
-//#include "stdafx.h"
-//#include <windows.h>
-//#include <stdio.h>
-#include "NTService.h"
-
-//
-// Global variables.
-//
-
-HANDLE ghStopEvent;
-HANDLE ghThreads[ MAX_THREADS ];
-
-// static variables
-CNTService* CNTService::m_pThis = NULL;
-
-
-///////////////////////////////////////////////////////////////////////////////
-// CNTService
-//
-
-CNTService::CNTService( const char * szServiceName )
-{
- // copy the address of the current object so we can access it from
- // the static member callback functions.
- // WARNING: This limits the application to only one CNTService object.
- m_pThis = this;
-
- // Set the default service name and version
- strncpy( m_szServiceName, szServiceName, sizeof( m_szServiceName ) - 1 );
- m_iMajorVersion = 0;
- m_iMinorVersion = 1;
- m_hEventSource = NULL;
-
- // No threads running yet
- for (int i=0; i<MAX_THREADS; i++ ) {
- ghThreads[ i ] = NULL;
- }
-
- // set up the initial service status
- m_hServiceStatus = NULL;
- m_Status.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
- m_Status.dwCurrentState = SERVICE_STOPPED;
- m_Status.dwControlsAccepted = SERVICE_ACCEPT_STOP;
- m_Status.dwWin32ExitCode = 0;
- m_Status.dwServiceSpecificExitCode = 0;
- m_Status.dwCheckPoint = 0;
- m_Status.dwWaitHint = 0;
- m_bIsRunning = false;
-
- // Create the event to signal the service to stop.
- ghStopEvent = CreateEvent( NULL, true, false, NULL );
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// ~CNTService
-//
-
-
-CNTService::~CNTService()
-{
- DebugMsg("CNTService::~CNTService()");
- if ( m_hEventSource ) {
- ::DeregisterEventSource( m_hEventSource );
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// ParseStandardArgs
-//
-
-
-BOOL CNTService::ParseStandardArgs(int argc, char* argv[])
-{
- // See if we have any command line args we recognise
- if ( argc <= 1 ) {
- return false;
- }
-
- // * * * -v Check version * * *
- if ( _stricmp(argv[1], "-v") == 0 ) {
- // Spit out version info
- printf("%s Version %d.%d\n",
- m_szServiceName, m_iMajorVersion, m_iMinorVersion);
- printf("The service is %s installed\n",
- IsInstalled() ? "currently" : "not");
- return true; // say we processed the argument
-
- }
- // * * * -i Install * * *
- else if (_stricmp(argv[1], "-i") == 0) {
- // Request to install.
- if ( IsInstalled() ) {
- printf("%s is already installed\n", m_szServiceName);
- }
- else {
- // Try and install the copy that's running
- if ( Install() ) {
- printf("%s installed\n", m_szServiceName);
- }
- else {
- printf("%s failed to install. Error %d\n", m_szServiceName, GetLastError());
- }
- }
-
- return true; // say we processed the argument
-
- }
- // * * * -u Uninstall * * *
- else if ( _stricmp(argv[1], "-u" ) == 0) {
-
- // Request to uninstall.
- if ( !IsInstalled() ) {
- printf("%s is not installed\n", m_szServiceName);
- }
- else {
- // Try and remove the copy that's installed
- if ( Uninstall() ) {
- // Get the executable file path
- char szFilePath[_MAX_PATH];
- ::GetModuleFileName(NULL, szFilePath, sizeof(szFilePath));
- printf("%s removed. (You must delete the file (%s) yourself.)\n",
- m_szServiceName, szFilePath);
- }
- else {
- printf("Could not remove %s. Error %d\n", m_szServiceName, GetLastError());
- }
- }
-
- return true; // say we processed the argument
- }
- // * * * -? Show available commands * * *
- else if ( _stricmp(argv[1], "-?") == 0 ) {
- showHelp();
- return true;
- }
- // * * * -? Show available commands * * *
- else if ( _stricmp(argv[1], "-h") == 0 ) {
- showHelp();
- return true;
- }
-
- // Don't recognise the args
- return false;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// showHelp
-//
-//
-
-void CNTService::showHelp( void )
-{
- printf("\nCanalService - (C) 2001-2005 eurosource\n");
- printf("=======================================\n\n");
- printf("Command line switches.\n");
- printf("----------------------\n");
- printf("\"no switch\"\tStart the service.\n");
- printf(" -i\t\tInstall the service.\n");
- printf(" -u\t\tUninstall the service.\n");
- printf(" -v\t\tDisplay service information.\n");
- printf(" -?\t\tDisplay this help information.\n");
- printf(" -h\t\tDisplay this help information.\n\n\n");
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Install/uninstall routines
-///////////////////////////////////////////////////////////////////////////////
-
-
-///////////////////////////////////////////////////////////////////////////////
-// IsInstalled
-//
-
-BOOL CNTService::IsInstalled()
-{
- BOOL bResult = FALSE;
-
- // Open the Service Control Manager
- SC_HANDLE hSCM = ::OpenSCManager( NULL, // local machine
- NULL, // ServicesActive database
- SC_MANAGER_ALL_ACCESS); // full access
- if ( hSCM ) {
- // Try to open the service
- SC_HANDLE hService = ::OpenService( hSCM,
- m_szServiceName,
- SERVICE_QUERY_CONFIG);
- if ( hService ) {
- bResult = TRUE;
- ::CloseServiceHandle( hService );
- }
-
- ::CloseServiceHandle( hSCM );
- }
-
- return bResult;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// Install
-//
-//
-
-BOOL CNTService::Install()
-{
- // Open the Service Control Manager
- SC_HANDLE hSCM = ::OpenSCManager( NULL, // local machine
- NULL, // ServicesActive database
- SC_MANAGER_ALL_ACCESS); // full access
- if ( !hSCM ) {
- return FALSE;
- }
-
- // Get the executable file path
- char szFilePath[_MAX_PATH];
- ::GetModuleFileName(NULL, szFilePath, sizeof(szFilePath));
-
- // Create the service
- SC_HANDLE hService = ::CreateService( hSCM,
- m_szServiceName,
- m_szServiceName,
- SERVICE_ALL_ACCESS,
- SERVICE_WIN32_OWN_PROCESS,
- SERVICE_DEMAND_START, // start condition
- SERVICE_ERROR_NORMAL,
- szFilePath,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL );
- if ( !hService ) {
- ::CloseServiceHandle(hSCM);
- return FALSE;
- }
-
- // make registry entries to support logging messages
- // Add the source name as a subkey under the Application
- // key in the EventLog service portion of the registry.
- char szKey[256];
- HKEY hKey = NULL;
- strcpy( szKey, "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\" );
- strcat( szKey, m_szServiceName );
- if ( ::RegCreateKey(HKEY_LOCAL_MACHINE, szKey, &hKey) != ERROR_SUCCESS ) {
- ::CloseServiceHandle( hService );
- ::CloseServiceHandle( hSCM );
- return FALSE;
- }
-
- ...
[truncated message content] |
|
From: <ak...@us...> - 2008-04-24 11:50:32
|
Revision: 890
http://can.svn.sourceforge.net/can/?rev=890&view=rev
Author: akhe
Date: 2008-04-24 04:50:25 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
Cleaning up
Removed Paths:
-------------
trunk/canalworks.conf.linux.example
trunk/canalworks.conf.windows.example
trunk/vscp.conf.linux.example
trunk/vscp.conf.windows.example
trunk/vscpd.conf
trunk/vscpd.startup_script_debian
trunk/vscpd.startup_script_fedora
trunk/vscpworks.conf
Deleted: trunk/canalworks.conf.linux.example
===================================================================
--- trunk/canalworks.conf.linux.example 2008-04-24 11:45:41 UTC (rev 889)
+++ trunk/canalworks.conf.linux.example 2008-04-24 11:50:25 UTC (rev 890)
@@ -1,42 +0,0 @@
-#
-# canalworks.conf
-#
-# This is a sample VSCP/canal configuration file for Linux
-#
-
-
-[CANALWORKS]
-
-#
-# Drivers you want to be able to directly open through
-# canalworks should be added here.
-#
-# Note that forward slashes should be used!!!
-# ====================================================
-#
-
-device2="logger,c:/canallog2,d:/winnt/system32/canallogger.dll,64,64,1"
-
-
-#
-# Delete warning
-# ==============
-# If you don't want the warning dialog to be displayed when you delete list
-# contents you should set this value to 0
-bDisplayDeleteWarning=1
-
-
-#
-# Colors
-#
-
-
-#
-# Predefined and saved CAN messages
-#
-
-
-#
-# Predefined and saved VSCP messages
-#
-
Deleted: trunk/canalworks.conf.windows.example
===================================================================
--- trunk/canalworks.conf.windows.example 2008-04-24 11:45:41 UTC (rev 889)
+++ trunk/canalworks.conf.windows.example 2008-04-24 11:50:25 UTC (rev 890)
@@ -1,55 +0,0 @@
-#
-# canalworks.conf
-#
-# This is a sample VSCP/CANAL configuration file for WIN32
-#
-
-
-
-
-[POSITION]
-#
-# Window size and location
-#
-sizeWidth=640
-sizeHeight=480
-
-[DRIVERS]
-#
-# Drivers you want to be able to directly open through
-# canalworks should be added here.
-#
-# Note that forward slashes should be used!!!
-# ====================================================
-#
-#device2="logger,c:/canallog2,d:/winnt/system32/canallogger.dll,64,64,1"
-
-
-[INSTALLED]
-#
-# Installed devices
-#
-
-[OPTIONS]
-#
-# Delete warning
-# ==============
-# If you don't want the warning dialog to be displayed when you delete list
-# contents you should set this value to 0
-bDisplayDeleteWarning=1
-
-
-[COLORS]
-#
-# Colors
-#
-
-[PREDEFINED_CAN]
-#
-# Predefined and saved CAN messages
-#
-
-[PREDEFINED_VSCP]
-#
-# Predefined and saved VSCP messages
-#
Deleted: trunk/vscp.conf.linux.example
===================================================================
--- trunk/vscp.conf.linux.example 2008-04-24 11:45:41 UTC (rev 889)
+++ trunk/vscp.conf.linux.example 2008-04-24 11:50:25 UTC (rev 890)
@@ -1,125 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8" ?>
-
-<!-- Version 0.0.1 2007-09-27 -->
-
-<vscpconfig>
-
- <general>
- <udpport>9598</udpport>
- <tcpport>9598</tcpport>
- <loglevel>debug</loglevel>
- <tcpif disable="false" /> <!-- It is possibel to disable the TCP/IP interface -->
- <udpif disable="false" onlyincoming="false"/> <!-- It is possible to disable the UDP interface -->
- <canaldriver disable="false"/>
- <dm disable="false"/>
- <vscp disable="false"/>
- <guid>00:01:02:03:04:05:06:07:08:09:0A:0B:0C:0D:0E:0F</guid>
- </general>
-
-
-
- <remoteuser> <!-- Holds information about one (at least) or more users -->
- <user>
- <name>admin</name>
- <password>5ebe2294ecd0e0f08eab7690d2a6ee69</password>
- <privilege>admin</privilege>
- <allowfrom>127.0.0.1,192.168.1.6,192.168.1.*</allowfrom>
- </user>
- <user>
- <name>user</name>
- <password>5ebe2294ecd0e0f08eab7690d2a6ee69</password>
- <privilege>admin</privilege>
- <allowfrom>127.0.0.1,192.168.1.6,192.168.1.184</allowfrom>
- </user>
- </remoteuser>
-
-
-
- <interfaces> <!-- Holds information about interfaces on the machine the daemon is run on -->
- <interface>
- <ipaddress>192.168.1.184</ipaddress>
- <macaddress>00:16:D4:5D:68:F6</macaddress>
- <guid>01:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00</guid>
- </interface>
- </interfaces>
-
-
-
-
- <canaldriver> <!-- Information about CANAL drivers -->
-
- <driver>
- <name>logger</name>
- <parameter>/tmp/canallog</parameter>
- <path>/usr/local/lib/canallogger.so</path>
- <flags>1</flags>
- </driver>
-<!--
- <driver>
- <name>communication</name>
- <parameter>/dev/ttyS0</parameter>
- <path>/usr/local/lib/canalcom.so</path>
- <flags>1</flags>
- </driver>
-
- <driver>
- <name>xap</name>
- <parameter>1681;3639</parameter>
- <path>/usr/local/lib/xapdrv.so</path>
- <flags>1</flags>
- </driver>
--->
-
- </canaldriver>
-
-
-
- <persistent> <!-- persistant storage is here -->
-
- <variable type="1" > <!-- string -->
- <name>testvariable1</name>
- <value>This is a string</value>
- </variable>
-
- <variable type="2" > <!-- boolean -->
- <name>testvariable2</name>
- <value>true</value>
- </variable>
-
- <variable type="3" > <!-- integer -->
- <name>testvariable3</name>
- <value>1956</value>
- </variable>
-
- <variable type="4" > <!-- long -->
- <name>testvariable4</name>
- <value>0xffffffff</value>
- </variable>
-
- <variable type="5" > <!-- normalized integer -->
- <name>testvariable5</name>
- <value>0x0001020304050607</value>
- </variable>
-
- <variable type="6" > <!-- VSCP Event -->
- <name>testvariable6</name>
- <value>class=10,type=40,data=0x12,1,2,3,4,5</value>
- </variable>
-
- <array type="1">
- <name>testarray</name>
- <value>10</value>
- <value>11</value>
- <value>22</value>
- <value>33</value>
- <value>144</value>
- <value>1000</value>
- <value>3</value>
- <value>100</value>
- <value>200</value>
- <value>1111</value>
- </array>
-
- </persistent>
-
-</vscpconfig>
\ No newline at end of file
Deleted: trunk/vscp.conf.windows.example
===================================================================
--- trunk/vscp.conf.windows.example 2008-04-24 11:45:41 UTC (rev 889)
+++ trunk/vscp.conf.windows.example 2008-04-24 11:50:25 UTC (rev 890)
@@ -1,103 +0,0 @@
-#
-# vscp.conf
-#
-# This is a sample VSCP/canal configuration file for Linux
-#
-
-#
-# Drivers/plugins to use
-# ======================
-# Add all drivers to use here. Note that forward slashes should be used!!!
-
-#device1 = "communication,com1,canal_comm.dll,64,64,1"
-#device2 = "simulation,sim1,canal_socket.dll,64,64,1"
-device1 = "logger,/canallog.txt,/winnt/system32/canallogger.so,64,64,1"
-
-
-#
-# Pointers to installed XML Description files for CANAL drivers
-# =============================================================
-#
-#xmldrvdescription1="name_of_driver,c:/test.xml"
-
-#
-# GUID
-# ====
-# A custom GUID for the WEb server can be set here. If nit given the Ethernet MAC
-# address of the first found card on the machine will be used.
-#
-# GUID0=255
-# GUID1=255
-# GUID2=255
-# GUID3=255
-# GUID4=255
-# GUID5=255
-# GUID6=255
-# GUID7=255
-# GUID8=255
-# GUID9=255
-# GUID10=255
-# GUID11=255
-# GUID12=255
-# GUID13=255
-# GUID14=255
-# GUID15=255
-
-#
-# UDP Port to use.
-# ================
-# If not defined the default port 1681 is used.
-#
-# UDPPort=6666
-
-
-#
-# TCP Port to use.
-# ================
-# If not defined the default port 1681 is used.
-#
-#TCPPort=9999
-
-
-#
-# Loglevel.
-# =========
-# Set the loglevel where 0 is no logging other then critical stuff and
-# 9 is extensive logging.
-# Default is 0.
-LogLevel=0
-
-#
-# Disable VSCP functionality.
-# ===========================
-# Set to true to diable VSCP functionality. That is UDP/TCP and all Level II interfaces.
-# Default is false.
-#
-#DisableVSCP=true
-
-#
-# Disable Control Interface.
-# ==========================
-# This disables the control interface.
-# Default is to have the interface enabled.
-#DisableControlInterface=true
-
-#
-# Username/Password for TCP interface.
-# ====================================
-# Pasword is MD5 digest.
-# Defaut is both empty meaning no password is used.
-tcpuser="admin"
-tcppassword="5ebe2294ecd0e0f08eab7690d2a6ee69"
-
-#
-# IP Addressed for TCP interfaces. An interface will
-# be opended on each
-#
-# tcpipaddr0=192.168.1.8
-# tcpipaddr1=192.255.1.2
-# tcpipaddr2=192.168.1.112
-#tcpipaddr0=192.168.1.8
-
-
-
Deleted: trunk/vscpd.conf
===================================================================
--- trunk/vscpd.conf 2008-04-24 11:45:41 UTC (rev 889)
+++ trunk/vscpd.conf 2008-04-24 11:50:25 UTC (rev 890)
@@ -1,131 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8" ?>
-
-<!-- Version 0.0.1 2007-09-27 -->
-
-<vscpconfig>
-
- <general>
- <udpport>9598</udpport>
- <tcpport>9598</tcpport>
- <loglevel>debug</loglevel>
- <tcpif disable="false" /> <!-- It is possibel to disable the TCP/IP interface -->
- <udpif disable="false" onlyincoming="false"/> <!-- It is possible to disable the UDP interface -->
- <canaldriver disable="false"/>
- <dm disable="false"/>
- <vscp disable="false"/>
- </general>
-
-
-
- <remoteuser> <!-- Holds information about one (at least) or more users -->
- <user>
- <name>admin</name>
- <password>5ebe2294ecd0e0f08eab7690d2a6ee69</password>
- <privilege>admin</privilege>
- <allowfrom>127.0.0.1,192.168.1.6,192.168.1.184</allowfrom>
- </user>
- <user>
- <name>user</name>
- <password>5ebe2294ecd0e0f08eab7690d2a6ee69</password>
- <privilege>admin</privilege>
- <allowfrom>127.0.0.1,192.168.1.6,192.168.1.184</allowfrom>
- </user>
- </remoteuser>
-
-
-
- <interfaces> <!-- Holds information about interfaces on the machine the daemon is run on -->
- <interface>
- <ipaddress>192.168.1.184</ipaddress>
- <macaddress>00:16:D4:5D:68:F6</macaddress>
- <guid>01:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00</guid>
- </interface>
- </interfaces>
-
-
-
-
- <canaldriver> <!-- Information about CANAL drivers -->
-
- <driver>
- <name>logger</name>
- <parameter>/var/log/canallog</parameter>
- <path>/usr/local/lib/canallogger.so</path>
- <flags>1</flags>
- </driver>
-
- <driver>
- <name>communication</name>
- <parameter>/dev/ttyS0</parameter>
- <path>/usr/local/lib/canalcom.so</path>
- <flags>1</flags>
- </driver>
-
- <driver>
- <name>logger</name>
- <parameter>/var/log/canallog</parameter>
- <path>/usr/local/lib/canallogger.so</path>
- <flags>1</flags>
- </driver>
-
- <driver>
- <name>xap</name>
- <parameter>1681;3639</parameter>
- <path>/usr/local/lib/xapdrv.so</path>
- <flags>1</flags>
- </driver>
-
-
- </canaldriver>
-
-
-
- <persistent> <!-- persistant storage is here -->
-
- <variable type="1" > <!-- string -->
- <name>testvariable1</name>
- <value>This is a string</value>
- </variable>
-
- <variable type="2" > <!-- boolean -->
- <name>testvariable2</name>
- <value>true</value>
- </variable>
-
- <variable type="3" > <!-- integer -->
- <name>testvariable3</name>
- <value>1956</value>
- </variable>
-
- <variable type="4" > <!-- long -->
- <name>testvariable4</name>
- <value>0xffffffff</value>
- </variable>
-
- <variable type="5" > <!-- normalized integer -->
- <name>testvariable5</name>
- <value>0x0001020304050607</value>
- </variable>
-
- <variable type="6" > <!-- VSCP Event -->
- <name>testvariable6</name>
- <value>class=10,type=40,data=0x12,1,2,3,4,5</value>
- </variable>
-
- <array type="1">
- <name>testarray</name>
- <value>10</value>
- <value>11</value>
- <value>22</value>
- <value>33</value>
- <value>144</value>
- <value>1000</value>
- <value>3</value>
- <value>100</value>
- <value>200</value>
- <value>1111</value>
- </array>
-
- </persistent>
-
-</vscpconfig>
\ No newline at end of file
Deleted: trunk/vscpd.startup_script_debian
===================================================================
--- trunk/vscpd.startup_script_debian 2008-04-24 11:45:41 UTC (rev 889)
+++ trunk/vscpd.startup_script_debian 2008-04-24 11:50:25 UTC (rev 890)
@@ -1,39 +0,0 @@
-#!/bin/sh
-# /etc/init.d/vscp
-#
-# Written by Ake Hedman <ak...@eu...>
-
-set -e
-
-
-DAEMON=/usr/local/bin/vscpd
-NAME=vscpd
-
-test -x $DAEMON || exit 0
-. /lib/lsb/init-functions
-
-case "$1" in
- start)
- log_begin_msg "Starting VSCP daemon: $NAME"
- [ -d /var/run/vscpd ] || mkdir -p /var/run/vscpd
- start-stop-daemon --start --background -m --pidfile /var/run/vscpd/vscpd.pid --exec $DAEMON && log_end_msg 0 || log_end_msg 1
- ;;
- stop)
- log_begin_msg "Stopping VSCP daemon: $NAME"
- start-stop-daemon --stop --pidfile /var/run/vscpd/vscpd.pid --oknodo --exec $DAEMON && log_end_msg 0 || log_end_msg 1
- ;;
- restart)
- $0 stop
- $0 start
- ;;
- reload|force-reload)
- log_begin_msg "Reloading $NAME configuration files"
- start-stop-daemon --stop --pidfile /var/run/vscpd/vscpd.pid --signal 1 --exec $DAEMON && log_end_msg 0 || log_end_msg 1
- ;;
- *)
- log_success_msg "Usage: /etc/init.d/$NAME {start|stop|restart|reload}"
- exit 1
- ;;
-esac
-
-exit 0
Deleted: trunk/vscpd.startup_script_fedora
===================================================================
--- trunk/vscpd.startup_script_fedora 2008-04-24 11:45:41 UTC (rev 889)
+++ trunk/vscpd.startup_script_fedora 2008-04-24 11:50:25 UTC (rev 890)
@@ -1,80 +0,0 @@
-#!/bin/bash
-#
-# vscpd This shell script takes care of starting and stopping
-# standalone vscpd.
-#
-# chkconfig: - 60 50
-# description: Vscpd is an automation daemon, which is the program \
-# that handles controldrivers and clients.
-# processname: vsftpd
-# config: /etc/vscp/vscp.conf or /etc/vscp.conf
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-[ -x /usr/local/bin/vscpd ] || exit 0
-
-RETVAL=0
-prog="vscpd"
-
-start() {
- # Start daemons.
-
- if [ -d /etc/vscp ] ; then
- for i in `ls /etc/vscp/*.conf`; do
- site=`basename $i .conf`
- echo -n $"Starting $prog for $site: "
- /usr/local/bin/vscpd $i &
- RETVAL=$?
- [ $RETVAL -eq 0 ] && {
- touch /var/lock/subsys/$prog
- success $"$prog $site"
- }
- echo
- done
- else
- RETVAL=1
- fi
- return $RETVAL
-}
-
-stop() {
- # Stop daemons.
- echo -n $"Shutting down $prog: "
- killproc $prog
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
- return $RETVAL
-}
-
-# See how we were called.
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart|reload)
- stop
- start
- RETVAL=$?
- ;;
- condrestart)
- if [ -f /var/lock/subsys/$prog ]; then
- stop
- start
- RETVAL=$?
- fi
- ;;
- status)
- status $prog
- RETVAL=$?
- ;;
- *)
- echo $"Usage: $0 {start|stop|restart|condrestart|status}"
- exit 1
-esac
-
-exit $RETVAL
Deleted: trunk/vscpworks.conf
===================================================================
--- trunk/vscpworks.conf 2008-04-24 11:45:41 UTC (rev 889)
+++ trunk/vscpworks.conf 2008-04-24 11:50:25 UTC (rev 890)
@@ -1,13 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8" ?>
-<vscpworksconfig>
-<general>
-<width>0</width>
-<height>0</height>
-<xpos>0</xpos>
-<ypos>0</ypos>
-<path2tempfile>/</path2tempfile>
-<path2logfile enable="false" level="0" ></path2logfile>
-</general>
-<vscpinterface>
-</vscpinterface>
-</vscpworksconfig>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|