Commit Graph

284 Commits

Author SHA1 Message Date
skarg 2a0bf4926a Performed standard indent script indent.sh on project files. 2010-12-15 19:02:40 +00:00
skarg 706e0221b6 Changed the client functions to be defined only when BBMD_CLIENT_ENABLED=1, which cleaned up the warnings. 2010-12-15 18:51:03 +00:00
skarg 8f1e8d82cd Changed Object Table from a global to a local variable and added a Device function to initialize it. 2010-12-13 03:41:55 +00:00
petermcs 6cec4b3cdb Adding in missing extern "c" so it works when called from C++ 2010-12-11 15:09:35 +00:00
tbrennan3 31f440e070 Implemented separate Who-Is and Who-Has handlers for the routed case, where we loop through all the Devices looking for matches.
Tested and improved the routing code.
Gateway demo now sends I-Am as each Device is added.
Added test for valid Network number when routing, and only send Reject message if this fails (and not if we just can't find a Device match).
Test the hop_count and discard the packet if would reach 0 and a destination Network is called for.
2010-12-02 20:33:43 +00:00
skarg e850469da8 Added character string helper to test for printable. Added to WP checks. 2010-12-02 19:33:22 +00:00
bacpack 47ecaeabaa To build the Routing demo define BAC_ROUTING in the top Makefile. The value is not important - the symbol has to be defined. 2010-11-25 05:10:01 +00:00
bacpack 6a523e4d23 First attempt to clean-up Makefiles.
1. Top (main) makefile defines build configuration variables and export them for sub-makes to use. BAC_ROUTING is defined here - is has been removed from config.h.
2. A new makefile has been added in demo subdirectory. It builds the demo applications. NOTE: the 'ports' target is not build.
2010-11-25 04:17:58 +00:00
tbrennan3 22c14fccad Followed Steve's good recommendation, and made routed_get_my_address() be a variant of datalink_get_my_address() just when routing is in use. Haven't done anything about the sending functions yet.
Renamed Lookup_Routed_Device_Address() as Routed_Device_Address_Lookup(), and replaced it in the routed npdu handler with a function that finds the "next" gateway or routed device, as per the destination address.  (Less tied to the specifics of the gw_device.c implementation.)
Fixed a few build warnings (eg, %zu for size_t arguments).
Until we improve the makefile system, I've enabled BAC_ROUTING in config.h
2010-11-24 20:44:32 +00:00
petermcs c69ffaa4a5 Default BAC_ROUTING to 0 if not currently defined to maintain non routing behaviour. 2010-11-18 22:20:32 +00:00
petermcs 4a137eb8df Added Get_Routed_Device_Address prototype 2010-11-17 23:12:54 +00:00
bacpack 9413ec4da2 Small reediting. 2010-11-13 20:31:37 +00:00
bacpack 502cbcc2e6 1. In device.c, the Object_Table[] is now extern; it has to be defined by the user application (see demos); only the required BACnet objects have to be included.
2. Objects' .h files define macro to be used to initialize Object_Table[].
2010-11-13 19:57:29 +00:00
bacpack d50eb7fef7 In bvlc.c, IP address and port number are always in the network byte order (including FD_Table[] and BBMD_Table[]).
The only left hton and ntoh functions are in debug_printf() and test functions.
2010-11-05 19:30:20 +00:00
bacpack a639864cc8 In bip.c getter and setter functions of IP address and Port number expect and return values in the network byte order. All ntoh and hton were eliminated from bip.c.
All other modules changed to be consistent.
arm7 port left unchanged.
2010-11-04 13:30:26 +00:00
tbrennan3 a5f24fa19f Tweaked the comments for better Doxygen output. 2010-10-13 19:00:57 +00:00
tbrennan3 48411b8dbf Routing functionality complete, and working. (Have not done extensive testing, though.)
For building, made it possible to include or exclude the routing functionality with simple changes in the main Makefile and enables in lib/Makefile and include/config.h
The Device object (device.c and .h) was extended to support the virtually routed Devices, with most of the new functions in new file gw_device.c to replace their simpler cousins in device.c.
2010-10-13 15:59:39 +00:00
skarg f934f8add8 Changed bacapp data len function to just decode the len without regard to the storage ability of the internal data structures. 2010-10-13 02:29:55 +00:00
tbrennan3 9058fc7f3a Finished up the Network Layer Message handling (I hope).
Simplified the Router Table encoding (just based on DNETs).
2010-10-08 02:50:14 +00:00
tbrennan3 9efd3465cf Adding more support for Network Layer Message handling. 2010-10-07 20:56:09 +00:00
tbrennan3 9f4b8e5f19 Adding a handler for routed NPDUs (ie, Network Layer Message handling).
The work is not complete yet; this is an interim checkin.
2010-09-29 20:52:51 +00:00
tbrennan3 d39d4fded3 More function documentation.
Defined a default Hop Count value, and used 15 instead of 255.
2010-09-29 20:29:12 +00:00
tbrennan3 44b7e02721 Tweaked the debug building and printing a little - I hope this works OK for everyone. Let me know if not.
Tamped down a few warnings.
For the demo/server Makefile, made an either/or choice between executable size optimization (normal) or gdb debug info and no optimization.
2010-09-27 20:27:29 +00:00
skarg b1c9870989 Refactoring some BDK code. Updating Skip Data state for AT91 port. 2010-09-22 01:13:42 +00:00
skarg 9569f2c536 Fixed EOL and performed standard indentation. 2010-09-16 22:00:47 +00:00
skarg 7e7b83a6be Added export for MS/TP Sole Master. 2010-09-13 18:44:42 +00:00
skarg bb0c98a9c1 added MS/TP state skip data to MS/TP capture tool, and removed Lurking. 2010-09-12 16:08:31 +00:00
skarg 9e13bd0ebb converted COV to use new error, reject, abort method. 2010-09-11 19:24:20 +00:00
skarg 50a8a3f2fb Changed some plumbing for printing values to handle the case of a Present-Value enumerated property from a proprietary object type. 2010-09-02 13:16:27 +00:00
tbrennan3 c9fd7c9c19 Corrected the set of Properties, and their associated text, per the final Addendum j. 2010-08-29 01:53:05 +00:00
tbrennan3 2f7a8224aa comment.sh did some strange compactions when there was a sequence of two comment blocks.
Restoring to tidiness here, for Doxygen's sake.
2010-08-20 16:33:54 +00:00
skarg f462e5d023 Updated prototypes and include as required and found by compile with extra checking. 2010-08-18 17:57:40 +00:00
skarg b769dcbe1d Indented. 2010-08-18 00:11:35 +00:00
skarg 1165f94cf5 Converted comments to C comments. 2010-08-18 00:10:12 +00:00
skarg a23d75689d Correcting prototypes and includes. 2010-08-18 00:01:32 +00:00
skarg 3c9c3c2d56 Updated prototypes and include as required and found by compile with extra checking. Thanks to Nigel Jones for his "setting a bad example" article. 2010-08-17 19:43:59 +00:00
skarg b6f95a6b81 Updated prototypes and include as required and found by compile with extra checking. 2010-08-17 18:02:18 +00:00
skarg 2f5c95b7a3 Added additional WhoIs for network device discovery. Thanks, David Campfield! 2010-08-17 14:03:52 +00:00
skarg 748c77dc93 Adding prototypes and include files where required. 2010-08-17 13:58:30 +00:00
skarg bc0de6b71f Cleaning up code by adding prototypes or include files where required. 2010-08-17 13:51:56 +00:00
skarg 50a6c60dff Added helper function. 2010-08-06 22:40:12 +00:00
skarg e268569c5c Moved some constants from MS/TP source file to common header. 2010-08-06 22:01:48 +00:00
skarg a194a7b585 Updated version for next release. 2010-07-27 11:12:44 +00:00
skarg 6c9ef7211d Fixed indent script, and indented files. 2010-07-19 23:19:54 +00:00
skarg f465fdb6f3 Updated version number. 2010-07-06 20:10:23 +00:00
skarg 0a468dbb5a Added recurring foreign device registration for server demo. 2010-07-02 12:20:51 +00:00
tbrennan3 79436d1ae0 Eliminate the build error in bacepics when PRINT_ENABLED = 0.
Still lots of warnings in bacepics, but I don't see an issue with that, for an application whose whole point is to print output.
2010-06-18 20:40:43 +00:00
skarg 987e28d515 Modified the ReadProperty, ReadPropertyMultiple, and WriteProperty demo applications to check source address and invoke ID on the returning acknowledge to prevent printing responses not intended for this client. 2010-06-15 14:58:27 +00:00
petermcs 7b77fe776a Refactored rpm decoding to return proper reject/abort status for malformed requests.
Note: the test code in rpm.c has been changed to accommodate the changes made to the decoding functions but I have not tested the test code as I have not run the test suite.
2010-06-10 11:31:53 +00:00
petermcs 61bb34d726 2nd pass at changing the error/reject/abort status reporting to improve BTL test compliance. ReadProperty fully done for core and demo objects. Will tackle other services next. 2010-06-07 15:52:33 +00:00