Merge branch 'asm_14.4.1' of ssh://10.201.30.8:29418/AWIPS2_baseline into master_14.4.1

Former-commit-id: cd76675754 [formerly 61d335650b] [formerly cd76675754 [formerly 61d335650b] [formerly 4521a28536 [formerly 0580ad455973b3a176208203a140474df0040155]]]
Former-commit-id: 4521a28536
Former-commit-id: 5a0e7100d2 [formerly 61f4a5810e]
Former-commit-id: 21bd521d19
This commit is contained in:
Fay.Liang 2015-02-24 15:36:40 -05:00
commit 176ce2fe36
2 changed files with 20 additions and 6 deletions

View file

@ -51,6 +51,7 @@ import com.raytheon.uf.edex.plugin.text.impl.WMOReportData;
* Apr 02, 2014 2652 skorolev Corrected a removing of excess control characters.
* May 14, 2014 2536 bclement moved WMO Header to common
* Dec 03, 2014 ASM #16859 D. Friedman Use CharBuffer instead of StringBuilder.
* Feb 17, 2014 ASM #17125 D. Friedman Fix parsing of type and date fields.
* </pre>
*
* @author jkorman
@ -423,12 +424,18 @@ public class UACollectiveSeparator extends WMOMessageSeparator {
}
// Check for USUS80 or 90 formatted messages and decode
else if (dataDes.endsWith("80") || dataDes.endsWith("90")) {
/* // A1 logic. It is not clear what this was for.
if (checkCharNum(buffer.charAt(0))) {
buffer.get();
} else {
stationNum.append(assignTextSegment(buffer, CSPC));
}
*/
if (! checkCharNum(buffer.charAt(0))) {
buffer.get();
}
stationNum.append(assignTextSegment(buffer, CSPC));
getTextSegment(buffer, parsedMsg, CSEP);
} else {
// Otherwise it's standard format so decode
@ -442,18 +449,19 @@ public class UACollectiveSeparator extends WMOMessageSeparator {
// to be used as the station number instead of the third, so the
// length of a string between spaces is now used to determine a
// valid field.
CharBuffer stationSearchBuffer = buffer.duplicate();
int x = 0;
while (x < 2 && buffer.length() > 0) {
int len = buffer.length();
if (safeStrpbrk(buffer, CSPC)) {
if (len - buffer.length() >= 4) {
while (x < 2 && stationSearchBuffer.length() > 0) {
int len = stationSearchBuffer.length();
if (safeStrpbrk(stationSearchBuffer, CSPC)) {
if (len - stationSearchBuffer.length() >= 4) {
x++;
}
buffer.get();
stationSearchBuffer.get();
}
}
stationNum.append(assignTextSegment(buffer, CSPC));
stationNum.append(assignTextSegment(stationSearchBuffer, CSPC));
}
getTextSegment(buffer, parsedMsg, CSEP);

View file

@ -442,6 +442,12 @@ IDS|DDPLUS ^(M[A-Z]{3}[0-9]{2}) ([KPTMC].{3}) (..)(..)(..)
IDS|DDPLUS ^(T[BCHPRTWXY][A-Z]{2}[0-9]{2}) ([A-Z]{4}) (..)(..)(..)
FILE -overwrite -log -close -edex /data_store/text/(\3:yyyy)(\3:mm)\3/\4/\1_\2_\3\4\5_(seq).%Y%m%d%H
IDS|DDPLUS ^(SE[A-Z]{2}[0-9]{2}) ([A-Z]{4}) (..)(..)(..)
FILE -overwrite -log -close -edex /data_store/text/(\3:yyyy)(\3:mm)\3/\4/\1_\2_\3\4\5_(seq).%Y%m%d%H
IDS|DDPLUS ^(WE[CHP][A-Z][0-9]{2}) ([A-Z]{4}) (..)(..)(..)
FILE -overwrite -log -close -edex /data_store/text/(\3:yyyy)(\3:mm)\3/\4/\1_\2_\3\4\5_(seq).%Y%m%d%H
# summaries
#IDS|DDPLUS ^(A.{5}) (.{4}) (..)(..)(..)
# FILE -overwrite -log -close -edex /data_store/summaries/(\3:yyyy)(\3:mm)\3/\4/\1_\2_\3\4\5_(seq).%Y%m%d%H