diff --git a/docs/source/cwms-interface.rst b/docs/source/cwms-interface.rst index f5a106483..e8de31f52 100644 --- a/docs/source/cwms-interface.rst +++ b/docs/source/cwms-interface.rst @@ -46,8 +46,8 @@ LRGS and DECODES Usage by USACE `Figure 2-1 <#anchor-2>`__ shows data-flow for hydro-met data collection by a typical Corps office: -- The LRGS receives data from a satellite link (DOMSAT, NOAAPORT, DRGS, - Internet, LRIT, etc.) +- The LRGS receives data from a satellite link (NOAAPORT, DRGS, + Internet, HRIT, etc.) - DECODES is a client application that pulls raw data from the LRGS and decodes it into engineering units. Many districts run DECODES on the same machine as the LRGS, but as shown, it does not need to be done diff --git a/docs/source/decoding-guide.rst b/docs/source/decoding-guide.rst index dc58f3df2..1266a8390 100644 --- a/docs/source/decoding-guide.rst +++ b/docs/source/decoding-guide.rst @@ -846,7 +846,7 @@ Transport Media Transport Media define how the data from this platform is retrieved. The data may need to be decoded differently depending on whether it was -received over DOMSAT, DRGS, or EDL file, even though it came from the +received over HRIT, DRGS, or EDL file, even though it came from the same platform. The example shown shows two transport media for GOES-Self-Timed on @@ -940,7 +940,7 @@ As it is executing, the script keeps track of three things: - The current position within the message data -The message header (e.g. 37-byte DOMSAT header) is not processed by the +The message header (e.g. GOES header, first row of CSV, etc) is not processed by the script. The data pointer is initialized to the first actual message byte. diff --git a/docs/source/lrgs-userguide.rst b/docs/source/lrgs-userguide.rst index 09f38ed6f..c47c839a1 100644 --- a/docs/source/lrgs-userguide.rst +++ b/docs/source/lrgs-userguide.rst @@ -73,8 +73,8 @@ data in real-time. The LRGS provides local storage of raw DCP data limited only by your disk capacity. With the LRGS you can receive and archive data from any combinations of -input interfaces: DOMSAT, LRIT (DAMS-NT), GOES-DRGS, Internet-DDS, or -NOAAPORT. Platform messages are merged according to a user-settable +input interfaces: HRIT (DAMS-NT), GOES-DRGS, Internet-DDS, or +NOAAPORT, HRIT Files, custom. Platform messages are merged according to a user-settable priority scheme for ultra-reliable data collection. The LRGS provides the de-facto standard DDS (DCP Data Service) for @@ -82,10 +82,8 @@ distributing raw data to your processing applications. Your data-processing applications can run on the same machine as the LRGS, or over the network. -The latest release of the LRGS is written in almost 100% Java. (The only -‘native’ code is a small amount of driver code for the high-speed DOMSAT -serial card.) Consequently, the LRGS will run on any modern computing -platform (Linux, Macintosh, Windows, Solaris, AIX). +The LRGS is written in 100% Java. Consequently, the LRGS will run on any modern computing +platform such as Linux, Macintosh, Windows, Solaris, AIX, and running on various architectures. The NOAA/NESDIS Data Collection System -------------------------------------- @@ -118,12 +116,6 @@ all GOES RF channels for incoming DCP messages. DAPS can support the receipt and archival of messages from up to 100,000 platforms, redistributing them to up to 5,000 users. -DAPS supports the distribution of DCP messages to the user-organizations -via a domestic communications satellite (DOMSAT). DAPS continuously -broadcasts all incom­ing DCP messages over DOMSAT using a single -high-speed channel. Thus for a fraction of the cost of a DRGS, users can -receive the entire DCS data stream via DOMSAT. - NOAA also supports the direct transmission of DCP data to users via internet. This uses a TCP socket protocol called DDS (DCP Data Service). DDS allows users to specify data of interest by DCP address, channel, or @@ -131,13 +123,13 @@ time range. Users can retrieve historical data or a real-time stream. Figure 2‑1: GOES DCS Overview. -In 2004, NOAA started a new service called LRIT (Low Rate Information +In 2004, NOAA started a new service called HRIT (High Rate Information Transfer). This service combines low resolution WEFAX images and all DCS data. It operates on a separate frequency on both GOES East and West Satellites. -Finally, the NOAAPORT data stream is similar to DOMSAT in that it -operates on a separate domestic satellite. It differs from DOMSAT in the +Finally, the NOAAPORT data stream is similar to the old DOMSAT (no longer supported ) +in that it operates on a separate domestic satellite. It differs from DOMSAT in the following ways: - NOAAPORT contains imagery data, weather bulletins and other products, @@ -145,7 +137,8 @@ following ways: - Only DCP messages processed by the National Weather Service are transmitted over NOAAPORT. - There can be a several minute delay in retrieving DCP data via - NOAAPORT. DOMSAT is almost instantaneous. + NOAAPORT. DOMSAT was almost instantaneous. + The Role of the LRGS -------------------- @@ -305,7 +298,7 @@ internal schedule. NOAA assigns time-slices and GOES channel numbers. channel. Since there is a possibility of collision, the DCP will typically send 3 copies of the message at random time intervals. 2. Retransmitted DCP messages: If you are receiving data from one of the - DAPS-rebroadcasts (DOMSAT, NOAAPORT, LRIT, DDS) you may see + DAPS-rebroadcasts (NOAAPORT, HRIT, DDS) you may see historical messages. These are sent from time to time in response to a user’s request. @@ -319,33 +312,14 @@ on ‘Failure Code’ for a list of possible codes. The DOMSAT Re-Broadcast ----------------------- -NOAA provides a re-broadcast of all DCS data over a domestic -communications satellite (DOMSAT). The service has moved to different -satellites since its inception in 1991. Currently it uses the SES-1 -Satellite, with a downlink frequency of 11,997.525 MHz. As shown in -`Figure 2-3 <#anchor-21>`__, the service is roughly aimed at the -continental United States. However it can be received in the outlying -areas with larger antennas. - -More information can be found on the web at: - -http://www.ses-americom.com/satellites/amc-4.html - -.. image:: ./media/lrgs-userguide/Pictures/10000000000002040000018183CEAE52.jpg - :width: 5.5138in - :height: 2.6252in +The DOMSAT re-broadcast is no longer supported by NOAA. For a similar capability +use either an HRIT system or NOAA port. -Figure 2‑3: DOMSAT (AMC-4) Footprint and Frequency Plan - -`Figure 2-4 <#anchor-22>`__ depicts hardware components necessary for -DOMSAT. The antenna collects the Ku-band DOMSAT signal and directs it to -the LNB at the antenna focus. The LNB down-converts the signal to L-band -and transmits it via coaxial cable to a receiver. The receiver -demodulates the signal and sends synchronous X.25 blocks to a high-speed -serial board in the PC. The LRGS software decodes the X.25 packets and -constructs complete DOMSAT messages. - -Figure 2‑4: DOMSAT Hardware Components. +While the DOMSAT system is no longer supported, some of the mechanisms present from it, +such as the "DOMSAT Header" still permeate the software. You may seen references to such a +header or various elements. These generally apply generically to various connections such as DRGS +and HRIT in some way. Consider this while reading the documentation as we are still cleaning up the text + and variable naming. LRGS Software Overview ====================== @@ -365,10 +339,6 @@ Major modules include: corresponding index files. By default, a system is configured to store 30 days worth of data. This can be increased, limited only by available disk capacity. -- The DOMSAT Receive Module handles data reception from DOMSAT using - special purpose HDLC hardware. This is the only LRGS module that is - not 100% Java because it contains a small amount of C-Language code - to interface with the hardware drivers. - The DRGS Receive Module handles data reception from any number of DAMS-NT connections. You can mix and match demodulator systems from different vendors as long as they support DAMS-NT. @@ -692,50 +662,6 @@ beginning of the line. | | | | local DDS | | | | | | users | | +--------------+--------------+--------------+--------------+--------+ -| domsatClass | Class Name | lrgs.\ | Class name | No | -| | | domsatrecv.D | for the | | -| | | omsatSangoma | hardware | | -| | | | interface. | | -| | | | DOMSAT also | | -| | | | supports the | | -| | | | old Franklin | | -| | | | ICP188 card | | -| | | | by setting | | -| | | | this to | | -| | | | lrgs.d | | -| | | | omsatrecv.Do | | -| | | | msatFranklin | | -+--------------+--------------+--------------+--------------+--------+ -| d\ | # seconds | 60 | Number of | Yes | -| omsatTimeout | | | seconds | | -| | | | after which | | -| | | | a timeout is | | -| | | | declared if | | -| | | | there is no | | -| | | | activity on | | -| | | | the DOMSAT | | -| | | | link. | | -+--------------+--------------+--------------+--------------+--------+ -| dpcHost | Host or IP | none | If you | No | -| | Addr | | receive data | | -| | | | from a | | -| | | | DOMSAT | | -| | | | Protocol | | -| | | | Converter, | | -| | | | enter the | | -| | | | host name | | -| | | | here | | -+--------------+--------------+--------------+--------------+--------+ -| dpcPort | Integer | 9000 | If you | No | -| | | | receive data | | -| | | | from a | | -| | | | DOMSAT | | -| | | | Protocol | | -| | | | Converter, | | -| | | | enter the | | -| | | | port number | | -| | | | here | | -+--------------+--------------+--------------+--------------+--------+ | doP\ | Boolean | false | Set to true | No. | | dtValidation | | | to have this | | | | | | local LRGS | | @@ -890,11 +816,6 @@ beginning of the line. | | | | LRGS | | | | | | systems. | | +--------------+--------------+--------------+--------------+--------+ -| enab\ | true/false | False | Set to true | Yes | -| leDomsatRecv | | | if you have | | -| | | | a DOMSAT | | -| | | | interface. | | -+--------------+--------------+--------------+--------------+--------+ | en\ | true/false | False | Set to true | Yes | | ableDrgsRecv | | | to enable | | | | | | reception of | | @@ -954,11 +875,6 @@ beginning of the line. | | | | network | | | | | | lists. | | +--------------+--------------+--------------+--------------+--------+ -| loadDomsat | Boolean | True | Loads the | No | -| | | | DOMSAT | | -| | | | native | | -| | | | interface. | | -+--------------+--------------+--------------+--------------+--------+ | lo\ | Boolean | false | Set to true | No | | calAdminOnly | | | if this LRGS | | | | | | synchronizes | | @@ -1059,7 +975,7 @@ beginning of the line. | | | | specify 3 | | | | | | DRGS | | | | | | connections, | | -| | | | DOMSAT, and | | +| | | | HRIT, and | | | | | | 4 DDS | | | | | | Receive | | | | | | Connections, | | @@ -1084,8 +1000,7 @@ beginning of the line. | | | | be one of | | | | | | “DDS”, | | | | | | “DRGS”, | | -| | | | “LRIT”, | | -| | | | “DOMSAT”, or | | +| | | | “LRIT”, or | | | | | | “NOAAPORT”. | | +--------------+--------------+--------------+--------------+--------+ | mergePref2 | Name | None | Specifies | No | @@ -1443,7 +1358,6 @@ operated by NOAA/NESDIS. Note the hierarchical nature of the file. true ilex false - true CDADATA @@ -1451,7 +1365,6 @@ operated by NOAA/NESDIS. Note the hierarchical nature of the file. true ilex false - false @@ -1480,11 +1393,6 @@ File: secure hash-password method. In order to use this, add an entry in your password file (see above). You do not need to specify a roles since you are using this entry to access external systems only. -- The “hasDomsatSeqNums” element defaults to false. If your system is a - DOMSAT system and you want to recover DOMSAT Transient Sequence - Number Outages, then you need to tell the DDS Recv module which - connections have DOMSAT sequence numbers, by setting this value to - true. - The “timeout” element specifies the number of seconds, after which, if no messages have been received from the server, that we will hang-up from this server and try the next one. @@ -1761,17 +1669,17 @@ or FAILURE alarm with a positive event number when an alarm condition is asserted. Later when the alarm condition has been rectified, an INFO alarm is generated with the corresponding negative number. -For example, if the DOMSAT Hardware times-out – meaning that no data has +For example, if the HRIT Hardware times-out – meaning that no data has been seen in more than 60 seconds, you will see an alarm with even number 5, that looks like this: -WARNING YYYY-MM-DD/HH:MM:SS DomsatRecv:5 No data in more than 60 -seconds. + WARNING YYYY-MM-DD/HH:MM:SS LritRecv:3 No data in more than 60 + seconds. Later, suppose that data starts flowing again. You will see an alarm with the number -5: -INFO YYYY-MM-DD/HH:MM:SS DomsatRecv:-5 DOMSAT Link Recovered. + INFO YYYY-MM-DD/HH:MM:SS LritRecv:3 Lrit Link Recovered. You could associate different commands with events 5 and -5. @@ -1781,18 +1689,6 @@ numbers, along with an explanation of each alarm. +------------+-----------+-------------------------------------------+ | Module | Event Num | Meaning | +------------+-----------+-------------------------------------------+ -| DomsatRecv | 1 | DOMSAT Hardware Initialization Failed. | -| | | This is a non-recoverable alarm. It | -| | | typically means that the DOMSAT hardware | -| | | interface is not working or the driver is | -| | | incorrectly installed. | -+------------+-----------+-------------------------------------------+ -| DomsatRecv | 5 | DOMSAT Link Timeout. No data seen in more | -| | | than 60 seconds. | -+------------+-----------+-------------------------------------------+ -| DomsatRecv | -5 | DOMSAT Link Recovery – cancels the | -| | | timeout event. | -+------------+-----------+-------------------------------------------+ | DrgsRecv | 1 | Connection to a DRGS server failed. This | | | | can be due to the server not running, the | | | | configuration has the wrong port number, | @@ -1866,7 +1762,6 @@ the message priority. This will be one of the following: - INFO – Normal processing, not an error. - WARNING – abnormal but recoverable condition - FAILURE – a requested operation could not be performed - - FATAL – a fatal error occurred in an LRGS process (the process subsequently aborted). @@ -1884,7 +1779,7 @@ event. On Linux or Unix systems, a good way to view the log file in real-time is with the command: -tail –f lrgslog + tail –f lrgslog Log File Rotation ~~~~~~~~~~~~~~~~~ @@ -2256,7 +2151,7 @@ The display shows the following columns: - **LRGS Status**: “OK” means that the system is receiving current data from one of its interfaces. - **Primary Downlink Status**: States the name of the primary downlink - (e.g. DOMSAT or DRGS) and the status on that link. + (e.g. HRIT or DRGS) and the status on that link. - **Primary Quality Last Hour**: This is a measure of good vs. parity error messages. - **Aggregate Quality Last Hour**: This is also a measure of good vs. @@ -2653,7 +2548,7 @@ string value. Here are the available keywords: spacecraft identifier (‘E’ or ‘W’) is not necessary. **SOURCE** Specifies that the client only wants to retrieve data that - was received from the named source. Possible arguments are DOMSAT, + was received from the named source. Possible arguments are NETBACK, DRGS, NOAAPORT, LRIT, or OTHER. For multiple sources, put multiple lines starting with ‘SOURCE:’, each with a single argument. @@ -2981,8 +2876,8 @@ A. Glossary DAPS DCS Automated Processing System – This is a large computer system operated by NESDIS in Wallops, VA. A primary function is to - receive data from all platforms and rebroadcast via DOMSAT and an NMC - X.25 link. NESDIS has plans to renovate DAPS in the near future. + receive data from all platforms and rebroadcast via HRIT. + NESDIS has plans to renovate DAPS in the near future. @@ -2991,16 +2886,7 @@ A. Glossary and have a vested interest in environmental monitoring via GOES. DECODES DEvice COnversion and DElivery System – This is a legacy - software package developed by USGS/WRD. - - DOMSAT Domestic Satellite – This is used as a high-speed broadcast of - data from all platforms in the DCS. - - DROT DOMSAT Receive Only Terminal – Public domain prototype system - developed for NOAA/NESDIS. - - DRS DOMSAT Receive Station – This is a proprietary system for - receiving DOMSAT data. Also see LRGS + software package developed by USGS/WRD. EMIT Environmental Message Interpreter Translator – A proprietary software package in wide use within USACE. @@ -3026,7 +2912,7 @@ A. Glossary enabling you to run Java programs. LRGS Local Readout Ground Station – This is a freely available, - open-source system for receiving environmental data via DOMSAT. + open-source system for receiving environmental data via DAMS-NT protocol, HRIT, and other methods. NESDIS National Environmental Satellite Data Information Service – This is the division of NOAA that operates the GOES spacecraft and diff --git a/docs/source/routesched-guide.rst b/docs/source/routesched-guide.rst index fa0f595db..751024f67 100644 --- a/docs/source/routesched-guide.rst +++ b/docs/source/routesched-guide.rst @@ -508,7 +508,7 @@ Socket Stream Data Source ------------------------- A socket stream data source opens a socket and reads a one-way stream of -data containing raw DCP messages. Some DRGS and DOMSAT product provide +data containing raw DCP messages. Some DRGS and HRIT product provide such a stream. Accepted properties for SocketStreamDataSource are: @@ -551,15 +551,6 @@ lengthAdj = -4 delimiter = \\r\n -The DataWise DOMSAT system reports a length that is one greater than the -number actually present. It terminates each message with 3 sets of -carriage-return/linefeed. The proper settings for a DataWise DOMSAT -socket stream are: - -lengthAdj = 0 - -delimiter = \\r\n\r\n\r\n - **How messages are parsed** The socket is opened. The input software expects the stream to start diff --git a/install/lrgs/lrgs.conf b/install/lrgs/lrgs.conf index 8deee9dc1..ce5c88a36 100644 --- a/install/lrgs/lrgs.conf +++ b/install/lrgs/lrgs.conf @@ -10,5 +10,3 @@ drgsRecvConfig=$LRGSHOME/drgsconf.xml htmlStatusSeconds=10 ddsListenPort=16003 ddsRequireAuth=false -enableDomsatRecv=false -loadDomsat=false diff --git a/src/main/java/decodes/datasource/NoHeaderPMParser.java b/src/main/java/decodes/datasource/NoHeaderPMParser.java index cb2f36da6..9429afe34 100644 --- a/src/main/java/decodes/datasource/NoHeaderPMParser.java +++ b/src/main/java/decodes/datasource/NoHeaderPMParser.java @@ -11,7 +11,7 @@ /** Concrete subclass of PMParser for parsing performance measurements out of a file with no header. Sets header length to 0 and message length - to the endire raw message. + to the entire raw message. Used when parsing files and medium ID has been given via some other means. Also sets the MESSAGE_TIME to current time. */ diff --git a/src/main/java/decodes/db/Makefile b/src/main/java/decodes/db/Makefile deleted file mode 100644 index 19b535f40..000000000 --- a/src/main/java/decodes/db/Makefile +++ /dev/null @@ -1,229 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:00 cvs -# Added legacy code to repository -# -# Revision 1.38 2004/08/27 18:41:31 mjmaloney -# Platwiz work -# -# Revision 1.37 2003/11/15 20:06:53 mjmaloney -# Removed DbConvert -- obsolete. -# -# Revision 1.36 2003/10/20 20:22:53 mjmaloney -# Database changes for DECODES 6.0 -# -# Revision 1.35 2002/09/19 17:18:02 mjmaloney -# SQL dev. -# -# Revision 1.34 2002/09/19 12:17:28 mjmaloney -# SQL Updates. -# -# Revision 1.33 2002/09/08 19:43:22 mjmaloney -# Updates for 5.2 -# -# Revision 1.32 2002/08/26 04:53:45 chris -# Major SQL Database I/O development. -# -# Revision 1.31 2002/06/24 03:39:37 chris -# Initial changes in support of the SQL database functionality. -# -# Revision 1.30 2002/06/15 23:32:52 chris -# Added javadoc -# -# Revision 1.29 2002/05/18 21:04:38 mjmaloney -# Deprecated decodes.db.TimeZone. Replaced by java.util.TimeZone. -# -# Revision 1.28 2001/11/23 21:18:22 mike -# dev -# -# Revision 1.27 2001/11/21 21:19:06 mike -# Implemented working DbInstall -# -# Revision 1.26 2001/08/24 19:44:27 mike -# Added Netlist2Lrgs -# -# Revision 1.25 2001/08/12 17:36:54 mike -# Slight architecture change for unit converters. The UnitConverterDb objects -# are now full-fledged DatabaseObjects and not derived from UnitConverter. -# This necessitated changes to DB parsing code and prepareForExec code. -# -# Revision 1.24 2001/04/06 10:45:48 mike -# SecurityException moved to util -# -# Revision 1.23 2001/04/06 10:44:36 mike -# dev -# -# Revision 1.22 2001/04/01 17:23:25 mike -# Added DataSourceList. HotBackupGroup moved to decoder package. -# -# Revision 1.21 2001/04/01 17:01:10 mike -# *** empty log message *** -# -# Revision 1.20 2001/03/23 22:07:04 mike -# Implemented PlatformConfigList & added it to Database class. -# -# Revision 1.19 2001/03/23 20:22:53 mike -# Collection classes are no longer static monostate. Access them through -# the current database (Database.getDb().collectionName) -# -# Revision 1.18 2001/03/23 20:09:25 mike -# Collection classes are no longer monostate static collections. -# -# Revision 1.17 2001/03/21 21:34:40 mike -# Created SiteList. Add methods to Site constructor to add itself to SiteList. -# Also, make name list private within a site. Add methods for defining new -# name and retrieving names. -# -# Revision 1.16 2001/03/20 22:55:56 mike -# Implemented DatabaseArchive & parsers. -# -# Revision 1.15 2001/03/20 03:43:24 mike -# Implement final parsers -# -# Revision 1.14 2001/03/18 18:24:35 mike -# Implemented PerformanceMeasurments objects & parsers. -# -# Revision 1.13 2001/03/17 18:53:06 mike -# Created PMConfig & PMConfigList (performance measurements decoders) -# -# Revision 1.12 2001/03/16 19:53:10 mike -# Implemented XML parsers for routing specs -# -# Revision 1.11 2001/03/15 21:36:35 mike -# dev -# -# Revision 1.10 2001/01/20 02:54:00 mike -# dev -# -# Revision 1.9 2001/01/13 14:59:33 mike -# Implemented EU Conversions -# -# Revision 1.8 2001/01/12 21:57:47 mike -# dev -# -# Revision 1.7 2001/01/12 21:53:38 mike -# Renamed UnitConverter to UnitConverterDb -# -# Revision 1.6 2001/01/12 15:38:20 mike -# dev -# -# Revision 1.5 2001/01/10 14:58:31 mike -# Added EquationSpec classes & parsers. -# -# Revision 1.4 2001/01/08 15:38:37 mike -# dev -# -# Revision 1.3 2000/12/29 02:42:52 mike -# Created. -# -# Revision 1.2 2000/12/28 14:02:35 mike -# These moved to decodes/xml package. -# -# Revision 1.1 2000/12/21 14:31:27 mike -# Created. -# -# - - -# MJM 20020907 - Removed the PJAVA stuff -# -# CFM: Here are the "pre-java" files -- those that need to be run through -# the C-preprocessor. -# -# PJSRC = \ -# DataPresentation.pjava \ -# DataSource.pjava \ -# DataType.pjava \ -# DecodesScript.pjava \ -# Enum.pjava \ -# EnumValue.pjava \ -# EquipmentModel.pjava \ -# NetworkList.pjava \ -# Platform.pjava \ -# PlatformConfig.pjava \ -# PresentationGroup.pjava \ -# RoutingSpec.pjava \ -# Site.pjava \ -# UnitConverterDb.pjava -# -# PJAVA = $(PJSRC:.pjava=.java) -# PJCLASS = $(PJSRC:.pjava=.class) -# - -JSRC = \ - Database.java \ - UnitConverterDb.java \ - CompositeConverter.java \ - ConfigSensor.java \ - Constants.java \ - DatabaseException.java \ - DatabaseIO.java \ - DatabaseObject.java \ - DataSourceList.java \ - DataTypeSet.java \ - DbInstall.java \ - EngineeringUnit.java \ - EngineeringUnitList.java\ - EnumList.java \ - FormatStatement.java \ - IncompleteDatabaseException.java \ - InvalidDatabaseException.java \ - LinearConverter.java \ - MakeUnitsTable.java \ - MarkProduction.java \ - Netlist2Lrgs.java \ - NetworkListEntry.java \ - NetworkListList.java \ - NoConversionException.java \ - NullConverter.java \ - PlatformConfigList.java \ - PlatformList.java \ - PlatformSensor.java \ - Poly5Converter.java \ - PresentationGroupList.java \ - RoundingRule.java \ - RoutingSpecList.java \ - ScriptSensor.java \ - SiteList.java \ - SiteName.java \ - TransportMedium.java \ - UnitConverter.java \ - UnitConverterSet.java \ - UsgsStdConverter.java \ - ValueAlreadyDefinedException.java \ - ValueNotFoundException.java \ - DataPresentation.java \ - DataSource.java \ - DataType.java \ - DecodesScript.java \ - Enum.java \ - EnumValue.java \ - EquipmentModel.java \ - EquipmentModelList.java \ - NetworkList.java \ - Platform.java \ - PlatformConfig.java \ - PresentationGroup.java \ - RoutingSpec.java \ - Site.java \ - IdDatabaseObject.java \ - IdRecordList.java - - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${DECODESSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/decodes/dbimport/Makefile b/src/main/java/decodes/dbimport/Makefile deleted file mode 100644 index 307ac9eec..000000000 --- a/src/main/java/decodes/dbimport/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# -# $Id$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:01 cvs -# Added legacy code to repository -# -# Revision 1.5 2002/12/08 20:21:01 mjmaloney -# Updates -# -# Revision 1.4 2002/05/07 21:10:39 mjmaloney -# Created LrgsNetlist utility. Also see scripts/nl2lrgs. -# -# Revision 1.3 2001/11/24 18:28:57 mike -# First working dbimport. -# -# Revision 1.2 2001/11/23 19:15:42 mike -# Working PlatformExport utility. -# -# Revision 1.1 2001/06/24 22:01:29 mike -# created. -# -# - -JSRC = EmitImport.java \ - PlatformExport.java \ - DbImport.java \ - LrgsNetlist.java \ - DbExport.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${DECODESSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/decodes/decoder/Makefile b/src/main/java/decodes/decoder/Makefile deleted file mode 100644 index 3c28fa3bf..000000000 --- a/src/main/java/decodes/decoder/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -# -# $Id$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:01 cvs -# Added legacy code to repository -# -# Revision 1.15 2004/01/05 01:49:02 mjmaloney -# Debug. -# -# Revision 1.14 2003/11/29 17:40:38 mjmaloney -# Several modifications to the way time-stamping is done. These were necessary -# to support EDL files. Time stamping is now done all in one pass. All time/date -# operators are now supported. -# -# Revision 1.13 2003/11/15 20:24:45 mjmaloney -# Move FormatTokenizer to top for faster compile. -# -# Revision 1.12 2001/09/19 01:11:55 mike -# dev -# -# Revision 1.11 2001/08/24 19:44:40 mike -# Moved PM stuff to datasource -# -# Revision 1.10 2001/08/13 01:30:00 mike -# dev -# -# Revision 1.9 2001/07/01 18:41:14 mike -# Moved DataSource stuff to separate 'datasource' package -# -# Revision 1.8 2001/06/05 15:17:21 mike -# dev -# -# Revision 1.7 2001/05/30 23:52:38 mike -# First compiled version of FieldOperation -# -# Revision 1.6 2001/05/21 18:01:27 mike -# dev -# -# Revision 1.5 2001/05/21 13:38:50 mike -# dev -# -# Revision 1.4 2001/05/06 22:53:03 mike -# dev -# -# Revision 1.3 2001/05/05 17:46:33 mike -# dev -# -# Revision 1.2 2001/05/04 21:16:12 mike -# dev -# -# Revision 1.1 2001/04/19 10:10:00 mike -# dev -# -# - -JSRC = \ - FormatStatementTokenizer.java \ - CheckOperation.java \ - DataOperations.java \ - DecodedMessage.java \ - DecoderException.java \ - DecodesOperationGroup.java \ - DecodesOperation.java \ - EndOfDataException.java \ - FieldOperation.java \ - FieldParseException.java \ - FormatSelectOperation.java \ - NumberParser.java \ - PositionOperation.java \ - RecordedTime.java \ - ScanOperation.java \ - ScriptException.java \ - ScriptFormatException.java \ - Sensor.java \ - SkipCharactersOperation.java \ - SkipLinesOperation.java \ - SwitchFormatException.java \ - TimeSeries.java \ - TimeTruncateOperation.java \ - RecordedTimeStamp.java \ - RecordedTimeStampTest.java \ - WhiteSpaceSkipOperation.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${DECODESSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/decodes/gui/Makefile b/src/main/java/decodes/gui/Makefile deleted file mode 100644 index 4ea14a532..000000000 --- a/src/main/java/decodes/gui/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# -# $Id$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:03 cvs -# Added legacy code to repository -# -# Revision 1.8 2003/11/20 18:33:39 mjmaloney -# Created UnitsComboBox -# -# Revision 1.7 2002/09/20 12:59:07 mjmaloney -# SQL Dev. -# -# Revision 1.6 2001/11/09 14:35:11 mike -# dev -# -# Revision 1.5 2001/10/26 13:03:23 mike -# Added decoding to editor. -# -# Revision 1.4 2001/09/19 01:11:56 mike -# dev -# -# Revision 1.3 2001/04/30 01:16:59 mike -# dev -# -# Revision 1.2 2001/04/21 01:28:40 mike -# First runnable Unix version. -# -# Revision 1.1 2001/04/20 20:27:35 mike -# Removed import statements for borland classes -# -# - -JSRC = \ - GuiApp.java \ - PropertiesEditDialog.java \ - PropertiesEditPanel.java \ - PropertyEditDialog.java \ - SortingListTable.java \ - SortingListTableModel.java \ - TableColumnAdjuster.java \ - TopFrame.java \ - EnumCellEditor.java \ - EnumComboBox.java \ - UnitsComboBox.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${DECODESSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/decodes/platwiz/Makefile b/src/main/java/decodes/platwiz/Makefile deleted file mode 100644 index 799d6e414..000000000 --- a/src/main/java/decodes/platwiz/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# $Id$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:03 cvs -# Added legacy code to repository -# -# Revision 1.8 2004/09/08 10:10:08 mjmaloney -# dev -# -# Revision 1.7 2004/08/25 19:27:45 mjmaloney -# dev -# -# Revision 1.6 2004/08/09 15:07:35 mjmaloney -# dev -# -# Revision 1.5 2004/08/02 13:48:46 mjmaloney -# dev -# -# Revision 1.4 2004/07/28 15:37:27 mjmaloney -# dev -# -# Revision 1.3 2004/07/28 15:06:14 mjmaloney -# dev -# -# Revision 1.2 2004/02/09 21:07:30 mjmaloney -# Complete GUI Prototype. -# -# Revision 1.1 2004/02/09 01:57:04 mjmaloney -# Created GUI Platform Wizard Prototype -# -# - -JSRC = \ - PlatformWizard.java \ - Frame1.java \ - SampleDataPanel.java \ - StartPanel.java \ - WizardPanel.java \ - SitePanel.java \ - SelectDevicePanel.java \ - DefineSensorsPanel.java \ - ScriptEditPanel.java \ - PlatformPanel.java \ - SavePanel.java - - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${DECODESSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/decodes/rledit/Makefile b/src/main/java/decodes/rledit/Makefile deleted file mode 100644 index 528473154..000000000 --- a/src/main/java/decodes/rledit/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# $Id$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:04 cvs -# Added legacy code to repository -# -# Revision 1.5 2004/04/12 21:30:34 mjmaloney -# dev -# -# Revision 1.4 2004/04/02 15:50:46 mjmaloney -# Implemented EU editing functions. -# -# Revision 1.3 2004/04/01 22:37:24 mjmaloney -# Implemented controls for enumerations. -# -# Revision 1.2 2004/02/03 15:19:55 mjmaloney -# Working GUI prototype complete. -# -# Revision 1.1 2004/02/02 22:12:57 mjmaloney -# dev. -# -# - -JSRC = \ - RefListEditor.java \ - RefListFrame.java \ - RefListFrame_AboutBox.java \ - EnumTableModel.java \ - EUTableModel.java \ - EUCnvTableModel.java \ - EUCnvEditDialog.java \ - DTEquivTableModel.java \ - EnumValueDialog.java \ - EUDialog.java \ - DTEDialog.java - - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${DECODESSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/decodes/routing/Makefile b/src/main/java/decodes/routing/Makefile deleted file mode 100644 index a2ce85e94..000000000 --- a/src/main/java/decodes/routing/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# -# $Id$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:04 cvs -# Added legacy code to repository -# -# Revision 1.1 2001/07/24 02:16:57 mike -# dev -# -# - -JSRC = RoutingSpecThread.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${DECODESSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/decodes/routmon/Makefile b/src/main/java/decodes/routmon/Makefile deleted file mode 100644 index 5193ad0f1..000000000 --- a/src/main/java/decodes/routmon/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# -# $Id$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:04 cvs -# Added legacy code to repository -# -# Revision 1.1 2004/04/29 01:10:20 mjmaloney -# Created. -# - -JSRC = \ - RoutingMonitor.java \ - RoutingDirMonitor.java \ - RoutingSpecStatus.java \ - BadStatusFile.java - - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${DECODESSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/decodes/syncgui/Makefile b/src/main/java/decodes/syncgui/Makefile deleted file mode 100644 index c3f7cacdf..000000000 --- a/src/main/java/decodes/syncgui/Makefile +++ /dev/null @@ -1,31 +0,0 @@ - -JSRC = \ - SyncGui.java \ - District.java \ - DistrictDBSnap.java \ - DistrictPanel.java \ - DownloadReader.java \ - DownloadThread.java \ - FileList.java \ - FileListPanel.java \ - PlatList.java \ - PlatListEntry.java \ - PlatListPanel.java \ - SnapshotPanel.java \ - SyncConfig.java \ - SyncGuiFrame.java \ - SyncGuiFrame_AboutBox.java \ - TreePanel.java - - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${DECODESSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/decodes/util/Makefile b/src/main/java/decodes/util/Makefile deleted file mode 100644 index 772f6df7b..000000000 --- a/src/main/java/decodes/util/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:07 cvs -# Added legacy code to repository -# -# Revision 1.8 2004/08/27 20:50:30 mjmaloney -# javadocs -# -# Revision 1.7 2002/06/24 03:41:51 chris -# Initial changes in support of the SQL database functionality. -# -# Revision 1.6 2001/09/19 01:11:57 mike -# dev -# -# Revision 1.5 2001/09/03 13:24:32 mike -# Added TimeOfDay.java -# -# Revision 1.4 2001/04/21 20:19:23 mike -# Added read & write methods to all DatabaseObjects -# -# Revision 1.3 2001/04/13 20:16:49 mike -# Implemented first cut of DecodesSettings -# -# Revision 1.2 2001/04/06 11:29:46 mike -# dev -# -# Revision 1.1 2000/12/21 14:31:28 mike -# Created. -# -# - -JSRC = DecodesVersion.java \ - DecodesException.java \ - SecurityException.java \ - DecodesSettings.java \ - CmdLineArgs.java \ - TimeOfDay.java \ - CmdLineArgs.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${DECODESSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/decodes/xml/Makefile b/src/main/java/decodes/xml/Makefile deleted file mode 100644 index 2f233b54f..000000000 --- a/src/main/java/decodes/xml/Makefile +++ /dev/null @@ -1,103 +0,0 @@ -# -# $Id$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:08 cvs -# Added legacy code to repository -# -# Revision 1.21 2004/08/30 14:49:31 mjmaloney -# Added javadocs -# -# Revision 1.20 2003/10/20 20:22:55 mjmaloney -# Database changes for DECODES 6.0 -# -# Revision 1.19 2002/05/19 00:22:19 mjmaloney -# Deprecated decodes.db.TimeZone and decodes.db.TimeZoneList. -# These are now replaced by the java.util.TimeZone class. -# -# Revision 1.18 2001/06/16 20:25:55 mike -# dev -# -# Revision 1.17 2001/06/12 14:14:29 mike -# dev -# -# Revision 1.16 2001/04/13 16:46:26 mike -# dev -# -# Revision 1.15 2001/04/11 22:52:38 mike -# dev -# -# Revision 1.14 2001/04/09 20:56:42 mike -# Made TopLevelParser usable as a DECODES file parser - not just a test class. -# -# Revision 1.13 2001/03/23 21:12:34 mike -# Collection classes are no longer static. They are accessed via -# Database.getDb().collectionName. -# -# Revision 1.12 2001/03/20 03:43:25 mike -# Implement final parsers -# -# Revision 1.11 2001/03/18 18:24:36 mike -# Implemented PerformanceMeasurments objects & parsers. -# -# Revision 1.10 2001/03/16 22:21:07 mike -# Added NetworkLists & corresponding parsers. -# -# Revision 1.9 2001/03/16 19:53:18 mike -# Implemented XML parsers for routing specs -# -# Revision 1.8 2001/01/20 02:53:48 mike -# Added EqTable Parser -# -# Revision 1.7 2001/01/13 17:22:48 mike -# Added parsers for EngineeringUnits -# -# Revision 1.6 2001/01/10 14:58:33 mike -# Added EquationSpec classes & parsers. -# -# Revision 1.5 2001/01/08 22:14:22 mike -# created DataTypeEquivalenceListParser -# -# Revision 1.4 2001/01/03 02:54:59 mike -# dev -# -# Revision 1.3 2000/12/31 23:12:50 mike -# dev -# -# Revision 1.2 2000/12/29 02:50:03 mike -# dev -# -# Revision 1.1 2000/12/28 14:01:19 mike -# First working version. -# -# - -JSRC = TopLevelParser.java \ - EnumValueParser.java EnumParser.java EnumListParser.java \ - XmlDbTags.java EquipmentModelParser.java UnitConverterParser.java \ - ConfigSensorParser.java DecodesScriptParser.java SiteParser.java \ - PlatformConfigParser.java PlatformParser.java PlatformSensorParser.java \ - ScriptSensorParser.java TransportMediumParser.java \ - DataTypeEquivalenceListParser.java \ - EngineeringUnitParser.java EngineeringUnitListParser.java \ - DataSourceParser.java RoutingSpecParser.java \ - NetworkListEntryParser.java NetworkListParser.java \ - RoundingRuleParser.java DataPresentationParser.java \ - PresentationGroupParser.java \ - DatabaseParser.java \ - PlatformListParser.java XmlDatabaseIO.java \ - CreatePlatformXref.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${DECODESSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/ilex/cmdline/Makefile b/src/main/java/ilex/cmdline/Makefile deleted file mode 100644 index e017bf389..000000000 --- a/src/main/java/ilex/cmdline/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:08 cvs -# Added legacy code to repository -# -# Revision 1.2 2001/08/24 19:45:58 mike -# Added StdAppSettings -# -# Revision 1.1 1999/12/04 12:34:06 mike -# Initial checkin -# -# - -JSRC = ApplicationSettings.java BooleanToken.java IntegerToken.java \ - Main.java StringArrayIterator.java StringToken.java Token.java \ - TokenOptions.java util.java StdAppSettings.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${ILEXSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/ilex/gui/Makefile b/src/main/java/ilex/gui/Makefile deleted file mode 100644 index 37d87c874..000000000 --- a/src/main/java/ilex/gui/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:09 cvs -# Added legacy code to repository -# -# Revision 1.11 2004/11/16 21:01:59 mjmaloney -# Created. -# -# Revision 1.10 2004/11/10 22:28:59 mjmaloney -# dev -# -# Revision 1.9 2004/11/10 16:27:34 mjmaloney -# dev -# -# Revision 1.8 2000/06/07 20:49:43 mike -# Added missing classes. -# -# Revision 1.7 2000/05/19 20:38:13 mike -# Compile SingleClickButton -# -# Revision 1.6 2000/04/04 19:46:11 mike -# Added ExtensionFileFilter -# -# Revision 1.5 2000/03/29 21:42:19 mike -# dev -# -# Revision 1.4 2000/03/29 21:41:52 mike -# Added Editor & EditorMenuSet -# -# Revision 1.3 2000/03/28 16:46:24 mike -# Added LoginDialog -# -# Revision 1.2 2000/03/25 22:07:24 mike -# Added gui stuff. -# -# Revision 1.1 2000/01/26 18:32:40 mike -# Added makefile support for ilex.gui package. -# -# - -JSRC = FrameDisplayer.java DynamicLabel.java EditPropsAction.java \ - GuiApp.java MenuFrame.java LoginDialog.java \ - Editor.java EditorMenuSet.java ExtensionFileFilter.java \ - SingleClickButton.java AllFiles_FileFilter.java \ - BackgroundCorbaUpdateThread.java FrameDisplayer.java \ - FileDownloadDialog.java MultFileDownloadDialog.java \ - EventsPanel.java EventsPanelQueueThread.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${ILEXSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/ilex/jni/Makefile b/src/main/java/ilex/jni/Makefile deleted file mode 100644 index 6a27909b2..000000000 --- a/src/main/java/ilex/jni/Makefile +++ /dev/null @@ -1,114 +0,0 @@ -# -# $Id$ -# - -# IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT -# -# DO NOT BUILD THE NATIVE LIBRARY ON A LINUX 64-BIT SYSTEM OR IT WON'T -# WORK WHEN DISTRIBUTED TO A 32-BIT SYSTEM!!!!! -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -# -# Define library base name and version/release numbers: -# -LIB_BASE_NAME=libilexjni.so -LIB_MAJOR_VER=6 -LIB_MINOR_VER=0 -LIB_RELEASE=0 - -LIB_SO_NAME=$(LIB_BASE_NAME).$(LIB_MAJOR_VER) -TARGETLIB=$(LIB_SO_NAME).$(LIB_MINOR_VER).$(LIB_RELEASE) - -# -# list of executable programs: -# -EXECUTABLES= - -TARGETS= ${TARGETLIB} - -all: classes headers ${TARGETS} - @echo '${TARGETS} upto date!!' - -include ${PROPTOP}/dcstool/legacy/ilex/Makefile.Common -include ${PROPTOP}/dcstool/legacy/lrgs/Makefile.DependRules - -# -# Definitions local to this directory: -# -LOCAL_DEFINES = -L. -LOCAL_INCLUDES= -I${JDKDIR}/include -I${JDKDIR}/include/linux -I${SRCROOT}/java -LOCAL_C_OPTIONS = -fPIC -LOCAL_CPP_OPTIONS =-fPIC - -# -# Java package prefix and source files: -# -JPKGPREFIX=ilex.jni. -JSRC = SignalTrapper.java SignalHandler.java Debug.java - -#JSRC = SignalTrapper.java SignalHandler.java Debug.java \ -# EventMsg.java EventShmem.java EventContext.java - -#JCLASS = ${JSRC:.java=.class} - -classes: $(JCLASS) - @echo made ${JCLASS} - -GENHEADERS=SignalTrapper.h Debug.h - -#GENHEADERS=SignalTrapper.h Debug.h EventShmem.h EventContext.h - -headers: $(GENHEADERS) - -# -# Source files -# -CPPFILES= -CFILES= SignalTrapper.c Debug.c - -#CFILES= SignalTrapper.c Debug.c EventShmem.c EventContext.c - -# -# Dependency rules are included after source files -# -#include ${SRCROOT}/Makefile.DependRules - - -# -# Library rules: -# -${TARGETLIB}: ${ALL_OBJECTS} - @echo '---------------------------------------------------' - @echo 'Creating/Updating Library '$@'...' - ${AR} ${LDFLAGS} ${ARFLAGS} -o $@ $(ALL_OBJECTS) -lc - @echo 'Making local link for build...' - if [ -f ./${LIB_BASE_NAME} -o -L ./${LIB_BASE_NAME} ] ; then \ - rm ./${LIB_BASE_NAME}; \ - fi - ln -s $@ ./${LIB_BASE_NAME} - -# ${AR} ${LDFLAGS} ${ARFLAGS} -o $@ $(ALL_OBJECTS) -lilexutil -lc - -# -# You must have root permissions to run install. This will need -# to be done once every time any of the version numbers change. -# -install: ${TARGETLIB} - -rm /usr/lib/${LIB_SO_NAME} /usr/lib/${LIB_BASE_NAME} - (cd /usr/lib; \ - ln -sf ${TARGETLIB} ${LIB_SO_NAME} ; \ - ln -sf ${TARGETLIB} ${LIB_BASE_NAME} ;) - ${LDCONFIG} - -SignalTrapper.o: SignalTrapper.c SignalTrapper.h - -Debug.o: Debug.c Debug.h - -EventShmem.o: EventShmem.c EventShmem.h - -EventContext.o: EventContext.c EventContext.h - -depends: - touch make.depend - -# DO NOT DELETE THIS LINE diff --git a/src/main/java/ilex/net/Makefile b/src/main/java/ilex/net/Makefile deleted file mode 100644 index 0a9ab3d89..000000000 --- a/src/main/java/ilex/net/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:09 cvs -# Added legacy code to repository -# -# Revision 1.8 2004/03/05 14:17:10 mjmaloney -# Added TestServer -# -# Revision 1.7 2003/09/18 14:24:52 mjmaloney -# Created Usbr test server to test the USBR client in the lrgs.lddc package. -# -# Revision 1.6 2002/12/08 20:22:10 mjmaloney -# Added DumpClient -# -# Revision 1.5 2002/10/11 01:27:31 mjmaloney -# Created TestFileServer -# -# Revision 1.4 2000/01/23 19:30:01 mike -# Added BasicClient -# -# Revision 1.3 1999/12/01 19:42:49 mike -# Implemented java install stuff. -# -# Revision 1.2 1999/09/30 18:16:44 mike -# 9/30/1999 -# -# Revision 1.1 1999/09/24 20:18:44 mike -# 9/24/1999 -# -# - -JSRC = BasicServer.java BasicSvrThread.java BasicClient.java \ - TestFileServer.java TestFileSvrThread.java DumpClient.java \ - TestUsbrServer.java TestUsbrSvrThread.java \ - TestServer.java TestServerThread.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${ILEXSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/ilex/test/Makefile b/src/main/java/ilex/test/Makefile deleted file mode 100644 index c479a1188..000000000 --- a/src/main/java/ilex/test/Makefile +++ /dev/null @@ -1,33 +0,0 @@ - -JSRC = \ - LoggerTester.java \ - TestEnum.java \ - TestEnumList.java \ - TestEnumListParser.java \ - TestEnumParser.java \ - TestEnumValue.java \ - TestEnumValueParser.java \ - Tester.java \ - XmlContentParser.java \ - XmlElementDescriptor.java \ - XmlFileParser.java \ - XmlObjectFactory.java \ - XmlObject.java \ - XmlParserTester.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${ILEXSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - - - -realclean: clean - -scratch: realclean all \ No newline at end of file diff --git a/src/main/java/ilex/util/Makefile b/src/main/java/ilex/util/Makefile deleted file mode 100644 index 8628c528b..000000000 --- a/src/main/java/ilex/util/Makefile +++ /dev/null @@ -1,193 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:10 cvs -# Added legacy code to repository -# -# Revision 1.42 2005/12/22 15:22:16 mmaloney -# Added DesEncrypter -# -# Revision 1.41 2004/11/10 16:27:10 mjmaloney -# Added unzip capability -# -# Revision 1.40 2004/08/30 15:35:16 mjmaloney -# Renamed BadIndexException to IndexRangeException because of class with ilex. -# var class. -# -# Revision 1.39 2004/08/26 14:14:37 mjmaloney -# Added FileUtil -# -# Revision 1.38 2004/07/07 14:26:22 mjmaloney -# Created. -# -# Revision 1.37 2004/05/06 20:57:10 mjmaloney -# Implemented QueueLogger to be used by servers that export events. -# -# Revision 1.36 2004/04/23 19:28:01 mjmaloney -# Created CaptureStdout -# -# Revision 1.35 2004/04/02 18:58:16 mjmaloney -# Created. -# -# Revision 1.34 2004/03/31 14:28:04 mjmaloney -# Added new test. -# -# Revision 1.33 2004/01/27 15:28:48 mjmaloney -# dev -# -# Revision 1.32 2003/12/20 00:32:50 mjmaloney -# Implemented TimeoutInputStream. -# -# Revision 1.31 2003/09/02 14:37:28 mjmaloney -# Added TeeLogger. Added more control on msg format to Logger. -# Added TextUtil.fixedLengthFields method. -# -# Revision 1.30 2003/05/16 20:12:38 mjmaloney -# Added EnvExpander. This is preferrable to ShellExpander because -# it is platform independent. -# -# Revision 1.29 2003/05/12 12:36:46 mjmaloney -# Added FailureException & FatalException. -# All three IlexException sub-classes modified to log messages. -# -# Revision 1.28 2003/05/08 23:20:15 mjmaloney -# Added Base64 based on apache source. -# -# Revision 1.27 2003/03/27 21:17:55 mjmaloney -# drgs dev -# -# Revision 1.26 2002/08/26 17:47:32 chris -# SQL Database I/O development -# -# Revision 1.25 2001/10/25 14:33:03 mike -# Added PropertiesUtil -# -# Revision 1.24 2001/09/24 20:43:04 mike -# Created FileLogger -# -# Revision 1.23 2001/07/25 13:15:27 mike -# dev -# -# Revision 1.22 2001/06/13 02:01:41 mike -# dev -# -# Revision 1.21 2001/05/06 17:48:11 mike -# Created ArgumentTokenizer -# -# Revision 1.20 2001/04/13 19:38:41 mike -# Added logger classes. -# -# Revision 1.19 2001/01/24 02:17:14 mike -# Added ErrorException and WarningException for File parsers. -# -# Revision 1.18 2000/12/18 02:59:30 mike -# dev -# -# Revision 1.17 2000/12/15 23:27:56 mike -# created StringPair -# -# Revision 1.16 2000/08/31 00:00:02 mike -# *** empty log message *** -# -# Revision 1.15 2000/08/30 17:21:04 mike -# Created ServerLock.java -# -# Revision 1.14 2000/03/31 16:11:36 mike -# Created AsciiUtil.java -# -# Revision 1.13 2000/03/25 22:07:26 mike -# Added gui stuff. -# -# Revision 1.12 2000/03/17 22:44:56 mike -# dev -# -# Revision 1.11 2000/03/16 14:23:50 mike -# Added TTYEcho to prompt user for password without echoing. -# -# Revision 1.10 2000/03/13 15:35:01 mike -# PasswordFileEditor complete. -# -# Revision 1.9 2000/03/12 22:41:34 mike -# Added PasswordFile & PasswordFileEntry classes. -# -# Revision 1.8 2000/01/07 23:04:51 mike -# Created -# -# Revision 1.7 1999/12/01 19:42:53 mike -# Implemented java install stuff. -# -# Revision 1.6 1999/11/18 17:04:57 mike -# Added ShellExpander class to expand tilde & shell variables. -# -# Revision 1.5 1999/10/20 21:10:04 mike -# Initial implementation -# -# Revision 1.4 1999/09/23 12:33:41 mike -# Initial implementation -# -# Revision 1.3 1999/09/21 08:50:17 mike -# Renamed CmdLineProg to CmdLineProcessor. This is more accurate - There's -# no reason to require inheritence. A single prog may have many -# CmdLineProcessors. -# -# Revision 1.2 1999/09/16 14:52:43 mike -# 9/16/1999 -# -# Revision 1.1 1999/09/15 17:10:54 mike -# *** empty log message *** -# -# - -JSRC = FileException.java FileExceptionList.java FileParser.java \ - IDateFormat.java CmdLine.java CmdLineList.java CmdLineProcessor.java \ - ArrayUtil.java TwoDigitYear.java ByteUtil.java ShellExpander.java \ - TextUtil.java PasswordFileEntry.java PasswordFile.java \ - PasswordFileEditor.java TTYEcho.java FileDigest.java RunQueue.java \ - AsciiUtil.java ServerLock.java LockWrapper.java StringPair.java \ - IlexException.java \ - ErrorException.java \ - WarningException.java \ - FailureException.java \ - FatalException.java \ - Logger.java \ - StderrLogger.java \ - NullLogger.java \ - FileLogger.java \ - ArgumentTokenizer.java \ - Counter.java \ - FileCounter.java \ - PropertiesUtil.java \ - Pair.java \ - ServerLockable.java \ - Base64.java \ - EnvExpander.java \ - TeeLogger.java \ - TimeoutInputStream.java \ - ThreadLogger.java \ - FileLoggerTest.java \ - DirectoryMonitorThread.java \ - TestDirectoryMonitor.java \ - CaptureStdout.java \ - IndexRangeException.java \ - QueueLogger.java \ - ProcWaiterThread.java \ - FileUtil.java \ - ZipMonitor.java \ - DesEncrypter.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${ILEXSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/ilex/var/Makefile b/src/main/java/ilex/var/Makefile deleted file mode 100644 index 7c80519f9..000000000 --- a/src/main/java/ilex/var/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# -# $Id$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:10 cvs -# Added legacy code to repository -# -# Revision 1.2 2001/09/18 00:46:50 mike -# Working implementation of DateDelegate -# -# Revision 1.1 2001/05/19 20:05:30 mike -# Added Makefile and TimedVariable.java -# - -JSRC = BadArgumentException.java BadIndexException.java \ - BooleanDelegate.java ByteDelegate.java DelegateVariable.java \ - DoubleDelegate.java IFlags.java IVariable.java LongDelegate.java \ - NVarTest.java NamedVariable.java NamedVariableList.java \ - NoConversionException.java NotAnArrayException.java StringDelegate.java \ - VarTest.java Variable.java VariableException.java VariableType.java \ - TimedVariable.java CharDelegate.java DateDelegate.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${ILEXSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/ilex/xml/Makefile b/src/main/java/ilex/xml/Makefile deleted file mode 100644 index 421013ae6..000000000 --- a/src/main/java/ilex/xml/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:10 cvs -# Added legacy code to repository -# -# Revision 1.10 2004/04/26 20:02:26 mjmaloney -# Dev. -# -# Revision 1.9 2003/11/11 02:44:50 mjmaloney -# Added ElementIgnorer. -# -# Revision 1.8 2003/03/27 13:52:01 mjmaloney -# Created DomHelper -# -# Revision 1.7 2003/03/26 20:16:37 mjmaloney -# Added DomTest -# -# Revision 1.6 2001/04/23 12:51:54 mike -# Added LoggerErrorHandler. -# -# Revision 1.5 2001/04/09 20:46:49 mike -# Created StringBufferErrorHandler -# -# Revision 1.4 2001/01/03 02:55:05 mike -# dev -# -# Revision 1.3 2000/12/31 15:56:56 mike -# dev -# -# Revision 1.2 2000/12/23 21:33:16 mike -# Created XmlObjectWriter and XmlOutputStream -# -# Revision 1.1 2000/12/21 21:30:11 mike -# Created -# -# - -JSRC = TaggedDoubleOwner.java TaggedDoubleSetter.java TaggedLongOwner.java \ - TaggedLongSetter.java TaggedStringOwner.java TaggedStringSetter.java \ - TaggedBooleanSetter.java TaggedBooleanOwner.java \ - XmlHierarchyParser.java XmlObjectParser.java \ - XmlObjectWriter.java XmlOutputStream.java PrintStreamErrorHandler.java \ - StringBufferErrorHandler.java LoggerErrorHandler.java \ - DomTest.java \ - DomHelper.java \ - ElementIgnorer.java \ - XmlUtils.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${ILEXSRCROOT}/Makefile.Common - -depends: - touch make.depend - -install: - diff --git a/src/main/java/lrgs/apiadmin/Makefile b/src/main/java/lrgs/apiadmin/Makefile deleted file mode 100644 index 9bb0cee7b..000000000 --- a/src/main/java/lrgs/apiadmin/Makefile +++ /dev/null @@ -1,115 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:11 cvs -# Added legacy code to repository -# -# Revision 1.16 2003/07/21 15:46:24 mjmaloney -# *** empty log message *** -# -# Revision 1.15 2001/01/28 01:32:55 mike -# dev -# -# Revision 1.14 2000/03/28 16:06:02 mike -# Created AutoStartProperties -# -# Revision 1.13 2000/03/14 19:19:11 mike -# dev -# -# Revision 1.12 2000/03/14 02:20:52 mike -# dev -# -# Revision 1.11 2000/03/13 20:23:34 mike -# dev -# -# Revision 1.10 2000/03/13 20:22:56 mike -# dev -# -# Revision 1.9 2000/03/13 16:46:57 mike -# dev -# -# Revision 1.8 2000/03/11 21:57:01 mike -# dev -# -# Revision 1.7 2000/03/11 20:17:09 mike -# dev -# -# Revision 1.6 2000/03/11 01:35:52 mike -# dev -# -# Revision 1.5 2000/03/07 18:27:40 mike -# dev -# -# Revision 1.4 2000/03/07 02:00:26 mike -# Defined gatekeeper and top level admin service -# -# Revision 1.3 2000/03/03 14:16:14 mike -# Get clean rule right. -# -# Revision 1.2 2000/02/16 01:19:11 mike -# dev -# -# Revision 1.1 2000/02/15 21:20:31 mike -# created. -# -# - -#LOCAL_JFLAGS= -bootclasspath $(CLASSPATH):$(JDKDIR)/jre/lib/rt.jar - -# MJM 3/10/00 - use the -i2jpackage option to prevent the 'lrgs' prefix -# from applying to CosPropertyService. -LOCAL_IDLFLAGS=-I../.. -d ../.. -p lrgs - -#LOCAL_IDLFLAGS=-I../.. -d ../.. -i2jpackage apicommon:lrgs.apicommon \ -# -i2jpackage apiadmin:lrgs.apiadmin -# -i2jpackage CosPropertyService:org.omg.CosPropertyService - - -# -# The following source files are created by hand. All other java files -# in this directory will be generated by IDL. -# -JSRC = AdminParams.java \ - LrgsConfigurationImpl.java LrgsAdminServiceImpl.java \ - LrgsGateKeeperImpl.java LrgsControllerImpl.java LrgsDeviceImpl.java \ - LrgsPropertySetImpl.java LrgsAdminServer.java \ - AuthenticatorString.java AdminClient.java AutoStartProperties.java - -JCLASS = ${JSRC:.java=.class} - -# -# Putting PropertySet.java in the list will force IDL to get run before -# anything else is compiled. -# -all: LrgsConfiguration.java ${JCLASS} - -include ${SRCROOT}/Makefile.Common - -install: - -depends: - -dos: LrgsConfiguration.java \ - AdminParams.class \ - LrgsConfigurationImpl.class LrgsAdminServiceImpl.class \ - LrgsGateKeeperImpl.class LrgsControllerImpl.class LrgsDeviceImpl.class \ - LrgsPropertySetImpl.class \ - AuthenticatorString.class AdminClient.class AutoStartProperties.class - -#----- -LrgsConfiguration.java: apiadmin.idl - $(IDL) $(IDLFLAGS) $< - -clean: - -rm -r ./jsrc ; \ - mkdir ./jsrc - mv $(JSRC) ./jsrc - -rm *.java - mv ./jsrc/* . - rmdir ./jsrc - -rm *.class diff --git a/src/main/java/lrgs/apistatus/Makefile b/src/main/java/lrgs/apistatus/Makefile deleted file mode 100644 index 9834758b3..000000000 --- a/src/main/java/lrgs/apistatus/Makefile +++ /dev/null @@ -1,83 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:11 cvs -# Added legacy code to repository -# -# Revision 1.10 2003/07/21 15:46:24 mjmaloney -# *** empty log message *** -# -# Revision 1.9 2001/01/27 14:35:10 mike -# dev -# -# Revision 1.8 2000/05/17 00:36:32 mike -# Implemented LongevityTest to trouble-shoot tracking problem -# -# Revision 1.7 2000/03/27 02:18:58 mike -# Added Util -# -# Revision 1.6 2000/03/05 01:05:07 mike -# dev -# -# Revision 1.5 2000/03/04 02:27:04 mike -# Implementing API... -# -# Revision 1.4 2000/03/03 21:00:33 mike -# interim -# -# Revision 1.3 2000/03/03 17:01:40 mike -# interim -# -# Revision 1.2 2000/03/03 14:17:50 mike -# Get clean rule right. -# -# Revision 1.1 2000/02/17 13:47:48 mike -# created -# -# - -#LOCAL_JFLAGS= -bootclasspath $(CLASSPATH):$(JDKDIR)/jre/lib/rt.jar -LOCAL_IDLFLAGS=-I../.. -d ../.. -p lrgs - -# -# The following source files are created by hand. All other java files -# in this directory will be generated by IDL. -# -JSRC = LrgsStatusImpl.java LrgsStatusServer.java testclient.java \ - DownLinkUtil.java LongevityTest.java - -JCLASS = ${JSRC:.java=.class} - -# -# Putting LrgsStatus.java in the list will force IDL to get run before -# anything else is compiled. -# -all: LrgsStatus.java ${JCLASS} - -include ${SRCROOT}/Makefile.Common - -install: - -depends: - -dos: LrgsStatus.java LrgsStatusImpl.class testclient.class DownLinkUtil.class \ - LongevityTest.class - -#----- -LrgsStatus.java: LrgsStatus.idl - $(IDL) $(IDLFLAGS) $< - -clean: - -rm -r ./jsrc ; \ - mkdir ./jsrc - mv $(JSRC) ./jsrc - -rm *.java - mv ./jsrc/* . - rmdir ./jsrc - -rm *.class - diff --git a/src/main/java/lrgs/common/Makefile b/src/main/java/lrgs/common/Makefile deleted file mode 100644 index fe4333884..000000000 --- a/src/main/java/lrgs/common/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:12 cvs -# Added legacy code to repository -# -# Revision 1.10 2005/03/07 21:35:25 mjmaloney -# dev -# -# Revision 1.9 2003/04/05 17:57:22 mjmaloney -# Added DcpMsgFlag -# -# Revision 1.8 2000/03/31 16:10:26 mike -# Added LrgsErrorCode -# -# Revision 1.7 2000/03/19 22:02:08 mike -# Created ConfigEntry and ConfigSet classes. -# -# Revision 1.6 2000/01/07 23:05:05 mike -# Generic ldds client interface -# -# Revision 1.5 1999/12/01 19:42:59 mike -# Implemented java install stuff. -# -# Revision 1.4 1999/10/15 10:12:54 mike -# Moved LddsInputStream to common from package lrgs.ldds. Clients will need -# to use this class so it should be in the common package. -# -# Revision 1.3 1999/10/15 10:05:01 mike -# Moved to common from package ldds. Clients will need this class too. -# -# Revision 1.2 1999/09/27 20:17:39 mike -# 9/27/1999 -# -# Revision 1.1 1999/09/24 20:18:45 mike -# 9/24/1999 -# -# - -JSRC = DcpAddress.java DcpNameMapper.java NetlistReader.java \ - NetworkList.java NetworkListItem.java SearchCriteria.java \ - SearchCritTest.java DcpMsgIndex.java DcpMsg.java DcpMsgSource.java \ - DcpMsgRetriever.java ConfigEntry.java ConfigSet.java LrgsErrorCode.java \ - DcpMsgFlag.java \ - ArchiveException.java \ - ArchiveUnavailableException.java \ - NoSuchMessageException.java \ - SearchSyntaxException.java \ - SearchTimeoutException.java \ - EndOfArchiveException.java \ - UntilReachedException.java - -JCLASS = ${JSRC:.java=.class} - -all: ${JCLASS} - -include ${SRCROOT}/Makefile.Common - -install: - -depends: - diff --git a/src/main/java/lrgs/domsatrecv/DomsatDpc.java b/src/main/java/lrgs/domsatrecv/DomsatDpc.java deleted file mode 100644 index 86229fdb2..000000000 --- a/src/main/java/lrgs/domsatrecv/DomsatDpc.java +++ /dev/null @@ -1,274 +0,0 @@ -/* -* $Id$ -* -* This is open-source software written by Sutron Corporation, under -* contract to the federal government. You are free to copy and use this -* source code for your own purposes, except that no part of the information -* contained in this file may be claimed to be proprietary. -* -* Except for specific contractual terms between Sutron and the federal -* government, this source code is provided completely without warranty. -* For more information contact: tempest@sutron.com -* -*/ -package lrgs.domsatrecv; - -import java.io.IOException; -import java.io.InputStream; -import java.net.SocketTimeoutException; - -import ilex.util.Logger; -import ilex.net.BasicClient; - -import lrgs.lrgsmain.LrgsConfig; - -/** -This defines the interface to code controlling the DOMSAT interface. -*/ -public class DomsatDpc - extends BasicClient - implements DomsatHardware -{ - private boolean _enabled = false; - private String errMsg = ""; - - // DPC Frames are Start with 2-byte length, then Addr=0x01, Ctrl=0x00, - // Grp=0x10, Chan=0x00, Seq/Mor, 16-bit Msg Seq, PktSeq/Dup - // The strategy: - // HuntMode looks for (01 00 10 00) and then backs up 2 bytes ==> LenMSB - // LenMSB gets the MSB of the 2-byte packet len - // LenLSB gets the LSB of the 2-byte packet len & checks reasonableness - // DATA gets the specified # of data bytes, & returns the packet ==>LenMSB - enum STATE { HUNT, LEN_MSB, LEN_LSB, DATA }; - private STATE state = STATE.HUNT; - private byte[] packetbuf = null; - private int packetLen = 0; - private int packetIdx = 0; - private byte[] huntbuf = new byte[6]; - private int huntlen = 0; - private int lenmsb; - private int huntDiscarded = 0; - - /** - * Constructor. - */ - public DomsatDpc() - { - super("localhost", 9000); - } - - /** Initializes the interface. */ - public int init() - { - // Host & Port stored in BasicClient base-class. - setHost(LrgsConfig.instance().dpcHost); - setPort(LrgsConfig.instance().dpcPort); - - Logger.instance().info(DomsatRecv.module + ":" - + (-DomsatRecv.EVT_HW_INIT_FAILED) - + " DOMSAT DPC Interface Configured to '" - + getName() + "'"); - - return 0; - } - - /** Enable/Disable the interface. */ - public boolean setEnabled(boolean enable) - { - // If I'm RE-enabling, disable first, then enable. - if (enable && _enabled) - setEnabled(false); - _enabled = enable; - - if (enable) - { - init(); - Logger.instance().info(DomsatRecv.module + " Connecting to DOMSAT DPC at '" - + getName() + "'"); - try - { - connect(); - startHunt(); - } - catch(Exception ex) - { - errMsg = - DomsatRecv.module + ":" + DomsatRecv.EVT_HW_CANNOT_ENABLE - + " Cannot connect to DOMSAT Protocol Converter (DPC): " + ex; - Logger.instance().warning(errMsg); - _enabled = false; - return false; - } - - Logger.instance().info( - DomsatRecv.module + ":" + (-DomsatRecv.EVT_HW_CANNOT_ENABLE) - + " DOMSAT Protocol Converter (DPC) Connected."); - } - else - { - disconnect(); - Logger.instance().info(DomsatRecv.module - + " Disonnected from DOMSAT Proto Converter."); - } - return true; - } - - /** - * Retrieve a packet from the interface. - * @return length of the packet if one is available, -2=HW Failure, -1=Bad Frame, - * 0=short frame, -3=pause & try again - */ - public int getPacket(byte[] packetbuf) - { - Logger.instance().debug3(DomsatRecv.module + " DPC getPacket"); - - InputStream tInput = input; - - // If this method is called, then obviously I'm supposed to - // be enabled. This means the connection to the DPC failed. - // Periodically (every 30 seconds) retry. - if (!_enabled || tInput == null) - { - if (System.currentTimeMillis() - lastConnectAttempt >= 15000L) - { - if (!setEnabled(true)) - return -3; - } - return -3; - } - - this.packetbuf = packetbuf; - int n = 0; - try - { - while(tInput.available() > 0) - { - int byt = tInput.read(); - n++; - switch(state) - { - case HUNT: - if (huntlen < 6) - huntbuf[huntlen++] = (byte)byt; - else - { - huntbuf[0] = huntbuf[1]; - huntbuf[1] = huntbuf[2]; - huntbuf[2] = huntbuf[3]; - huntbuf[3] = huntbuf[4]; - huntbuf[4] = huntbuf[5]; - huntbuf[5] = (byte)byt; - huntDiscarded++; - } - if (huntlen == 6 - && huntbuf[2] == (byte)0x01 && huntbuf[3] == (byte)0x00 - && huntbuf[4] == (byte)0x10 && huntbuf[5] == (byte)0x00) - { - checkLen(huntbuf[0], huntbuf[1]); - if (state == STATE.DATA); - { - Logger.instance().info(DomsatRecv.module + - " HUNT state found HDML Header, starting read packet" - + ", len=" + packetLen - + ", discarded " + huntDiscarded - + " bytes hunting."); - // We already read 1st 4 packet bytes. - packetbuf[0] = huntbuf[2]; - packetbuf[1] = huntbuf[3]; - packetbuf[2] = huntbuf[4]; - packetbuf[3] = huntbuf[5]; - packetIdx = 4; - } - } - break; - case LEN_MSB: - lenmsb = byt; - state = STATE.LEN_LSB; - break; - case LEN_LSB: - checkLen(lenmsb, byt); - break; - case DATA: - packetbuf[packetIdx++] = (byte)byt; - if (packetIdx == packetLen) - { - if (packetbuf[0] != 0x01 || packetbuf[1] != 0x00 - || packetbuf[2] != 0x10 || packetbuf[3] != 0x00) - { - startHunt(); - errMsg = "Bad packet - invalid HDLC Header" - + " 0x" + packetbuf[0] - + " 0x" + packetbuf[1] - + " 0x" + packetbuf[2] - + " 0x" + packetbuf[3]; - return -1; - } - state = STATE.LEN_MSB; - return packetLen; - } - break; - } - } - } - catch(SocketTimeoutException ex) - { - Logger.instance().debug1(DomsatRecv.module - + " Timeout on DPC input socket."); - return -3; - } - catch(IOException ex) - { - Logger.instance().warning(DomsatRecv.module - + " DPC Connection error: " + ex); - Logger.instance().warning(DomsatRecv.module - + " Will attempt disconnect/reconnect."); - errMsg = "DPC Not Enabled."; - setEnabled(false); - try { Thread.sleep(5000L); } catch(Exception ex2) {} - setEnabled(true); - } - - return -3; // -3 means pause & try again later. - } - - private void checkLen(int msb, int lsb) - { - packetLen = ((msb&0xff) << 8) | (lsb&0xff); - if (packetLen >= 8 && packetLen <= packetbuf.length) - { - state = STATE.DATA; - packetIdx = 0; - } - else if (state != STATE.HUNT) - startHunt(); - } - - private void startHunt() - { - Logger.instance().info(DomsatRecv.module + " Entering HUNT state"); - state = STATE.HUNT; - huntlen = 0; - huntDiscarded = 0; - } - - /** Shuts down the interface. */ - public void shutdown() - { - setEnabled(false); - Logger.instance().info(DomsatRecv.module + " Closing DPC Interface"); - } - - public String getErrorMsg() - { - return errMsg; - } - - public void timeout() - { - Logger.instance().info(DomsatRecv.module - + " Reconnecting to DPC after timeout."); - setEnabled(false); - setEnabled(true); - } - -} diff --git a/src/main/java/lrgs/domsatrecv/DomsatFranklin.c b/src/main/java/lrgs/domsatrecv/DomsatFranklin.c deleted file mode 100644 index e869dd831..000000000 --- a/src/main/java/lrgs/domsatrecv/DomsatFranklin.c +++ /dev/null @@ -1,302 +0,0 @@ -/* -* $Id$ -* -* This is open-source software written by ILEX Engineering, Inc., under -* contract to the federal government. You are free to copy and use this -* source code for your own purposes, except that no part of the information -* contained in this file may be claimed to be proprietary. -* -* Except for specific contractual terms between ILEX and the federal -* government, this source code is provided completely without warranty. -* For more information contact: info@ilexeng.com -*/ - -/* -This file contains the native methods for the DomsatFranklin interface. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -static char errbuf[256]; -#define MSGS_PER_READ (256*7) /* max # that can be returned in 1 read */ -static struct ICPREADREQ icpReadReq; /* ICP Read Request structure */ -static int icpReadReqIndex; /* Current msg being processed in read request */ -static int icpReadReqCount; /* # of messages returned by last call to read() */static int icp188fd; /* File descriptor of ICP device driver */ -//static struct READ_TIMER_STRUCT icp188rts = { TIMER_ALWAYS_DELAY, HZ/3 }; -struct READ_TIMER_STRUCT icp188rts; -static char icpprogname[25]; -static char mypktbuf[16000]; - -int icp188load(int fd, const char *fname); -int icp188start(int fd); -extern char icperrbuf[]; -int icp188readNewMessages(void); - -/** -Open & bind socket to Franklin board driver. -*/ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatSangoma_initFranklin - (JNIEnv *env, jclass cls) -{ - /* Allocate receive data buffer and pointer table. Set up the - * request structure used for issuing read calls. - */ - icpReadReq.icpr_dsize = MSGS_PER_READ * 256; - icpReadReq.icpr_offset = (long *)malloc(MSGS_PER_READ * sizeof(long)); - icpReadReq.icpr_data = (unsigned char *)malloc(icpReadReq.icpr_dsize); - icpReadReq.icpr_status = 0; - icpReadReq.icpr_nmsg = 0; - icpReadReq.icpr_nerr = 0; - icpReadReq.icpr_lastmsg = 0; - icpReadReqIndex = 0; - icpReadReqCount = 0; - - /* Open the DOMSAT device specified in the configuration area. */ - if ((icp188fd = open("/dev/icp", O_RDWR)) == -1) - { - strcpy(errbuf, "Cannot open ICP188 node '/dev/icp'"); - return -1; - } - icp188rts.rts_timermode = TIMER_ALWAYS_DELAY; - icp188rts.rts_nticks = HZ/3; - ioctl(icp188fd, READ_TIMER, &icp188rts); - - return 0; -} - -/* -Enable the interface. -*/ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatFranklin_enable - (JNIEnv *env, jclass cls) -{ - icpReadReqIndex = 0; - - /* Download the ICP program. */ - if (icp188load(icp188fd, icpprogname) == -1) - { - sprintf(errbuf,"Cannot load '%s' (ICP Program): %s", - icpprogname, icperrbuf); - return -1; - } - - if (ioctl(icp188fd, DRIVER_RESET, (char *)0) == -1) - { - strcpy(errbuf, "ICP Ioctl error - could not reset."); - return -1; - } - - if (ioctl(icp188fd, DRIVER_DCPMSG, (char *)0) == -1) - { - strcpy(errbuf, - "ICP Ioctl error - could change mode to DRIVER_DCPMSG."); - return -1; - } - - if (icp188start(icp188fd) == -1) - { - strcpy(errbuf, - "ICP error - could not start embedded program: "); - strcat(errbuf, icperrbuf); - return -1; - } - - return 0; -} - -/* -Disable the interface. -*/ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatFranklin_disable - (JNIEnv *env, jclass cls) -{ - icpReadReqIndex = icpReadReqCount = icpReadReq.icpr_nmsg = 0; - return 0; -} - -/** -Read a packet from the board. -Return length on success, 0 on timeout (no data available currently), - -1 on a recoverable error, -2 on non-recoverable error -For Franklin board, a packet will always hold a complete message. -*/ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatFranklin_readPacket - (JNIEnv *env, jclass cls, jbyteArray jbuf) -{ - /* - * The icp read request structure acts as a cache. If it's empty - * attempt to read the next block of messages. - */ - if (icpReadReqIndex >= icpReadReqCount) - { - if (icp188readNewMessages() == -1) - return -1; - } - - /* If messages present in cache, return next one. */ - if (icpReadReqIndex < icpReadReqCount) - { - int idx = icpReadReqIndex++; - long offset = icpReadReq.icpr_offset[idx]; - struct ICP188_MSG_HEADER *mhp = - (struct ICP188_MSG_HEADER *)(icpReadReq.icpr_data + offset); - struct DCPMSG_DATA *mdp = - (struct DCPMSG_DATA *)(icpReadReq.icpr_data + offset +sizeof(*mhp)); - - /* validate bounds of message within buffer. */ - if (offset < 0 || offset > icpReadReq.icpr_dsize) - { - sprintf(errbuf, - "ICP Bounding Error: offset=%ld, i=%d, n=%d", - offset, idx, icpReadReqCount); - icpReadReqIndex = icpReadReqCount = 0; - return -1; - } - - /* Treat msgs with errors just like missing msgs. */ - if (mhp->m_flag & 0xbf00) /* ANY_ERROR */ - { - sprintf(errbuf, - "ICP Message Error: offset=%ld, i=%d, flag=0x%X", - offset, idx, mhp->m_flag); - return -1; - } - - /* Do sanity checks on message size. */ - if (mhp->m_size > 15787) - { - sprintf(errbuf,"Bad message size (%d): Skipped", mhp->m_size); - return -1; - } - if (idx < icpReadReqCount-1) // Not last msg in batch? - { - int k; // distance from this msg to next - k = icpReadReq.icpr_offset[idx+1] - - icpReadReq.icpr_offset[idx] - - sizeof(*mhp) - - mhp->m_size; - - if (k < 0 || k > 1) - { - int should = icpReadReq.icpr_offset[idx+1] - - icpReadReq.icpr_offset[idx] - - sizeof(*mhp); - - sprintf(errbuf, - "Bad msg size: m_size=%d, should=%d, idx=%d, offset[%d]=%ld, " - "offset[%d]=%ld, k=%d, nmsg=%d, %d msgs skipped", - mhp->m_size, should, idx, - idx, icpReadReq.icpr_offset[idx], - idx+1, icpReadReq.icpr_offset[idx+1], k, - icpReadReqCount, icpReadReqCount - idx); - icpReadReqIndex = icpReadReqCount = 0; - return -1; - } - } - - /* - * Need to make this entire message look like a single HDLC packet. - */ - mypktbuf[0] = 0; /* don't care */ - mypktbuf[1] = 0; /* don't care */ - mypktbuf[2] = 0; /* don't care */ - mypktbuf[3] = 0; /* don't care */ - mypktbuf[4] = (char)0; /* clear the more bit at 0x10 */ - mypktbuf[5] = (char)((mhp->m_num >> 8) & 0xff); - mypktbuf[6] = (char)(mhp->m_num & 0xff); - mypktbuf[7] = (char)1; /* 1st pkt of msg is always # 1 */ - - memcpy(mypktbuf+8, mdp, mhp->m_size); - - (*env)->SetByteArrayRegion(env, jbuf, 0, mhp->m_size + 8, mypktbuf); - return mhp->m_size + 8; - } - return 0; -} - -/** -Close the socket. -*/ -JNIEXPORT void JNICALL Java_lrgs_domsatrecv_DomsatFranklin_closeFranklin - (JNIEnv *env, jclass cls) -{ - close(icp188fd); -} - -/* -Place the last error message in the passed buffer. -*/ -JNIEXPORT void JNICALL Java_lrgs_domsatrecv_DomsatFranklin_getErrorMsg - (JNIEnv *env, jclass cls, jbyteArray buf) -{ - (*env)->SetByteArrayRegion(env, buf, (jsize)0, strlen(errbuf)+1, errbuf); -} - - -/* -* Call ICP driver to get a batch of messages. (ICP will -* return 0 after timeout period if no messages are received. -*/ -int icp188readNewMessages(void) -{ - icpReadReqIndex = icpReadReqCount = 0; - icpReadReqCount = read(icp188fd, &icpReadReq, MSGS_PER_READ); - if (icpReadReqCount < 0) - { - strcpy(errbuf, "ICP188 read error"); - - return -1; - } - else if (icpReadReqCount > 0) - { - return 0; - } - - /* else icpReadReqCount == 0, check for other status indicators */ - - /* - * Check for status information change from the ICP driver. Send events - * as appropriate. - */ - if (icpReadReq.icpr_status & ERR_HOST_TOO_SLOW) - { - strcpy(errbuf, "ICP Error: Host too slow."); - return -1; - } - - if (icpReadReq.icpr_status & ERR_FIXED_OOP) - { - strcpy(errbuf, "ICP Error: Fixed ICP out-of-phase."); - return -1; - } - - if (icpReadReq.icpr_status & ERR_OVERRUN) - { - strcpy(errbuf, "ICP Error: Receiver overrun."); - return -1; - } - - if (icpReadReq.icpr_status & ERR_CRC) - { - strcpy(errbuf, "ICP Error: CRC error(s)."); - return -1; - } - - return 0; -} - diff --git a/src/main/java/lrgs/domsatrecv/DomsatFranklin.h b/src/main/java/lrgs/domsatrecv/DomsatFranklin.h deleted file mode 100644 index 0af18ba09..000000000 --- a/src/main/java/lrgs/domsatrecv/DomsatFranklin.h +++ /dev/null @@ -1,61 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class lrgs_domsatrecv_DomsatFranklin */ - -#ifndef _Included_lrgs_domsatrecv_DomsatFranklin -#define _Included_lrgs_domsatrecv_DomsatFranklin -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: lrgs_domsatrecv_DomsatFranklin - * Method: initFranklin - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatFranklin_initFranklin - (JNIEnv *, jclass); - -/* - * Class: lrgs_domsatrecv_DomsatFranklin - * Method: readPacket - * Signature: ([B)I - */ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatFranklin_readPacket - (JNIEnv *, jclass, jbyteArray); - -/* - * Class: lrgs_domsatrecv_DomsatFranklin - * Method: closeFranklin - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_lrgs_domsatrecv_DomsatFranklin_closeFranklin - (JNIEnv *, jclass); - -/* - * Class: lrgs_domsatrecv_DomsatFranklin - * Method: enable - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatFranklin_enable - (JNIEnv *, jclass); - -/* - * Class: lrgs_domsatrecv_DomsatFranklin - * Method: disable - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatFranklin_disable - (JNIEnv *, jclass); - -/* - * Class: lrgs_domsatrecv_DomsatFranklin - * Method: getErrorMsg - * Signature: ([B)V - */ -JNIEXPORT void JNICALL Java_lrgs_domsatrecv_DomsatFranklin_getErrorMsg - (JNIEnv *, jclass, jbyteArray); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/main/java/lrgs/domsatrecv/DomsatFranklin.java b/src/main/java/lrgs/domsatrecv/DomsatFranklin.java deleted file mode 100644 index 5ca7ffb42..000000000 --- a/src/main/java/lrgs/domsatrecv/DomsatFranklin.java +++ /dev/null @@ -1,190 +0,0 @@ -/* -* $Id$ -* -* This is open-source software written by ILEX Engineering, Inc., under -* contract to the federal government. You are free to copy and use this -* source code for your own purposes, except that no part of the information -* contained in this file may be claimed to be proprietary. -* -* Except for specific contractual terms between ILEX and the federal -* government, this source code is provided completely without warranty. -* For more information contact: info@ilexeng.com -* -*/ -package lrgs.domsatrecv; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -import ilex.util.ArrayUtil; -import ilex.util.EnvExpander; -import ilex.util.Logger; - -/** -DOMSAT Interface code for the Franklin Telecom ICP188 board. -*/ -public class DomsatFranklin - implements DomsatHardware -{ - /** - * Constructor. - */ - public void DomsatFranklin() - { - } - - /** Initializes the interface. */ - public int init() - { - if (initFranklin() != 0) - { - Logger.instance().failure( - DomsatRecv.module + ":" + DomsatRecv.EVT_HW_INIT_FAILED - + " " + getErrorMsg()); - return -1; - } - Logger.instance().info(DomsatRecv.module + ":" - + (-DomsatRecv.EVT_HW_INIT_FAILED) - + " DOMSAT Hardware Initialization Success."); - return 0; - } - - /** Enable/Disable the interface. */ - public boolean setEnabled(boolean enabled) - { - if (enabled) - { - Logger.instance().info(DomsatRecv.module + " Enabling DOMSAT HW"); - if (enable() != 0) - { - Logger.instance().failure( - DomsatRecv.module + ":" + DomsatRecv.EVT_HW_CANNOT_ENABLE - + " " + getErrorMsg()); - disable(); - return false; - } - else - Logger.instance().info( - DomsatRecv.module + ":" + (-DomsatRecv.EVT_HW_CANNOT_ENABLE) - + " DOMSAT Enabled."); - } - else - { - Logger.instance().info(DomsatRecv.module - + " Disabling DOMSAT interface."); - disable(); - } - return true; - } - - /** - * Retrieve a packet from the interface. - * @return the byte[] packet if one is available, or null if none. - */ - public int getPacket(byte[] packetbuf) - { - Logger.instance().debug1(DomsatRecv.module + " Calling readPacket()"); - int r = readPacket(packetbuf); - Logger.instance().debug1(DomsatRecv.module + " readPacket() returned " + r); - return r; - } - - /** Shuts down the interface. */ - public void shutdown() - { - setEnabled(false); - Logger.instance().info("Closing Franklin Driver"); - closeFranklin(); - } - - public String getErrorMsg() - { - byte buf[] = new byte[512]; - getErrorMsg(buf); - int n=0; - for(; n<512 && buf[n] != (byte)0; n++); - - return new String(buf, 0, n); - } - - /** - * Opens and binds the socket to the sangoma board. - * @return 0 if success, or negative error code. - */ - private native static int initFranklin(); - - /** - * Reads a packet of data from the sangoma board. - * @return number of bytes read, 0 if no data available, or - * negative error code. - */ - private native static int readPacket(byte[] buf); - - /** - * Closes the sangoma board interface. - */ - private native static void closeFranklin(); - - /** - * Enable data reception. - */ - private native static int enable(); - - /** - * Disable data reception. - */ - private native static int disable(); - - /** - * Return a string explanation of the last error. - */ - private native static void getErrorMsg(byte[] buf); - - static // Static initializer to load native library - { - // Note: Franklin board not supported on Windows. - System.loadLibrary("domsat." + getOsSuffix()); - - - } - - public static String getOsSuffix() - { - String osn = System.getProperty("os.name"); - if (osn == null) - return "unknown"; - osn = osn.toLowerCase(); - if (osn.startsWith("win")) - return "win"; - else if (osn.startsWith("sunos")) - return "sol10"; - try - { - Process uname = Runtime.getRuntime().exec("uname -rp"); - InputStreamReader isr = new InputStreamReader( - uname.getInputStream()); - BufferedReader bis = new BufferedReader(isr); - String line = bis.readLine(); - - // RHEL3 is Kernel version 2.4.xxxxx - if (line.startsWith("2.4")) - return "el3.32"; - int bits = 32; - String n = System.getProperty("sun.arch.data.model"); - if (n != null && n.contains("64")) - bits = 64; - int rhelVersion = line.contains("el5") ? 5 : 4; - return "el" + rhelVersion + "." + bits; - } - catch(IOException ex) - { - return "unknown"; - } - } - - public void timeout() - { - } -} - diff --git a/src/main/java/lrgs/domsatrecv/DomsatHardware.java b/src/main/java/lrgs/domsatrecv/DomsatHardware.java deleted file mode 100644 index 1de288a28..000000000 --- a/src/main/java/lrgs/domsatrecv/DomsatHardware.java +++ /dev/null @@ -1,84 +0,0 @@ -/* -* $Id$ -* -* This is open-source software written by ILEX Engineering, Inc., under -* contract to the federal government. You are free to copy and use this -* source code for your own purposes, except that no part of the information -* contained in this file may be claimed to be proprietary. -* -* Except for specific contractual terms between ILEX and the federal -* government, this source code is provided completely without warranty. -* For more information contact: info@ilexeng.com -* -* $Log$ -* Revision 1.5 2009/10/26 14:08:30 mjmaloney -* Don't hangup on large seq# gap. -* -* Revision 1.4 2009/09/09 13:39:37 mjmaloney -* timeout recovery for DPC -* -* Revision 1.3 2009/07/21 17:17:40 mjmaloney -* dev -* -* Revision 1.2 2008/06/10 21:39:52 cvs -* dev -* -* Revision 1.1 2008/04/04 18:21:12 cvs -* Added legacy code to repository -* -* Revision 1.4 2005/10/10 19:44:24 mmaloney -* dev -* -* Revision 1.3 2005/08/09 18:20:00 mjmaloney -* dev -* -* Revision 1.2 2005/08/08 18:09:41 mjmaloney -* HW Interface complete. -* -* Revision 1.1 2005/08/07 20:42:46 mjmaloney -* Created. -* -*/ -package lrgs.domsatrecv; - -/** -This defines the interface to code controlling the DOMSAT interface. -*/ -public interface DomsatHardware -{ - /** - * One-time initialization. - * @return 0 if OK, -1 if error. - */ - public int init(); - - /** - * Enable/Disable the interface. - * If not successful, generate appropriate events & return false. - * @return true if successful, -1 if not. - */ - public boolean setEnabled(boolean enabled); - - /** - * Retrieve a packet from the interface. - * @return length (>0) on success, 0 if no data available, - * -1 if recoverable packet error, -2 if hardware interface error. - */ - public int getPacket(byte[] packetbuf); - - /** - * @return last message for last error asserted by this device. - */ - public String getErrorMsg(); - - /** Shuts down the interface. */ - public void shutdown(); - -// /** Resets interface after an anomaly, like impossibly large gap. */ -// public void reset(); - - /** gives the unit a chance to do something on timeout. */ - public void timeout(); - -} - diff --git a/src/main/java/lrgs/domsatrecv/DomsatRecv.java b/src/main/java/lrgs/domsatrecv/DomsatRecv.java deleted file mode 100644 index 3ca3b70a8..000000000 --- a/src/main/java/lrgs/domsatrecv/DomsatRecv.java +++ /dev/null @@ -1,620 +0,0 @@ -/* -* $Id$ -* -* This is open-source software written by ILEX Engineering, Inc., under -* contract to the federal government. You are free to copy and use this -* source code for your own purposes, except that no part of the information -* contained in this file may be claimed to be proprietary. -* -* Except for specific contractual terms between ILEX and the federal -* government, this source code is provided completely without warranty. -* For more information contact: info@ilexeng.com -*/ -package lrgs.domsatrecv; - -import java.io.File; -import java.util.Date; - -import ilex.util.ByteUtil; -import ilex.util.Logger; -import ilex.util.EnvExpander; - -import lrgs.common.BadConfigException; -import lrgs.common.DcpAddress; -import lrgs.common.DcpMsg; -import lrgs.common.DcpMsgFlag; -import lrgs.lrgsmain.JavaLrgsStatusProvider; -import lrgs.lrgsmain.LrgsMain; -import lrgs.lrgsmain.LrgsConfig; -import lrgs.lrgsmain.LrgsInputInterface; -import lrgs.lrgsmain.LrgsInputException; -import lrgs.archive.MsgArchive; -import lrgs.drgs.DrgsInputSettings; -import lrgs.db.LrgsConstants; -import lrgs.db.LrgsDatabaseThread; -import lrgs.db.Outage; - -/** Main class for the LRGS-DOMSAT Input Process. */ -public class DomsatRecv - extends Thread - implements LrgsInputInterface -{ - /** Module name for log messages. */ - public static final String module = "DomsatRecv"; - - /** Event number meaning hardware init problem */ - public static final int EVT_HW_INIT_FAILED = 1; - - /** Event number meaning could not enable. */ - public static final int EVT_HW_CANNOT_ENABLE = 2; - - /** Event number meaning hardware problem during read. */ - public static final int EVT_HW_READ_FAILED = 3; - - /** Event number meaning hardware returned bad packet. */ - public static final int EVT_HW_BAD_PACKET = 4; - - /** Event number meaning hardware timeout . */ - public static final int EVT_HW_TIMEOUT = 5; - - /** Event number meaning hardware timeout . */ - public static final int EVT_DOMSAT_SEQ = 6; - - /** We check for config changes this often. */ - private static final long cfgCheckTime = 5000L; - - /** LrgsMain provides links to other modules. */ - private LrgsMain lrgsMain; - - /** Messages are archived here. */ - private MsgArchive msgArchive; - - /** Last time that settings were read, used to detect changes. */ - private long lastConfigRead; - - /** shutdown flag. */ - private boolean isShutdown; - - /** current status code (see LrgsInputInterface) */ - private int statusCode; - - /** Explanatory status string */ - private String status; - - /** My slot */ - private int slot; - - /** enable flag */ - public boolean isEnabled; - - /** Interface to the DOMSAT Hardware. */ - public DomsatHardware domsatHardware; - - /** Used to read a single packet from the hardware. */ - private byte[] packetbuf; - - /** Used to build the entire message. */ - private byte[] msgbuf; - - /** Current amount of data waiting in msgbuf. */ - private int msgbuflen; - - /** Msg sequence number of last frame received. */ - private int lastMsgSeq; - - /** Pkt sequence number of last frame received. */ - private int lastPktSeq; - - /** Time that last packet was received from hardware. */ - private long lastPktRecvTime; - - /** Last complete DOMSAT message received (for msg sequence checking) */ - private int lastCompleteMsgSeq; - - /** Time that last complete DOMSAT message received */ - private long lastCompleteMsgTime; - - /** Buffer in which to construct complete messages. */ - private byte[] msgBuf; - - /** Current # bytes in the buffer. */ - private int msgBufLen; - - /** The status gatherer */ - private JavaLrgsStatusProvider statusProvider; - - /** The data source ID that I should use. */ - private int dataSourceId; - - /** Asserted when we are in a timeout situation. */ - private Outage currentRtOutage = null; - - private long lastTimeoutTweek = 0L; - - /** - Constructor called from main. - */ - public DomsatRecv(LrgsMain lrgsMain, MsgArchive msgArchive, - JavaLrgsStatusProvider statusProvider) - { - this.lrgsMain = lrgsMain; - this.msgArchive = msgArchive; - this.statusProvider = statusProvider; - lastConfigRead = 0L; - isShutdown = false; - statusCode = DL_INIT; - status = "Initializing"; - slot = -1; - isEnabled = false; - - // MJM 2006 09/23 - Franklin interface will always return an entire - // message as a single packet. Therefore packetbuf must be able to - // accomodate the largest possible message. - packetbuf = new byte[16000]; - // packetbuf = new byte[512]; - msgbuf = new byte[20000]; - msgbuflen = 0; - lastMsgSeq = -1; - lastPktSeq = -1; - lastCompleteMsgSeq = -1; - lastPktRecvTime = 0L; - msgBuf = new byte[20000]; - msgBufLen = 0; - lastCompleteMsgTime = 0L; - Logger.instance().debug3(module + " created."); - String clsname = LrgsConfig.instance().domsatClass; - try - { - ClassLoader cl = ClassLoader.getSystemClassLoader(); - Class domsatClass = cl.loadClass(clsname); - domsatHardware = (DomsatHardware)domsatClass.newInstance(); - } - catch(Exception ex) - { - Logger.instance().failure(module + ":" + EVT_HW_INIT_FAILED - + " Cannot load domsat interface from class name '" - + clsname + "': " + ex); - domsatHardware = new DomsatSangoma(); - } - dataSourceId = - lrgsMain.getDbThread().getDataSourceId(DL_DOMSAT_TYPESTR, "DOMSAT"); - } - - /** Main thread run method. */ - public void run() - { - Logger.instance().info(module + " starting."); - //checkConfig(); - - statusCode = DL_ACTIVE; - status = "Active"; - - long lastCfgCheck = 0L; - lastPktRecvTime = System.currentTimeMillis(); - while(!isShutdown) - { - if (System.currentTimeMillis() - lastCfgCheck > cfgCheckTime) - { - checkConfig(); - lastCfgCheck = System.currentTimeMillis(); - } - if (!isEnabled) - { - try { sleep(1000L); } catch(InterruptedException ex) {} - continue; - } - long now = System.currentTimeMillis(); - - boolean pause = false; - int n = domsatHardware.getPacket(packetbuf); -/* -System.out.println( -" java: len=" + n + " " -+ Integer.toHexString((int)packetbuf[0] & 0xff) + ", " -+ Integer.toHexString((int)packetbuf[1] & 0xff) + ", " -+ Integer.toHexString((int)packetbuf[2] & 0xff) + ", " -+ Integer.toHexString((int)packetbuf[3] & 0xff) + ", " -+ Integer.toHexString((int)packetbuf[4] & 0xff) + ", " -+ Integer.toHexString((int)packetbuf[5] & 0xff) + ", " -+ Integer.toHexString((int)packetbuf[6] & 0xff) + ", " -+ Integer.toHexString((int)packetbuf[7] & 0xff) + ", ... " -+ Integer.toHexString((int)packetbuf[n-2] & 0xff) + ", " -+ Integer.toHexString((int)packetbuf[n-1] & 0xff)); -*/ - if (n == -2) - { - Logger.instance().failure(module + ":" + EVT_HW_READ_FAILED - + "- " + domsatHardware.getErrorMsg()); - status = "HWErr"; - pause = true; - } - else if (n == -1) - { - Logger.instance().warning(module - + " Bad Frame: " + domsatHardware.getErrorMsg()); - } - else if (n == -3) - { - // Do nothing - this means pause & try again later. - pause = true; - } - else if (n == 0) - { - Logger.instance().debug1(module - + " Short Frame: " + domsatHardware.getErrorMsg()); - pause = true; - } - else if (n < 8) - { - Logger.instance().warning(module - + " Ignoring too-small frame (" + n + " bytes)"); - } - else // n >= 8 - { - lastPktRecvTime = now; - status = "Active"; - if (statusCode != DL_ACTIVE) - { - if (statusCode == DL_TIMEOUT) - Logger.instance().info(module+":"+(-EVT_HW_TIMEOUT) - + " DOMSAT Link Recovered."); - statusCode = DL_ACTIVE; - if (currentRtOutage != null) - { - currentRtOutage.setEndTime(new Date(now)); - currentRtOutage = null; - } - } - processPacket(packetbuf, n); - } - - if (statusCode == DL_ACTIVE - && now - lastPktRecvTime > - (LrgsConfig.instance().domsatTimeout * 1000L)) - { - statusCode = DL_TIMEOUT; - status = "Timeout"; - lastTimeoutTweek = now; - Logger.instance().warning(module + ":" + EVT_HW_TIMEOUT - + " No data in more than 60 seconds."); - - currentRtOutage = new Outage(); - currentRtOutage.setOutageType(LrgsConstants.realTimeOutageType); - currentRtOutage.setBeginTime(new Date(lastPktRecvTime - 5000L)); - LrgsDatabaseThread.instance().assertOutage(currentRtOutage); - domsatHardware.timeout(); - } - else if (statusCode == DL_TIMEOUT - && now - lastTimeoutTweek > 60000L) - { - lastTimeoutTweek = now; - Logger.instance().info("DOMSAT still in timeout."); - domsatHardware.timeout(); - } - - if (pause) - { - try { Thread.sleep(50L); } - catch(InterruptedException ex) {} - } - } - - domsatHardware.shutdown(); - statusCode = DL_DISABLED; - status = "Shutdown"; - } - - /** - * Check the configuration file to see if it has changed. If so, reload - * it and put the changes into effect. - */ - private void checkConfig() - { - Logger.instance().debug3(module + " checkConfig"); - - if (isEnabled != LrgsConfig.instance().enableDomsatRecv) - do_enableLrgsInput(LrgsConfig.instance().enableDomsatRecv); - - } - - /** - * Process the passed packet. - * @param packet the packet. - * @param len the length of the packet. - */ - private void processPacket(byte[] packet, int len) - { - int msgseq = - ((((int)packet[5]) & 0xff) << 8) - | (((int)packet[6]) & 0xff); - int pktseq = packet[7] & 0x7F; - - if (msgseq == lastMsgSeq) // Continuation of previous message? - { - if (pktseq == lastPktSeq + 1) - { - addToBuf(packet, len, msgseq); - lastPktSeq = pktseq; - } - else - { - // MJM - reduced this to debug, because it always leads to - // a msg seq error in the log. This is too much noise. - Logger.instance().debug1( - module + " Packet Sequence Error, got " - + msgseq + ":" + pktseq + " expected " + msgseq - + ":" + (lastPktSeq+1) + " -- discarded."); - lastPktSeq = 0; - } - } - else // this is start of new message. - { - flushBuf(); // In case buffer not empty, flush it. - - if (pktseq == 1) - { - addToBuf(packet, len, msgseq); - lastPktSeq = pktseq; - } - else - { - Logger.instance().warning(module - + " Bad start packet, got " - + msgseq + ":" + pktseq + " expected " + msgseq - + ":1 -- discarded."); - lastPktSeq = 0; - } - } - - lastMsgSeq = msgseq; - } - - private void addToBuf(byte[] packet, int len, int msgseq) - { - for(int i=8; i 0) - { - Logger.instance().debug1(module + " discarding " + msgBufLen - + " bytes."); - msgBufLen = 0; - } - } - - private void checkDomsatSeq(int msgseq, long dcpaddr) - { - long now = System.currentTimeMillis(); - if (lastCompleteMsgSeq == -1) // This is the first msg since init. - { - // 1st msg ever -- do nothing. - Logger.instance().info(module + " Received first Message seqnum=" - + msgseq); - } - else - { - int expect = (lastCompleteMsgSeq + 1) % 0x10000; - if (msgseq != expect) - { - int circ_dist = msgseq - lastCompleteMsgSeq; - if (circ_dist < 0) - circ_dist += 0x10000; - int numMissing = circ_dist - 1; - - if (dcpaddr == DcpAddress.DapsSwitchoverAddr - || (numMissing > 100 && msgseq <= 2)) - { - Logger.instance().info(module - + " DAPS Switchover detected."); - } - else - { - /* Check for suspiciously large gaps. (> 30 drops/sec) */ - int elapsedSec = (int)((now-lastCompleteMsgTime)/1000L) + 1; - if (numMissing > elapsedSec * 30) - { - Logger.instance().warning(module + - " Ignoring large gap (" + numMissing - + " dropped in only " + elapsedSec + " seconds)."); -// domsatHardware.reset(); - } - else - { - Logger.instance().warning(module + ":" - + EVT_DOMSAT_SEQ + "- Sequence Gap: " - + lastCompleteMsgSeq + "," + numMissing); - statusProvider.domsatDropped(numMissing, - (int)(now / 1000L), expect, elapsedSec); - Outage otg = new Outage(); - otg.setOutageType(LrgsConstants.domsatGapOutageType); - Date startDate = new Date(now - elapsedSec*1000L); - Date endDate = new Date(now); - otg.setBeginTime(startDate); - otg.setEndTime(endDate); - otg.setBeginSeq(expect); - int gapEnd = msgseq - 1; - if (gapEnd < 0) - gapEnd = 65535; - if (gapEnd < expect) - { - // Gap occurred during wrap - have to generate 2 - // outages. - otg.setEndSeq(65535); - LrgsDatabaseThread.instance().assertOutage(otg); - otg = new Outage(); - otg.setOutageType( - LrgsConstants.domsatGapOutageType); - otg.setBeginTime(startDate); - otg.setEndTime(endDate); - otg.setBeginSeq(0); - } - otg.setEndSeq(gapEnd); - LrgsDatabaseThread.instance().assertOutage(otg); - } - } - } - } - lastCompleteMsgTime = now; - lastCompleteMsgSeq = msgseq; - } - //===================================================================== - // Methods from LrgsInputInterface - //===================================================================== - - /** - * @return the type of this input interface. - */ - public int getType() { return DL_DOMSAT; } - - /** - * All inputs must keep track of their 'slot', which is a unique index - * into the LrgsMain's vector of all input interfaces. - * @param slot the slot number. - */ - public void setSlot(int slot) { this.slot = slot; } - - /** @return the slot numbery that this interface was given at startup */ - public int getSlot() { return this.slot; } - - /** - * @return the name of this interface. - */ - public String getInputName() { return module; } - - /** - * Initializes the interface. - * May throw LrgsInputException when an unrecoverable error occurs. - */ - public void initLrgsInput() - throws LrgsInputException - { - Logger.instance().info(module + " initLrgsInput()"); - if (domsatHardware.init() != 0) - { - throw new LrgsInputException("DOMSAT Hardware Init Failed: " - + domsatHardware.getErrorMsg()); - } - this.start(); - } - - /** - * Shuts down the interface. - * Any errors encountered should be handled within this method. - */ - public void shutdownLrgsInput() - { - Logger.instance().info(module + " Shutting down."); - isShutdown = true; - } - - /** - * Enable or Disable the interface. - * The interface should only attempt to archive messages when enabled. - * @param enabled true if the interface is to be enabled, false if disabled. - */ - public void enableLrgsInput(boolean enabled) {} - - // DOMSAT receiv thread will manage it's own enable/disable. - public void do_enableLrgsInput(boolean enabled) - { - if (isEnabled && !enabled) - { - statusCode = DL_DISABLED; - status = "Disabled"; - domsatHardware.setEnabled(enabled); - isEnabled = false; - Logger.instance().info(module + " " + status); - } - else if (!isEnabled && enabled) - { - statusCode = DL_ACTIVE; - status = "Active"; - lastPktRecvTime = System.currentTimeMillis(); - if (!domsatHardware.setEnabled(enabled)) - { - statusCode = DL_ERROR; - status = "Init-Failed"; - Logger.instance().warning(module + " " + status); - isEnabled = false; - } - else - { - isEnabled = true; - Logger.instance().info(module + " Enabled, acceptARMs=" - + LrgsConfig.instance().acceptDomsatARMs); - } - } - } - - /** - * @return true if this downlink can report a Bit Error Rate. - */ - public boolean hasBER() { return true; } - - /** - * @return the Bit Error Rate as a string. - */ - public String getBER() { return "89"; } - - /** - * @return true if this downlink assigns a sequence number to each msg. - */ - public boolean hasSequenceNums() { return true; } - - /** - * @return the numeric code representing the current status. - */ - public int getStatusCode() { return statusCode; } - - /** - * @return a short string description of the current status. - */ - public String getStatus() { return status; } - - public int getDataSourceId() { return dataSourceId; } - - /** @return true if this interface receives APR messages */ - public boolean getsAPRMessages() - { return LrgsConfig.instance().acceptDomsatARMs; } - - @Override - public String getGroup() { - // TODO Auto-generated method stub - return null; - } -} diff --git a/src/main/java/lrgs/domsatrecv/DomsatSangoma.c b/src/main/java/lrgs/domsatrecv/DomsatSangoma.c deleted file mode 100644 index ebbaedacc..000000000 --- a/src/main/java/lrgs/domsatrecv/DomsatSangoma.c +++ /dev/null @@ -1,313 +0,0 @@ -/* -* $Id$ -* -* Copyright Sutron Corporation - All Rights Reserved. -* No part of this file may be duplicated in either hard-copy or electronic -* form without specific written permission. -* -* $Log$ -* Revision 1.5 2010/05/04 15:25:24 mjmaloney -* Added hasCRC check. A142 boards don't include CRC. -* -* Revision 1.4 2010/01/20 12:50:17 mjmaloney -* Added fix for Sangoma 5.3 drivers, which now have 64 byte header. -* The new native module will detect the correct version and adjust -* accordingly. -* -* Revision 1.3 2008/11/29 21:08:02 mjmaloney -* merge with opensrc -* -* Revision 1.2 2008/06/10 21:39:52 cvs -* dev -* -* Revision 1.1 2008/04/04 18:21:12 cvs -* Added legacy code to repository -* -* Revision 1.7 2005/12/21 14:17:06 mmaloney -* LRGS 5.5 -* -* Revision 1.6 2005/12/20 19:58:11 mmaloney -* 5.5 release prep. -* -* Revision 1.5 2005/09/11 21:40:31 mjmaloney -* dev -* -* Revision 1.4 2005/08/21 14:18:03 mjmaloney -* LRGS 5.1 -* -* Revision 1.3 2005/08/17 22:08:01 mjmaloney -* dev -* -* Revision 1.2 2005/08/08 18:09:41 mjmaloney -* HW Interface complete. -* -* Revision 1.1 2005/08/08 14:46:32 mjmaloney -* Created. -* -*/ - -/* -This file contains the native methods for the DomsatSangoma interface. -*/ - -#include -#include -#include -#include -#include -#include "DomsatSangoma.h" -#include "sangoma_drv.h" - -static int wanpipe_proto; -static char *r_name = "wanpipe1"; -static char *i_name = "wp1_chdlc"; -static char *i_name_alt = "wp1chdlc"; -static char *i_name_alt2 = "w1g1"; -static int sock = -1; -static char errbuf[256]; -/*static char cbuf[MAX_FRAME_SIZE + sizeof(api_rx_hdr_t) + 2]; */ -/* MJM For driver v3.5, api_rx_hdr is now 64 bytes (used to be 16) */ -static char cbuf[MAX_FRAME_SIZE + 64 + 2]; -static int hasCRC = 1; - - -JNIEXPORT void JNICALL Java_lrgs_domsatrecv_DomsatSangoma_setInterfaceName - (JNIEnv *env, jclass cls, jstring ifName) -{ - const char *ncp = (*env)->GetStringUTFChars(env, ifName, NULL); - i_name = strdup(ncp); - (*env)->ReleaseStringUTFChars(env, ifName, ncp); -} - -/** -Open & bind socket to Sangoma board driver. -*/ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatSangoma_initSangoma - (JNIEnv *env, jclass cls) -{ - /* Determine what kernel version this is so I'll know what the protocol - * number to use: - * Before 2.4: AF_WANPIPE=24 - * 2.4 & later: AF_WANPIPE=25 - */ - char kversion[20]; - FILE *fp; - int k1, k2, k3, n; - - fp = fopen("/proc/version", "r"); - if (fp == NULL) - { - strcpy(errbuf,"Can't open /proc/version!"); - return -1; - } - kversion[0] = '\0'; - fscanf(fp,"%*s %*s %s", kversion); - fclose(fp); - - n = sscanf(kversion, "%d.%d.%d", &k1, &k2, &k3); - if (n < 3) - { - strcpy(errbuf, "Can't parse kernel version from /proc/version!!\n"); - return -1; - } - - /* Linux 2.4 & later uses protocol # 25 */ - if (k1 > 2 || (k1 == 2 && k2 >= 4)) - wanpipe_proto = 25; - else - wanpipe_proto = 24; - -/*printf("Sangoma-init: Linux Kernel %d.%d.%d, using protocol # %d", -k1, k2, k3, wanpipe_proto); -*/ - - return 0; -} - -/* -Enable the interface. -*/ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatSangoma_enable - (JNIEnv *env, jclass cls) -{ - struct wan_sockaddr_ll sa; - - memset(&sa,0,sizeof(struct wan_sockaddr_ll)); - sock = socket(wanpipe_proto, SOCK_RAW, 0); - if( sock < 0 ) - { - sprintf(errbuf, "Cannot create AF_WANPIPE socket, protocol %d", - wanpipe_proto); - return -1; - } - -/*printf("Connecting to router %s, interface %s", r_name, i_name); -*/ - - strcpy(sa.sll_device, i_name); - strcpy(sa.sll_card, r_name); - sa.sll_protocol = htons(PVC_PROT); - sa.sll_family = wanpipe_proto; - - if(bind(sock, (struct sockaddr *)&sa, sizeof(struct wan_sockaddr_ll)) < 0) - { - sprintf(errbuf, - "Failed to bind socket for router %s, interface %s, protocol %d", - r_name, i_name, wanpipe_proto); - strcpy(sa.sll_device, i_name_alt); - if(bind(sock, (struct sockaddr *)&sa, sizeof(struct wan_sockaddr_ll)) - < 0) - { - strcpy(sa.sll_device, i_name_alt2); - if(bind(sock, (struct sockaddr *)&sa, - sizeof(struct wan_sockaddr_ll)) < 0) - { - sprintf(errbuf, -"Failed to bind socket for router %s, interfaces %s, %s, or %s, protocol %d", - r_name, i_name, i_name_alt, i_name_alt2, wanpipe_proto); - return -1; - } - - /* A142 does not include CRC at end of packet */ - hasCRC = 0; - } - } - - return 0; -} - -/* -Disable the interface. -*/ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatSangoma_disable - (JNIEnv *env, jclass cls) -{ - if (sock != -1) - close(sock); - sock = -1; - return 0; -} - -/** -Read a packet from the board. -Return length on success, 0 on timeout (no data available currently), - -1 on a recoverable error, -2 on non-recoverable error -*/ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatSangoma_readPacket - (JNIEnv *env, jclass cls, jbyteArray jbuf) -{ - fd_set readfds; - struct timeval tv; - int r; - int pktlen; - api_rx_hdr_t *hdrp; - unsigned char *pbuf; - int hdr_size = sizeof(api_rx_hdr_t); - - if (sock == -1) - { - strcpy(errbuf, "Socket not open."); - return -2; - } - - FD_ZERO(&readfds); - FD_SET(sock, &readfds); - - tv.tv_sec = (long)5; - tv.tv_usec = 0L; - - r = select(sock+1, &readfds, NULL, NULL, &tv); - if (r < 0) - { - sprintf(errbuf, "select error, errno=%d", errno); - return -2; - } - else if (r == 0) - { - /* timeout */ - return 0; - } - else if (!FD_ISSET(sock, &readfds)) - { - strcpy(errbuf, "Data detected on wrong file descriptor -- ignored"); - return -1; - } - - r = recv(sock, cbuf, sizeof(cbuf), 0); - if (r < 0) - { - sprintf(errbuf, "Error %d from recv()", r); - return -1; - } - - /* Sangoma 3.5 driver has 64 byte header. Earlier versions had 16. - * Determine which this is and set hdr size appropriately. - * The new driver will null fill bytes 16 ... 63. - * Look for nulls in the position that my start pattern should be. - * HDLC Framing should always be 01 00 10 00 (hex). - */ - if (r > 64 - && (int)cbuf[16] == 0x00 && (int)cbuf[17] == 0x00 - && (int)cbuf[18] == 0x00 && (int)cbuf[19] == 0x00) - hdr_size = 64; - - // don't count wanpipe header or CRC -// if ((pktlen = r - sizeof(api_rx_hdr_t) - 2) <= 0) - pktlen = r - hdr_size; - if (hasCRC) - pktlen -= 2; - - if (pktlen <= 0) - { - sprintf(errbuf, - "Short (%d byte inc header+crc) frame received (hdr=%d) -- ignored", - r, hdr_size); - return 0; - } - - /* check for errors in the error flag */ - hdrp = (api_rx_hdr_t*)cbuf; - if (hdrp->error_flag != (unsigned char)0) - { - sprintf(errbuf, "Bad frame received, error code=0x%02X -- skipped", - hdrp->error_flag); - return 0; - } - -// pbuf = cbuf+sizeof(api_rx_hdr_t); - pbuf = cbuf+hdr_size; - -/* -{ -printf( -"native: len=%d hdr=%d %02X %02X %02X %02X (48) %02X %02X %02X %02X ... %02X %02X\n", -pktlen,hdr_size, -(int)pbuf[0], (int)pbuf[1], (int)pbuf[2], (int)pbuf[3], -(int)pbuf[48], (int)pbuf[49], (int)pbuf[50], (int)pbuf[51], -(int)pbuf[pktlen-2], (int)pbuf[pktlen-1]); -} -*/ - // Else we have a good frame to process... - (*env)->SetByteArrayRegion(env, jbuf, 0, pktlen, pbuf); - return pktlen; -} - -/** -Close the socket. -*/ -JNIEXPORT void JNICALL Java_lrgs_domsatrecv_DomsatSangoma_closeSangoma - (JNIEnv *env, jclass cls) -{ - if (sock != -1) - close(sock); - sock = -1; -} - -/* -Place the last error message in the passed buffer. -*/ -JNIEXPORT void JNICALL Java_lrgs_domsatrecv_DomsatSangoma_getErrorMsg - (JNIEnv *env, jclass cls, jbyteArray buf) -{ - (*env)->SetByteArrayRegion(env, buf, (jsize)0, strlen(errbuf)+1, errbuf); -} diff --git a/src/main/java/lrgs/domsatrecv/DomsatSangoma.h b/src/main/java/lrgs/domsatrecv/DomsatSangoma.h deleted file mode 100644 index eaae40f25..000000000 --- a/src/main/java/lrgs/domsatrecv/DomsatSangoma.h +++ /dev/null @@ -1,69 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class lrgs_domsatrecv_DomsatSangoma */ - -#ifndef _Included_lrgs_domsatrecv_DomsatSangoma -#define _Included_lrgs_domsatrecv_DomsatSangoma -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: lrgs_domsatrecv_DomsatSangoma - * Method: setInterfaceName - * Signature: (Ljava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_lrgs_domsatrecv_DomsatSangoma_setInterfaceName - (JNIEnv *, jclass, jstring); - -/* - * Class: lrgs_domsatrecv_DomsatSangoma - * Method: initSangoma - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatSangoma_initSangoma - (JNIEnv *, jclass); - -/* - * Class: lrgs_domsatrecv_DomsatSangoma - * Method: readPacket - * Signature: ([B)I - */ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatSangoma_readPacket - (JNIEnv *, jclass, jbyteArray); - -/* - * Class: lrgs_domsatrecv_DomsatSangoma - * Method: closeSangoma - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_lrgs_domsatrecv_DomsatSangoma_closeSangoma - (JNIEnv *, jclass); - -/* - * Class: lrgs_domsatrecv_DomsatSangoma - * Method: enable - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatSangoma_enable - (JNIEnv *, jclass); - -/* - * Class: lrgs_domsatrecv_DomsatSangoma - * Method: disable - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_lrgs_domsatrecv_DomsatSangoma_disable - (JNIEnv *, jclass); - -/* - * Class: lrgs_domsatrecv_DomsatSangoma - * Method: getErrorMsg - * Signature: ([B)V - */ -JNIEXPORT void JNICALL Java_lrgs_domsatrecv_DomsatSangoma_getErrorMsg - (JNIEnv *, jclass, jbyteArray); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/main/java/lrgs/domsatrecv/DomsatSangoma.java b/src/main/java/lrgs/domsatrecv/DomsatSangoma.java deleted file mode 100644 index f1378afe5..000000000 --- a/src/main/java/lrgs/domsatrecv/DomsatSangoma.java +++ /dev/null @@ -1,216 +0,0 @@ -/* -* $Id$ -* -* This is open-source software written by ILEX Engineering, Inc., under -* contract to the federal government. You are free to copy and use this -* source code for your own purposes, except that no part of the information -* contained in this file may be claimed to be proprietary. -* -* Except for specific contractual terms between ILEX and the federal -* government, this source code is provided completely without warranty. -* For more information contact: info@ilexeng.com -* -*/ -package lrgs.domsatrecv; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -import ilex.util.EnvExpander; -import ilex.util.Logger; -import lrgs.lrgsmain.LrgsConfig; - -/** -This defines the interface to code controlling the DOMSAT interface. -*/ -public class DomsatSangoma - implements DomsatHardware -{ - /** - * Constructor. - */ - public void DomsatSangoma() - { - } - - /** Initializes the interface. */ - public int init() - { - String ifName = LrgsConfig.instance().getSangomaIfName(); - if (ifName != null) - { - Logger.instance().info( - "Setting sangoma interface name to '" + ifName + "'"); - setInterfaceName(ifName); - } - - if (initSangoma() != 0) - { - Logger.instance().failure( - DomsatRecv.module + ":" + DomsatRecv.EVT_HW_INIT_FAILED - + " " + getErrorMsg()); - return -1; - } - Logger.instance().info(DomsatRecv.module + ":" - + (-DomsatRecv.EVT_HW_INIT_FAILED) - + " DOMSAT Hardware Initialization Success."); - return 0; - } - - /** Enable/Disable the interface. */ - public boolean setEnabled(boolean enabled) - { - if (enabled) - { - Logger.instance().info(DomsatRecv.module + " Enabling DOMSAT HW"); - if (enable() != 0) - { - Logger.instance().failure( - DomsatRecv.module + ":" + DomsatRecv.EVT_HW_CANNOT_ENABLE - + " " + getErrorMsg()); - disable(); - return false; - } - else - Logger.instance().info( - DomsatRecv.module + ":" + (-DomsatRecv.EVT_HW_CANNOT_ENABLE) - + " DOMSAT Enabled."); - } - else - { - Logger.instance().info(DomsatRecv.module - + " Disabling DOMSAT interface."); - disable(); - } - return true; - } - - /** - * Retrieve a packet from the interface. - * @return the byte[] packet if one is available, or null if none. - */ - public int getPacket(byte[] packetbuf) - { - Logger.instance().debug3(DomsatRecv.module + " Calling readPacket()"); - try - { - int r = readPacket(packetbuf); - Logger.instance().debug3(DomsatRecv.module + " readPacket() returned " + r); - return r; - } - catch(ArrayIndexOutOfBoundsException ex) - { - Logger.instance().warning(DomsatRecv.module + " Error in native code: " - + ex); - return -1; // means bad frame - } - } - - /** Shuts down the interface. */ - public void shutdown() - { - setEnabled(false); - Logger.instance().info("Closing Sangoma Driver"); - closeSangoma(); - } - - public String getErrorMsg() - { - byte buf[] = new byte[512]; - getErrorMsg(buf); - int n=0; - for(; n<512 && buf[n] != (byte)0; n++); - - return new String(buf, 0, n); - } - - /** Sets the interface name. */ - private native static void setInterfaceName(String ifName); - - /** - * Opens and binds the socket to the sangoma board. - * @return 0 if success, or negative error code. - */ - private native static int initSangoma(); - - /** - * Reads a packet of data from the sangoma board. - * @return number of bytes read, 0 if no data available, or - * negative error code. - */ - private native static int readPacket(byte[] buf); - - /** - * Closes the sangoma board interface. - */ - private native static void closeSangoma(); - - /** - * Enable data reception. - */ - private native static int enable(); - - /** - * Disable data reception. - */ - private native static int disable(); - - /** - * Return a string explanation of the last error. - */ - private native static void getErrorMsg(byte[] buf); - - static // Static initializer to load native library - { - if (System.getProperty("os.name").toLowerCase().startsWith("win")) - { - System.load(EnvExpander.expand( - "$DCSTOOL_HOME/lib/WinDomsatSangoma.dll")); - } - else - { - String libname = "domsat." + getOsSuffix(); - Logger.instance().info("Loading native library " + libname); - System.loadLibrary(libname); - } - } - - public static String getOsSuffix() - { - String osn = System.getProperty("os.name"); - if (osn == null) - return "unknown"; - osn = osn.toLowerCase(); - if (osn.startsWith("win")) - return "win"; - else if (osn.startsWith("sunos")) - return "sol10"; - try - { - Process uname = Runtime.getRuntime().exec("uname -rp"); - InputStreamReader isr = new InputStreamReader( - uname.getInputStream()); - BufferedReader bis = new BufferedReader(isr); - String line = bis.readLine(); - - // RHEL3 is Kernel version 2.4.xxxxx - if (line.startsWith("2.4")) - return "el3.32"; - int bits = 32; - String n = System.getProperty("sun.arch.data.model"); - if (n != null && n.contains("64")) - bits = 64; - int rhelVersion = line.contains("el5") ? 5 : 4; - return "el" + rhelVersion + "." + bits; - } - catch(IOException ex) - { - return "unknown"; - } - } - - public void timeout() - { - } -} diff --git a/src/main/java/lrgs/domsatrecv/Makefile b/src/main/java/lrgs/domsatrecv/Makefile deleted file mode 100644 index c78b0202d..000000000 --- a/src/main/java/lrgs/domsatrecv/Makefile +++ /dev/null @@ -1,91 +0,0 @@ -# -# $Id$ -# - -# IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT -# -# DO NOT BUILD THE NATIVE LIBRARY ON A LINUX 64-BIT SYSTEM OR IT WON'T -# WORK WHEN DISTRIBUTED TO A 32-BIT SYSTEM!!!!! -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -# -# Define library base name and version/release numbers: -# -LIB_BASE_NAME=libdomsat.so -LIB_MAJOR_VER=6 -LIB_MINOR_VER=0 -LIB_RELEASE=0 - -LIB_SO_NAME=$(LIB_BASE_NAME).$(LIB_MAJOR_VER) -TARGETLIB=$(LIB_SO_NAME).$(LIB_MINOR_VER).$(LIB_RELEASE) - -# -# list of executable programs: -# -EXECUTABLES= - -TARGETS= ${TARGETLIB} -LOCAL_JFLAGS=-cp ../..:../../../../src - -all: classes headers ${LIB_BASE_NAME} - @echo '${LIB_BASE_NAME} upto date!!' - -JSRC=DomsatSangoma.java -# DomsatFranklin.java - -include ${PROPTOP}/dcstool/legacy/lrgs/Makefile.Common -include ${PROPTOP}/dcstool/legacy/lrgs/Makefile.DependRules - -# -# Definitions local to this directory: -# -LOCAL_DEFINES = -LOCAL_INCLUDES= -I${JDKDIR}/include -I${JDKDIR}/include/linux -I${SRCROOT}/java -LOCAL_C_OPTIONS= -fPIC -LOCAL_CPP_OPTIONS= -fPIC -#LOCAL_LDFLAGS = -L${SRCROOT}/java/lrgs/internal - -# -# Java package prefix and source files: -# -JPKGPREFIX=lrgs.domsatrecv. - -classes: $(JCLASS) - @echo made ${JCLASS} - -GENHEADERS=DomsatSangoma.h - -headers: $(GENHEADERS) - -# -# Source files -# -CPPFILES= -CFILES=DomsatSangoma.c -# DomsatFranklin.c icp188.c - -# -# Dependency rules are included after source files -# -#include ${SRCROOT}/Makefile.DependRules - - -# -# Library rules: -# -${LIB_BASE_NAME}: ${ALL_OBJECTS} - @echo '---------------------------------------------------' - @echo 'Creating/Updating Library '$@'...' - ${AR} ${ARFLAGS} ${LDFLAGS} -o $@ $(ALL_OBJECTS) -lc - -DomsatSangoma.o: DomsatSangoma.c DomsatSangoma.h - -# DomsatFranklin.o: DomsatFranklin.c DomsatFranklin.h - - -# -# Rules for building test executables -# - - -# DO NOT DELETE THIS LINE diff --git a/src/main/java/lrgs/domsatrecv/README.txt b/src/main/java/lrgs/domsatrecv/README.txt deleted file mode 100644 index 93429c0ea..000000000 --- a/src/main/java/lrgs/domsatrecv/README.txt +++ /dev/null @@ -1,4 +0,0 @@ - -This package contains code for receiving messages from the DOMSAT -interface to the Java-Only LRGS. - diff --git a/src/main/java/lrgs/domsatrecv/build.sh b/src/main/java/lrgs/domsatrecv/build.sh deleted file mode 100644 index bf8d467b6..000000000 --- a/src/main/java/lrgs/domsatrecv/build.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -OUTPUT=$1 - -# -m32 builds for 32-bit architecture -#GCCFLAGS=-m32 - -if [ -z "$OUTPUT" ]; then - echo "usage: build.sh outputfile" - exit 1; -fi - -cmd='javac DomsatSangoma.java' -echo $cmd -$cmd - -cmd="javah -force -jni -o DomsatSangoma.h -classpath ../.. lrgs.domsatrecv.DomsatSangoma" -echo $cmd -$cmd - -cmd="gcc $GCCFLAGS -DLINUX -g -DLINUXPC -Wall -I/native -I/native -fPIC -I/usr/java/latest/include -I/usr/java/latest/include/linux -I/java -c DomsatSangoma.c" -echo $cmd -$cmd - -cmd="gcc $GCCFLAGS -shared -Wl,-soname,libdomsat.so.6 -L/native/ilexutil -L/native/lrgscommon -L/native/lrgsintern -o $OUTPUT DomsatSangoma.o -lc" -echo $cmd -$cmd diff --git a/src/main/java/lrgs/domsatrecv/icp188.c b/src/main/java/lrgs/domsatrecv/icp188.c deleted file mode 100644 index b07ad360f..000000000 --- a/src/main/java/lrgs/domsatrecv/icp188.c +++ /dev/null @@ -1,148 +0,0 @@ -/* -* $Id$ -*/ -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -struct EXE_HEADER -{ - ushort e_sig; /* exe file signature ( 0x5A4D ) */ - ushort e_loi; /* length of image mod 512 */ - ushort e_sof; /* size of file in 512 byt increments */ - ushort e_nor; /* # of relocation items */ - ushort e_soh; /* size of header in paragraphs */ - ushort e_min_para; /* min # of paras required above prog */ - ushort e_max_para; /* max # of paras required above prog */ - ushort e_sso; /* offset of the SS in load module */ - ushort e_spv; /* value to be given sp */ - ushort e_chk; /* checksum of file */ - ushort e_ipv; /* value for IP */ - ushort e_cso; /* offset of code seg in load module */ - ushort e_fro; /* offset of first reloc item in file */ - ushort e_ovn; /* overlay number */ -} - __attribute__((packed)) - ; - -#define BUFSIZE 1024 - -char icperrbuf[256]; - -int icp188load(int fd, const char *fname) -/* -* The program must be in the DOS EXE format with origin at -* 0000:0000. -* -* Return: 0 if program successfully loaded, otherwise -1. -*/ -{ - int prog, n; - struct EXE_HEADER *exe_header; - struct SHARED_DATA sd; - char buffer[BUFSIZE]; - long jmpvec; - - /* Make sure driver is in raw mode and reboot ICP processor. */ - if (ioctl(fd, DRIVER_RAW, 0) == -1 || ioctl(fd, REBOOT, 0) == -1) - { - strcpy(icperrbuf, "DICPIOCTL"); - return -1; - } - - /* Attempt to open the named program. */ - if ((prog = open(fname,O_RDONLY)) == -1) - { - strcpy(icperrbuf, "DBADINPUTFILE"); - return -1; - } - - /* Get exe file header. */ - if ((n = read(prog, buffer, BUFSIZE)) < sizeof(struct EXE_HEADER)) - { - strcpy(icperrbuf, "DBADINPUTFILE"); - close(prog); - return -1; - } - exe_header = (struct EXE_HEADER *)buffer; - - /* Compute start address from initial code segment and IP. */ - if (ioctl(fd, GET_SHARED_DATA, &sd) == -1) - { - strcpy(icperrbuf, "DICPIOCTL"); - close(prog); - return -1; - } - jmpvec = exe_header->e_cso; - jmpvec = (jmpvec<<16) + exe_header->e_ipv; - sd.sd_jmpvec = (faddr_t)jmpvec; - if (ioctl(fd, SET_SHARED_DATA, &sd) == -1) - { - strcpy(icperrbuf, "DICPIOCTL"); - close(prog); - return -1; - } - - /* 'soh' contains the actual size of the header. The load - * module itself contains 1056 spaceholder bytes for the interrupt - * vector table and the shared-data structure. Thus we want to - * skip past the header and the first 1056 bytes of the load module - * before loading the board starting at address 1056. - */ - lseek(prog,(long)((exe_header->e_soh << 4) + 1056),0); - lseek(fd, 1056l, 0); - - /* DownLoad the program in 1K blocks. */ - while((n = read(prog, buffer, BUFSIZE)) > 0) - write(fd, buffer, n); - - /* Setting this flag will cause the 188 to jump to the start address. */ - ioctl(fd, GET_SHARED_DATA, &sd); - sd.sd_flag = 1; - ioctl(fd, SET_SHARED_DATA, &sd); - close(prog); - - return 0; -} - -int icp188start(int fd) -/* -* This function starts up a previously loaded program on the ICP188x. -* By convention, ICP programs will wait until a non-zero value is seen -* at location 0x442 (called the configure_od flag) before doing anything. -* This function sets the 'configure_ok' flag at 0x442, causing the program -* to start up. -* -* Return: 0 if successful in setting flag, otherwise -1. -*/ -{ - char c; - long clock; - struct tm *gmt; - - time(&clock); - gmt = gmtime(&clock); - gmt->tm_yday++; - - if (lseek(fd, 0x448l, 0) == -1) - return -1; - write(fd, &gmt->tm_year, 2); - write(fd, &gmt->tm_yday, 2); - write(fd, &gmt->tm_hour, 2); - write(fd, &gmt->tm_min, 2); - - if (lseek(fd, 0x442l, 0) == -1) - return -1; - c = 1; - if (write(fd, &c, 1) != 1) - return -1; - - return 0; -} diff --git a/src/main/java/lrgs/domsatrecv/sangoma_drv.h b/src/main/java/lrgs/domsatrecv/sangoma_drv.h deleted file mode 100644 index 7f228339c..000000000 --- a/src/main/java/lrgs/domsatrecv/sangoma_drv.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -* $Id$ -* -* This is open-source software written by ILEX Engineering, Inc., under -* contract to the federal government. You are free to copy and use this -* source code for your own purposes, except that no part of the information -* contained in this file may be claimed to be proprietary. -* -* Except for specific contractual terms between ILEX and the federal -* government, this source code is provided completely without warranty. -* For more information contact: info@ilexeng.com -* -* $Log$ -* Revision 1.1 2008/04/04 18:21:13 cvs -* Added legacy code to repository -* -* Revision 1.1 2005/08/08 18:09:41 mjmaloney -* HW Interface complete. -* -*/ - - -/* -This file contains a minimal set of definitions necessary to receive packets -from the Sangoma driver. It is extracted from the include files provided -by Sangoma. -*/ - -struct wan_sockaddr_ll -{ - unsigned short sll_family; - unsigned short sll_protocol; - int sll_ifindex; - unsigned short sll_hatype; - unsigned char sll_pkttype; - unsigned char sll_halen; - unsigned char sll_addr[8]; - unsigned char sll_device[14]; - unsigned char sll_card[14]; - - unsigned int sll_active_ch; - unsigned char sll_prot; - unsigned char sll_prot_opt; - unsigned short sll_mult_cnt; - unsigned char sll_seven_bit_hdlc; -}; - -#define PVC_PROT 0x17 - -#ifndef PACKED -#define PACKED __attribute__((packed)) -#endif - -typedef struct { - unsigned char error_flag PACKED; - unsigned short time_stamp PACKED; - unsigned char reserved[13] PACKED; -} api_rx_hdr_t; - -/* MUST agree with size of packetbuf in DomsatSangome.java */ -#define MAX_FRAME_SIZE 512 diff --git a/src/main/java/lrgs/drgs/Makefile b/src/main/java/lrgs/drgs/Makefile deleted file mode 100644 index a80f38e2d..000000000 --- a/src/main/java/lrgs/drgs/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# $Id$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:13 cvs -# Added legacy code to repository -# -# Revision 1.6 2003/06/18 11:40:30 mjmaloney -# 3.4 release prep -# -# Revision 1.5 2003/06/17 17:14:23 mjmaloney -# This file becomes a generic template to be installed. -# -# Revision 1.4 2003/06/17 16:48:25 mjmaloney -# 3.4 release prep -# -# Revision 1.3 2003/04/11 20:14:42 mjmaloney -# dev -# -# Revision 1.2 2003/04/09 19:38:03 mjmaloney -# impl -# -# Revision 1.1 2003/03/27 16:58:50 mjmaloney -# drgs development. -# -# - -all: classes - @echo upto date!! - -include ${SRCROOT}/Makefile.Common -include ${SRCROOT}/Makefile.DependRules - -# -# Definitions local to this directory: -# -LOCAL_DEFINES = -LOCAL_INCLUDES= -I${JDKDIR}/include -I${JDKDIR}/include/linux -I${SRCROOT}/java -LOCAL_C_OPTIONS = -LOCAL_CPP_OPTIONS = - - -# -# Java package prefix and source files: -# -JPKGPREFIX=lrgs.drgs. -JSRC = \ - DrgsConnectCfg.java \ - DrgsEvent.java \ - BadConfigException.java \ - DrgsInputSettings.java \ - DrgsCmdLineArgs.java \ - DrgsInput.java \ - DrgsConnection.java \ - DrgsMsgThread.java \ - DrgsEvtThread.java - -classes: ${JCLASS} - @echo finished making ${JCLASS} - -# -# Must have root permission to install! -# -install: all - cp drgsconf.xml $(LRGSHOME) - - -# DO NOT DELETE THIS LINE diff --git a/src/main/java/lrgs/gui/Makefile b/src/main/java/lrgs/gui/Makefile deleted file mode 100644 index 517ef1e5d..000000000 --- a/src/main/java/lrgs/gui/Makefile +++ /dev/null @@ -1,93 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:13 cvs -# Added legacy code to repository -# -# Revision 1.16 2004/07/06 18:42:49 mjmaloney -# dev -# -# Revision 1.15 2004/07/05 19:10:43 mjmaloney -# DECODES 6.2 release prep -# -# Revision 1.14 2003/12/14 22:25:59 mjmaloney -# Initial working editor with file IO but no CORBA. -# -# Revision 1.13 2003/06/09 15:44:38 mjmaloney -# Prep for LRGS 3.4 release. -# -# Revision 1.12 2002/05/06 20:45:05 mjmaloney -# Created NewUserDialog and added it to UserAccounts. -# -# Revision 1.11 2002/04/30 22:12:17 mjmaloney -# Added JComboBox for selected properties in MessageBrowser. -# -# Revision 1.10 2001/03/06 15:12:29 mike -# *** empty log message *** -# -# Revision 1.9 2001/02/23 03:04:32 mike -# *** empty log message *** -# -# Revision 1.8 2000/06/07 18:49:40 mike -# Added PopupDisplayer -# -# Revision 1.7 2000/06/07 18:47:04 mike -# Added ConfigHandler.java -# -# Revision 1.6 2000/05/02 15:43:21 mike -# Make wider to accomodate low-res screens. -# -# Revision 1.5 2000/04/04 19:44:17 mike -# Obsolete -# -# Revision 1.4 2000/03/30 01:48:00 mike -# dev -# -# Revision 1.3 2000/03/27 22:18:06 mike -# Added new GUI classes. -# -# Revision 1.2 2000/03/25 22:08:40 mike -# Added gui stuff. -# -# Revision 1.1 2000/01/26 22:45:23 mike -# Created -# -# - -all: classes - @echo upto date!! - -include ${SRCROOT}/Makefile.Common -include ${SRCROOT}/Makefile.DependRules - -# -# Java package prefix and source files: -# -JPKGPREFIX=lrgs.gui. -JSRC = RealTimeStatus.java SearchCriteriaEditor.java \ - MessageBrowser.java \ - LrgsSystemFinder.java UrlLrgsSystemFinder.java \ - DirectoryLrgsSystemFinder.java GuiClientAppSettings.java \ - PopupDisplayer.java LrgsGuiException.java \ - EventDisplay.java \ - LrgsSelectDialog.java LrgsServices.java \ - LrgsControl.java UserAccounts.java MessageOutput.java \ - ControlPanel.java LrgsAccess.java LrgsHostSelector.java \ - GeneralProperties.java LrgsAdmin.java LrgsApp.java \ - DcpMsgOutputMonitor.java DcpMsgOutputThread.java ConfigHandler.java \ - DecodesInterface.java NewUserDialog.java SearchCritEditorParent.java \ - LrgsConfigEditFrame.java NetlistDialog.java NBSiteDialog.java \ - NetlistFinder.java - - -classes: ${JCLASS} - @echo finished making ${JCLASS} - -install: - -# DO NOT DELETE THIS LINE diff --git a/src/main/java/lrgs/lddc/Makefile b/src/main/java/lrgs/lddc/Makefile deleted file mode 100644 index 8085e316b..000000000 --- a/src/main/java/lrgs/lddc/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:14 cvs -# Added legacy code to repository -# -# Revision 1.6 2003/09/18 14:22:50 mjmaloney -# Created. -# -# Revision 1.5 2002/11/20 22:28:14 mjmaloney -# Added RtSocketStream utility. -# -# Revision 1.4 2000/03/31 16:09:32 mike -# Created GetDcpMessages -# -# Revision 1.3 2000/01/19 14:34:49 mike -# Debug messages to detect garbage collection. -# -# Revision 1.2 1999/12/01 19:43:02 mike -# Implemented java install stuff. -# -# Revision 1.1 1999/10/13 21:29:33 mike -# Initial implementation -# -# - -all: classes - @echo upto date!! - -include ${SRCROOT}/Makefile.Common -include ${SRCROOT}/Makefile.DependRules - -# -# Java package prefix and source files: -# -JPKGPREFIX=lrgs.lddc. -JSRC = \ - Client.java \ - BgClient.java \ - GetDcpMessages.java \ - RtSocketStream.java \ - UsbrDrotFeed.java - -classes: ${JCLASS} - @echo finished making ${JCLASS} - -install: - -# DO NOT DELETE THIS LINE diff --git a/src/main/java/lrgs/ldds/Makefile b/src/main/java/lrgs/ldds/Makefile deleted file mode 100644 index 71c363c12..000000000 --- a/src/main/java/lrgs/ldds/Makefile +++ /dev/null @@ -1,103 +0,0 @@ -# -# $Id$ -# -# $Source$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:15 cvs -# Added legacy code to repository -# -# Revision 1.19 2005/10/11 17:55:19 mmaloney -# dev -# -# Revision 1.18 2005/10/10 20:49:41 mmaloney -# dev -# -# Revision 1.17 2005/01/05 19:21:09 mjmaloney -# Bug fixes & updates. -# -# Revision 1.16 2004/07/02 18:56:40 mjmaloney -# Added events distribution capability. -# -# Revision 1.15 2004/04/23 19:34:15 mjmaloney -# Use CaptureStdout to redirect uncaught exceptions to the log. -# -# Revision 1.14 2003/06/18 13:53:54 mjmaloney -# Added LddsParams.java -# -# Revision 1.13 2003/05/29 14:27:07 mjmaloney -# Enhancements for 3.4 -# -# Revision 1.12 2003/05/03 16:48:08 mjmaloney -# Added logging to LDDS server. -# -# Revision 1.11 2003/02/05 14:32:31 mjmaloney -# Added DdsConstants module. -# -# Revision 1.10 2002/08/05 19:08:30 mjmaloney -# First implementation of GetDcpMsgBlock -# -# Revision 1.9 2002/06/18 23:11:04 mjmaloney -# Added CmdAuthHello.java -# -# Revision 1.8 2000/02/26 19:09:38 mike -# Renamed Legacy to Lrgs -# -# Revision 1.7 2000/01/08 21:53:28 mike -# generic LddsClient interface -# -# Revision 1.6 2000/01/07 23:03:09 mike -# Generic Client Interface -# -# Revision 1.5 2000/01/07 19:10:00 mike -# Generalizing client interface -# -# Revision 1.4 1999/12/01 19:43:03 mike -# Implemented java install stuff. -# -# Revision 1.3 1999/11/03 19:23:53 mike -# Debugging network read problems. -# -# Revision 1.2 1999/10/15 10:13:55 mike -# Moved LddsInputStream and LddsMessage to lrgs.common package. Added import -# statements in the 'Cmd' classes that need these. -# -# Revision 1.1 1999/10/13 21:29:35 mike -# Initial implementation -# -# - -all: classes - @echo upto date!! - -include ${SRCROOT}/Makefile.Common -include ${SRCROOT}/Makefile.DependRules - -# -# Java package prefix and source files: -# -JPKGPREFIX=lrgs.ldds. -JSRC = \ - LrgsDcpDataSvr.java LddsClient.java \ - LddsMessage.java LddsUser.java LddsCommand.java CmdHello.java \ - CmdEcho.java CmdGetNextDcpMsg.java CmdGoodbye.java CmdRecvSearchCrit.java \ - CmdSendSearchCrit.java LddsThread.java \ - CmdRecvNetList.java CmdSendNetList.java LddsInputStream.java \ - CmdAuthHello.java ServerError.java ProtocolError.java \ - CmdGetDcpMsgBlock.java LddsLoggerThread.java \ - LddsRequestException.java LddsParams.java \ - CmdGetStatus.java LddsLogForwarder.java CmdGetEvents.java \ - UnknownUserException.java NativeLddsThread.java \ - AuthFailedException.java \ - DdsInternalException.java \ - NoSuchFileException.java \ - StatLogger.java - -classes: ${JCLASS} - @echo finished making ${JCLASS} - -install: - -# DO NOT DELETE THIS LINE diff --git a/src/main/java/lrgs/lrgsmain/LrgsMain.java b/src/main/java/lrgs/lrgsmain/LrgsMain.java index 4ace7551a..e6353c568 100644 --- a/src/main/java/lrgs/lrgsmain/LrgsMain.java +++ b/src/main/java/lrgs/lrgsmain/LrgsMain.java @@ -108,8 +108,6 @@ public class LrgsMain /** Used to write period status snapshots. */ private DetailReportGenerator statusRptGen; -// /** The DOMSAT Receive Module */ -// private DomsatRecv domsatRecv; /** The singleton configuration object. */ private LrgsConfig cfg; @@ -419,24 +417,6 @@ private boolean initLRGS() if (!initDdsServer()) return false; -// // Initialize the DOMSAT Receive Module. -// if (cfg.loadDomsat) -// { -// try -// { -// domsatRecv = new DomsatRecv(this, msgArchive, statusProvider); -// addInput(domsatRecv); -// } -// catch(UnsatisfiedLinkError ex) -// { -// System.err.println(ex); -// ex.printStackTrace(); -// Logger.instance().failure( -// "Cannot load DOMSAT native interface." -// + " This will prevent DOMSAT from working!"); -// } -// } - // Add any custom features and extensions for this particular LRGS. addCustomFeatures(); diff --git a/src/main/java/lrgs/rtstat/LrgsConfigDialog.java b/src/main/java/lrgs/rtstat/LrgsConfigDialog.java index ec395983f..d2160c648 100644 --- a/src/main/java/lrgs/rtstat/LrgsConfigDialog.java +++ b/src/main/java/lrgs/rtstat/LrgsConfigDialog.java @@ -1471,82 +1471,6 @@ private JComboBox getMergePref4Combo() { return mergePref4Combo; } -// /** -// * This method initializes initializeDOMSATcheck -// * -// * @return javax.swing.JCheckBox -// */ -// private JCheckBox getInitializeDOMSATcheck() { -// if (initializeDOMSATcheck == null) { -// initializeDOMSATcheck = new JCheckBox(); -// initializeDOMSATcheck.setText(labels.getString( -// "LrgsConfigDialog.initDOMSATCheckBox")); -// } -// return initializeDOMSATcheck; -// } - -// /** -// * This method initializes domsatLinkCheck -// * -// * @return javax.swing.JCheckBox -// */ -// private JCheckBox getDomsatLinkCheck() { -// if (domsatLinkCheck == null) { -// domsatLinkCheck = new JCheckBox(); -// domsatLinkCheck.setText(labels.getString( -// "LrgsConfigDialog.enableDOMSATLink")); -// } -// return domsatLinkCheck; -// } - -// /** -// * This method initializes domsatHardwareCombo -// * -// * @return javax.swing.JComboBox -// */ -// private JComboBox getDomsatHardwareCombo() -// { -// if (domsatHardwareCombo == null) -// { -// domsatHardwareCombo = new JComboBox(); -// domsatHardwareCombo.addItem("lrgs.domsatrecv.DomsatSangoma"); -// domsatHardwareCombo.addItem("lrgs.domsatrecv.DomsatDpc"); -// domsatHardwareCombo.addItem("lrgs.domsatrecv.DomsatFranklin"); -// -// domsatHardwareCombo.addActionListener( -// new java.awt.event.ActionListener() -// { -// public void actionPerformed(java.awt.event.ActionEvent e) -// { -// chkDpcEnabled(); -// } -// }); -// -// } -// return domsatHardwareCombo; -// } - -// private void chkDpcEnabled() -// { -// String cn = (String)domsatHardwareCombo.getSelectedItem(); -// boolean isDpc = -// cn != null && cn.equals("lrgs.domsatrecv.DomsatDpc"); -// domsatDpcPort.setEnabled(isDpc); -// domsatDpcHost.setEnabled(isDpc); -// } - -// /** -// * This method initializes domsatTimeoutField -// * -// * @return javax.swing.JTextField -// */ -// private JTextField getDomsatTimeoutField() { -// if (domsatTimeoutField == null) { -// domsatTimeoutField = new JTextField(); -// } -// return domsatTimeoutField; -// } -// /** * This method initializes ddsListenPortField * diff --git a/src/main/resources/lrgs/lrgsmon/Makefile b/src/main/resources/lrgs/lrgsmon/Makefile deleted file mode 100644 index bbb52f0b5..000000000 --- a/src/main/resources/lrgs/lrgsmon/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# $Id$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:15 cvs -# Added legacy code to repository -# -# Revision 1.4 2004/06/04 17:32:16 mjmaloney -# Completed LRGSmon application. -# -# Revision 1.3 2004/06/02 21:31:51 mjmaloney -# dev -# -# Revision 1.2 2004/06/01 15:26:36 mjmaloney -# Created. -# -# Revision 1.1 2004/05/04 14:20:21 mjmaloney -# Created - all functional code commented out for now. -# -# - -all: classes - @echo upto date!! - -include ${SRCROOT}/Makefile.Common -include ${SRCROOT}/Makefile.DependRules - -# -# Java package prefix and source files: -# -JPKGPREFIX=lrgs.ldds. -JSRC = \ - LrgsMonitor.java \ - LrgsMonThread.java \ - LrgsMonCmdLineArgs.java \ - ThreadBase.java \ - DetailReportGenerator.java \ - SummaryReportGenerator.java \ - - -classes: ${JCLASS} - @echo finished making ${JCLASS} - -install: - -# DO NOT DELETE THIS LINE diff --git a/src/main/resources/lrgs/nledit/Makefile b/src/main/resources/lrgs/nledit/Makefile deleted file mode 100644 index 63173d9bd..000000000 --- a/src/main/resources/lrgs/nledit/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# -# $Id$ -# -# $State$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:15 cvs -# Added legacy code to repository -# -# Revision 1.2 2001/03/01 13:37:21 mike -# dev -# -# Revision 1.1 2001/02/21 13:24:25 mike -# Created -# -# - -all: classes - @echo upto date!! - -include ${SRCROOT}/Makefile.Common -include ${SRCROOT}/Makefile.DependRules - -# -# Java package prefix and source files: -# -JPKGPREFIX=lrgs.nledit. -JSRC=PasteBuffer.java NetlistEditFrame.java NetlistEditFrame_AboutBox.java \ - NetlistEditor.java NetworkListColumnModel.java NetworkListTable.java \ - NetworkListTableModel.java - -classes: ${JCLASS} - @echo finished making ${JCLASS} - -install: - -# DO NOT DELETE THIS LINE diff --git a/src/main/resources/lrgs/statusxml/Makefile b/src/main/resources/lrgs/statusxml/Makefile deleted file mode 100644 index 82c127335..000000000 --- a/src/main/resources/lrgs/statusxml/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# -# $Id$ -# -# $Log$ -# Revision 1.1 2008/04/04 18:21:16 cvs -# Added legacy code to repository -# -# Revision 1.1 2004/05/04 18:03:57 mjmaloney -# Moved from statusgui package to here. -# -# - -all: classes - @echo upto date!! - -include ${SRCROOT}/Makefile.Common -include ${SRCROOT}/Makefile.DependRules - -# -# Java package prefix and source files: -# -JPKGPREFIX=lrgs.ldds. -JSRC = \ - TopLevelXio.java \ - StatusXmlTags.java \ - LrgsStatusSnapshotExt.java \ - LrgsStatusSnapshotXio.java \ - ArchiveStatisticsXio.java \ - ProcessXio.java \ - DownLinkXio.java \ - QualityMeasurementXio.java - -classes: ${JCLASS} - @echo finished making ${JCLASS} - -install: - -# DO NOT DELETE THIS LINE diff --git a/src/test/java/integration/lrgs/domsatrecv/TestDomsat.java b/src/test/java/integration/lrgs/domsatrecv/TestDomsat.java deleted file mode 100644 index f80c189bc..000000000 --- a/src/test/java/integration/lrgs/domsatrecv/TestDomsat.java +++ /dev/null @@ -1,66 +0,0 @@ -package integration.lrgs.domsatrecv; - -import java.util.logging.Logger; - -import lrgs.domsatrecv.DomsatDpc; -import lrgs.lrgsmain.LrgsConfig; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.RepeatedTest; - -import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -@Disabled("Requires DOMSAT DPC installed on localhost") -final class TestDomsat -{ - private static final Logger LOGGER = Logger.getLogger(TestDomsat.class.getName()); - private static DomsatDpc ds; - - @BeforeAll - public static void setup() - { - String host = System.getProperty("domsat.dpc.test.host", "localhost"); - int port = Integer.getInteger("domsat.dpc.test.post", 9000); - LrgsConfig.instance().dpcHost = host; - LrgsConfig.instance().dpcPort = port; - ds = new DomsatDpc(); - ds.init(); - assertTrue(ds.setEnabled(true), () -> "Enable failed -- see log messages."); - } - - @AfterAll - public static void tearDown() - { - ds.shutdown(); - } - - @RepeatedTest(value = 20, name = RepeatedTest.LONG_DISPLAY_NAME) - void dpcDomsat() throws Exception - { - byte packet[] = new byte[1024]; - int len = ds.getPacket(packet); - - assertNotEquals(0, len, () -> "Timeout"); - assertNotEquals(-1, len, () -> "Recoverable Error: " + ds.getErrorMsg()); - assertNotEquals(-2, len, () -> "Fatal Error: " + ds.getErrorMsg()); - while(len == -3) - { - Thread.sleep(100L); - len = ds.getPacket(packet); - } - LOGGER.info("Frame received, len=" + len); - LOGGER.info(" " - + Integer.toHexString((int) packet[0] & 0xff) + ", " - + Integer.toHexString((int) packet[1] & 0xff) + ", " - + Integer.toHexString((int) packet[2] & 0xff) + ", " - + Integer.toHexString((int) packet[3] & 0xff) + ", " - + Integer.toHexString((int) packet[4] & 0xff) + ", " - + Integer.toHexString((int) packet[5] & 0xff) + ", " - + Integer.toHexString((int) packet[6] & 0xff) + ", " - + Integer.toHexString((int) packet[7] & 0xff) + ", ... " - + Integer.toHexString((int) packet[len - 2] & 0xff) + ", " - + Integer.toHexString((int) packet[len - 1] & 0xff)); - } -} diff --git a/src/test/java/integration/lrgs/domsatrecv/TestDomsatFranklin.java b/src/test/java/integration/lrgs/domsatrecv/TestDomsatFranklin.java deleted file mode 100644 index f5af03ac8..000000000 --- a/src/test/java/integration/lrgs/domsatrecv/TestDomsatFranklin.java +++ /dev/null @@ -1,55 +0,0 @@ -package integration.lrgs.domsatrecv; - -import java.util.logging.Logger; - -import lrgs.domsatrecv.DomsatFranklin; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.RepeatedTest; - -import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -@Disabled("Requires domsat.win on java.library.path") -final class TestDomsatFranklin extends Thread -{ - private static final Logger LOGGER = Logger.getLogger(TestDomsatFranklin.class.getName()); - private static DomsatFranklin ds; - - @BeforeAll - public static void setup() - { - ds = new DomsatFranklin(); - ds.init(); - assertTrue(ds.setEnabled(true), () -> "Enable failed -- see log messages."); - } - - @AfterAll - public static void tearDown() - { - ds.shutdown(); - } - - @RepeatedTest(value = 20, name = RepeatedTest.LONG_DISPLAY_NAME) - void domsatFranklin() - { - byte[] packet = new byte[1024]; - int len = ds.getPacket(packet); - assertNotEquals(0, len, () -> "Timeout"); - assertNotEquals(-1, len, () -> "Recoverable Error: " + ds.getErrorMsg()); - assertNotEquals(-2, len, () -> "Fatal Error: " + ds.getErrorMsg()); - LOGGER.info("Frame received, len=" + len); - LOGGER.info(" " - + Integer.toHexString((int) packet[0] & 0xff) + ", " - + Integer.toHexString((int) packet[1] & 0xff) + ", " - + Integer.toHexString((int) packet[2] & 0xff) + ", " - + Integer.toHexString((int) packet[3] & 0xff) + ", " - + Integer.toHexString((int) packet[4] & 0xff) + ", " - + Integer.toHexString((int) packet[5] & 0xff) + ", " - + Integer.toHexString((int) packet[6] & 0xff) + ", " - + Integer.toHexString((int) packet[7] & 0xff) + ", ... " - + Integer.toHexString((int) packet[len - 2] & 0xff) + ", " - + Integer.toHexString((int) packet[len - 1] & 0xff)); - } -} diff --git a/src/test/java/integration/lrgs/domsatrecv/TestDomstatSangoma.java b/src/test/java/integration/lrgs/domsatrecv/TestDomstatSangoma.java deleted file mode 100644 index 7cf08a5ee..000000000 --- a/src/test/java/integration/lrgs/domsatrecv/TestDomstatSangoma.java +++ /dev/null @@ -1,53 +0,0 @@ -package integration.lrgs.domsatrecv; - -import lrgs.domsatrecv.DomsatSangoma; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.RepeatedTest; - -import static org.junit.jupiter.api.Assertions.assertNotEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -@Disabled("Requires WinDomsatSangoma.dll on java.library.path") -final class TestDomstatSangoma -{ - - private static DomsatSangoma ds; - - @BeforeAll - public static void setup() - { - ds = new DomsatSangoma(); - ds.init(); - assertTrue(ds.setEnabled(true), () -> "Enable failed -- see log messages."); - } - - @AfterAll - public static void tearDown() - { - ds.shutdown(); - } - - @RepeatedTest(value = 20, name = RepeatedTest.LONG_DISPLAY_NAME) - void domsatFranklin() - { - byte[] packet = new byte[1024]; - int len = ds.getPacket(packet); - assertNotEquals(0, len, () -> "Timeout"); - assertNotEquals(-1, len, () -> "Recoverable Error: " + ds.getErrorMsg()); - assertNotEquals(-2, len, () -> "Fatal Error: " + ds.getErrorMsg()); - System.out.println("Frame received, len=" + len); - System.out.println(" " - + Integer.toHexString((int) packet[0] & 0xff) + ", " - + Integer.toHexString((int) packet[1] & 0xff) + ", " - + Integer.toHexString((int) packet[2] & 0xff) + ", " - + Integer.toHexString((int) packet[3] & 0xff) + ", " - + Integer.toHexString((int) packet[4] & 0xff) + ", " - + Integer.toHexString((int) packet[5] & 0xff) + ", " - + Integer.toHexString((int) packet[6] & 0xff) + ", " - + Integer.toHexString((int) packet[7] & 0xff) + ", ... " - + Integer.toHexString((int) packet[len - 2] & 0xff) + ", " - + Integer.toHexString((int) packet[len - 1] & 0xff)); - } -}