Commit Graph

237 Commits

Author SHA1 Message Date
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
tbrennan3 a595bdb4b5 Resolved more code where we didn't need to define separate BAC_ROUTING functionality, since the npdu_encode_pdu() will do the right thing if our source address is for the gateway (root device), because src->net and/or src->len will be 0.
For the important Device_Object_Instance_Number(), will redirect to the Routed_Device_Object_Instance_Number() function if this is a routing build.
This leaves only the Who-Is and Who-Has handlers to be dealt with.
2010-11-24 22:04:02 +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
bacpack db5dea31e7 Compiler fails - missing declaration of Get_Routed_Device_Address(). 2010-11-21 17:03:04 +00:00
petermcs dbb8997b4d Added routing support for virtual network to more of the handlers and fixed up a couple of typos from the previous changes.
Added ReadRange service handler so that trendlogs can be read.
2010-11-18 21:29:11 +00:00
petermcs 3bb228edf2 Added routing support for virtual network so that source addresses are transmitted when required and the correct object ID is used. 2010-11-17 23:16:24 +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
skarg 2cac9ba528 Corrected printing of array properties. 2010-10-21 20:14:07 +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 86dbaf409b Added handling for bacapp decode value returning error codes. 2010-10-12 03:02:05 +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 478d7aeb41 Working out the sending of Network Layer Messages; trying to refactor the actual sending routines to just one since the beginning, end, and error handling are the same for all types - just the payload is different.
For many, need to know what our managed downstream BACnet Network list is, so added that argument.
2010-10-07 21:00:46 +00:00
skarg 23eecbc100 Added more informative error message. 2010-10-06 18:49:52 +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 e5f5dce995 Added some javadoc-type function comments.
Reduced the default hop count from way-big 255 to 15.
2010-09-28 21:05:38 +00:00
skarg 9569f2c536 Fixed EOL and performed standard indentation. 2010-09-16 22:00:47 +00:00
skarg c8f4aac1b7 Cleaning up some code to make it more robust. 2010-09-16 14:49:33 +00:00
skarg 9e13bd0ebb converted COV to use new error, reject, abort method. 2010-09-11 19:24:20 +00:00
skarg 914a063681 removed kludge by adding initializer 2010-09-11 19:23:08 +00:00
skarg a74e282f93 Updated some documentation about Environment Variables. 2010-09-10 18:27:58 +00:00
skarg 7928d7cb6c Fixed compiler error (after adding a change for IAR compile). 2010-09-07 18:18:30 +00:00
skarg 4105d22b4b Fixing compiler warnings (compiled with IAR and configured for no printing) 2010-09-07 16:16:15 +00:00
cneilson 3f3af6a072 Moved variable definitions to top of functions (variables can, only be defined partway thru in C++ not C) 2010-09-03 16:48:24 +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
brayra 81bc038abd Change Network Layer message to print to stderr 2010-08-27 22:00:46 +00:00
skarg b769dcbe1d Indented. 2010-08-18 00:11:35 +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 2f5c95b7a3 Added additional WhoIs for network device discovery. Thanks, David Campfield! 2010-08-17 14:03:52 +00:00
skarg 83a3f08dad Fixed compiler warnings. 2010-08-06 22:21:29 +00:00
skarg 6c9ef7211d Fixed indent script, and indented files. 2010-07-19 23:19:54 +00:00
skarg e5481b4bb5 Fixed error code when array option is passed to special properties ALL, OPTIONAL, REQUIRED. 2010-07-16 14:48:52 +00:00
skarg 7852309f7e Added error code when array option is passed to special properties ALL, OPTIONAL, REQUIRED. 2010-07-16 14:34:15 +00:00
skarg 0a468dbb5a Added recurring foreign device registration for server demo. 2010-07-02 12:20:51 +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 404eaa01d0 Removed spurious #define TEST and fixed up a couple of printfs. 2010-06-10 21:20:47 +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
petermcs f32e7bf1c0 Changes to error checking to report invalid requests via proper reject codes and not the blanket abort which was in place (will need to look at other service request decoders as well...) Should address question raised by Jérémy Delhomme. 2010-06-03 11:20:37 +00:00
skarg d95863d89c Corrected epics demo handling of proprietary properties. 2010-05-21 14:25:39 +00:00
skarg 0263f9dce8 Corrected const char for WhoHas/I-Have (bug ID: 3002190). Thank you, Jim Bell! 2010-05-15 22:16:59 +00:00
tbrennan3 1526557b54 Added arguments to bacepics which let you specify a source port to use (besides 0xBAC0) and a target MAC to use.
Combining these lets you run bacepics against the localhost's Device at port 0xBAC0.
One small change in dlenv_init() to support this (don't force source port to 0xBAC0 if that's not what we want).
2010-05-14 19:09:53 +00:00
petermcs 04e99f3671 Changes to reduce the number of warnings with Visual C++2008 warning level 4 to a minimum. 2010-05-14 14:21:48 +00:00
skarg 710cfccfef Indented using indent script. 2010-05-04 21:06:26 +00:00
skarg e261490f61 Corrected compiler warning. 2010-04-28 17:34:49 +00:00
brayra 37d048310c Added ability to set starting invoke id from environment variable BACNET_INVOKE_ID 2010-04-27 15:11:58 +00:00
tbrennan3 040e6ed286 Make sure RPM handler aborts if Device_Read_Property() returns -2 (because the current property by itself won't fit in the APDU). 2010-04-23 18:40:09 +00:00