Files
UniversalTestSoftware/server/libs/classes/com/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy.class

135 lines
18 KiB
Plaintext
Raw Normal View History

<EFBFBD><EFBFBD><EFBFBD><EFBFBD>4<02>
 Kcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy parseFrames*(Ljava/lang/String;Ljava/nio/ByteBuffer;)V 
serialPortObjectHashMap(Ljava/util/concurrent/ConcurrentHashMap;
 java/lang/Object<init>()V
 &java/util/concurrent/ConcurrentHashMapget&(Ljava/lang/Object;)Ljava/lang/Object;\com/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy$SerialPortObjectjava/lang/RuntimeExceptionjava/lang/StringBuilder
 串口
! "#append-(Ljava/lang/String;)Ljava/lang/StringBuilder;%
已打开
' ()toString()Ljava/lang/String;
+ ,(Ljava/lang/String;)V
./0 12#com/fazecast/jSerialComm/SerialPort getCommPorts(()[Lcom/fazecast/jSerialComm/SerialPort;
.4 5)getSystemPortName
789 :;java/lang/Stringequals(Ljava/lang/Object;)Z=
未找到
.? @A setBaudRate(I)Z
.C DAsetNumDataBits
.F GAsetNumStopBits
.I JA setParity
.L MNsetComPortTimeouts(III)Z
.P QRopenPort()Z
T UP(Lcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy;)V
W XY setSerialPort((Lcom/fazecast/jSerialComm/SerialPort;)V
[ \, setChannelId
^ _`put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;b 打开失败
d ef getSerialPort'()Lcom/fazecast/jSerialComm/SerialPort;
.h iRisOpen
.k lR closePort
n opsetReceiveThread(Ljava/lang/Thread;)V
r sremoveu
未打开w
不存在y
未连接
.{ |}
writeBytes([BJ)I <00><00> <00><00>java/lang/SystemoutLjava/io/PrintStream;<00> 串口:<00>开始接收数据
<00><00><00> <00>,java/io/PrintStreamprintln
<00> <00><00>getReceiveThread()Ljava/lang/Thread;<00>接收线程已在运行
<00> <00>) getChannelId<00>java/lang/Thread<00>[com/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy$ReceiveRunnable
<00><00> <00>u(Lcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy;Ljava/lang/String;Ljava/lang/String;I)V<00>Com-Receive-Thread-
<00><00> <00>)(Ljava/lang/Runnable;Ljava/lang/String;)V
<00><00> <00><00> setDaemon(Z)V
<00><00> <00>start<00>接收线程启动成功<00>$接收线程未运行,无需停止
<00><00> <00>RisAlive
<00><00> <00> interrupt<07>
<00><00> <00><00>join(J)V <00> <00><00>err<00><接收线程未能正常退出,可能存在资源未释放<00>java/lang/InterruptedException
<00><00> <00><00> currentThread<00> 停止接收线程时被中断:
<00><00> <00>)
getMessage<00>接收线程已停止
<00><00><00> <00><00>java/nio/ByteBufferposition()I
<00><00> <00><00> duplicate()Ljava/nio/ByteBuffer;
<00><00> <00><00>flip
<00><00> <00><00> remaining
<00><00> <00>([B)Ljava/nio/ByteBuffer;
<00><00><00> <00><00>2com/cbsd/universaltestsoftwareserver/util/HexUtilsbyteArrayToHexString([B)Ljava/lang/String;<00>接收到串口上传数据: <00><00><00> <00><00>!java/nio/charset/StandardCharsetsUTF_8Ljava/nio/charset/Charset;
7<00> <00>([BLjava/nio/charset/Charset;)V<00>9com/cbsd/universaltestsoftwareserver/netty/SendTcpContent <00><00><00> <00><00>Gcom/cbsd/universaltestsoftwareserver/netty/SendTcpContent$OperationTypeDATAILcom/cbsd/universaltestsoftwareserver/netty/SendTcpContent$OperationType;<00>
<00><00> <00>s([BLjava/lang/String;Lcom/cbsd/universaltestsoftwareserver/netty/SendTcpContent$OperationType;ILjava/lang/String;)V
<00><00><00> <00>>com/cbsd/universaltestsoftwareserver/netty/MessageQueueManagerbroadcastMessage>(Lcom/cbsd/universaltestsoftwareserver/netty/SendTcpContent;)V
<00> <00>clearjava/util/HashMap
  
  fcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy$ThisProxSupportChannelType
SerialPorthLcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy$ThisProxSupportChannelType;Ecom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BaseBoardType  Hcom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BoardSeriesNames SERIAL_PORTJLcom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BoardSeriesNames;
 )getName用于串口使用
 )getValue
  <00>(Lcom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BoardSeriesNames;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V !^" java/util/Map
$ %&getBoardTypeInfo()Ljava/util/Map;(Acom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BaseBoard
' + 串口板
'- ., setBoardName01
'2 3, setBoardIndex
'5 6,setBoardSerialNumber !
'9 :;setBaseBoardTypeJ(Lcom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BaseBoardType;)V=java/util/ArrayList
< @AB C;java/util/Listadd
E FGgetAvailablePorts()[Ljava/lang/String;IDcom/cbsd/universaltestsoftwareserver/vo/CommunicationChannelPathInfo
H
HL M,setChannelPath
HO P,setChannelName RST UVQcom/cbsd/universaltestsoftwareserver/vo/CommunicationChannelPathInfo$IsUpDateTypeNOSLcom/cbsd/universaltestsoftwareserver/vo/CommunicationChannelPathInfo$IsUpDateType;
HX YZ setIsUpTypeV(Lcom/cbsd/universaltestsoftwareserver/vo/CommunicationChannelPathInfo$IsUpDateType;)V \]^ _`Rcom/cbsd/universaltestsoftwareserver/vo/CommunicationChannelPathInfo$RWChannelTypeREAD_WRITE_CHANNELTLcom/cbsd/universaltestsoftwareserver/vo/CommunicationChannelPathInfo$RWChannelType;
Hb cdsetRwChannelTypeW(Lcom/cbsd/universaltestsoftwareserver/vo/CommunicationChannelPathInfo$RWChannelType;)V
Hf ghsetBoardChannelType=(Lcom/cbsd/universaltestsoftwareserver/vo/BoardChannelType;)Vj>com/cbsd/universaltestsoftwareserver/vo/ProxyRegisterFunctionsl 打开设备 nop qracom/cbsd/universaltestsoftwareserver/dllserviceproxy/ZlgcanDllServiceProxy$REGISTER_FUNCTION_TYPE OPEN_DEVICEcLcom/cbsd/universaltestsoftwareserver/dllserviceproxy/ZlgcanDllServiceProxy$REGISTER_FUNCTION_TYPE;
nuMcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy$1
tT
ix y7(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)V{ 关闭设备 n} ~r CLOSE_DEVICE<01>6com/cbsd/universaltestsoftwareserver/vo/ProxyExtraData
 <01>Mcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy$2
<01>T
<01> <01><01> setParamsList(Ljava/util/List;)V
<01><01><01> <01><01>Hcom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BoardChannelInfogetReceiveTcpContent@()Lcom/cbsd/universaltestsoftwareserver/netty/ReceiveTcpContent;
<01><01> <01><01>
getChannelE()Lcom/cbsd/universaltestsoftwareserver/module/manage/entity/Channel;
<01><01> <01><01>getBoardC()Lcom/cbsd/universaltestsoftwareserver/module/manage/entity/Board;
<01><01> <01><01> getBoardTypeG()Lcom/cbsd/universaltestsoftwareserver/module/manage/entity/BoardType;
<01><01><01> <01><01><com/cbsd/universaltestsoftwareserver/netty/ReceiveTcpContentgetOperationTypeN()Lcom/cbsd/universaltestsoftwareserver/netty/ReceiveTcpContent$OperationType;
<01><01> <01><01>getBytesContent()[B
<01><00><01>Acom/cbsd/universaltestsoftwareserver/module/manage/entity/Channel
<01><01> <01>)getChannelPath
<01><01> <01>) getExtraData
<01><01><01> <01><01>;com/cbsd/universaltestsoftwareserver/util/QueryStringParser
parseToMap#(Ljava/lang/String;)Ljava/util/Map; <01><01><01> <00><01>Jcom/cbsd/universaltestsoftwareserver/netty/ReceiveTcpContent$OperationTypeLLcom/cbsd/universaltestsoftwareserver/netty/ReceiveTcpContent$OperationType;
<01> <01><01>sendData(Ljava/lang/String;[B)Z<01>java/lang/Exception <01> <01><01>log!Lorg/apache/logging/log4j/Logger;
<01><00> <01><01><01> <01>,org/apache/logging/log4j/Loggererror <01><01> <01><01>REGISTER
7<01> <01>([B)V <01><01><01> q<01>bcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy$REGISTER_FUNCTION_TYPEdLcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy$REGISTER_FUNCTION_TYPE;
<01><01>baudRate
<01><01><01> <01><01>java/lang/IntegerparseInt(Ljava/lang/String;)I<01>dataBits<01>stopBits<01>parity
<01> <01><01>openSerialPortO(Ljava/lang/String;Ljava/lang/String;IIII)Lcom/fazecast/jSerialComm/SerialPort;<01>打开串口成功 <01><01> <01>,info
<01> <01><01>startReceiveData(Ljava/lang/String;I)I <01><01> ~<01>
<01> <01><01>stopReceiveData
<01> <01><01>closeSerialPort(Ljava/lang/String;)Z<01>关闭串口成功
<01> <01>(Ljava/lang/Throwable;)V
<01> #org/apache/logging/log4j/LogManager getLogger4(Ljava/lang/Class;)Lorg/apache/logging/log4j/Logger;
 =com/cbsd/universaltestsoftwareserver/interfaces/IDeviceCommon=com/cbsd/universaltestsoftwareserver/netty/parser/IBaseParserchannelServiceLLcom/cbsd/universaltestsoftwareserver/module/manage/service/IChannelService;RuntimeVisibleAnnotationsLjavax/annotation/Resource; Signature<00>Ljava/util/concurrent/ConcurrentHashMap<Ljava/lang/String;Lcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy$SerialPortObject;>;CodeLineNumberTableLocalVariableTablethisMLcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy;port%Lcom/fazecast/jSerialComm/SerialPort; channelIdLjava/lang/String;portNameIserialPortObject^Lcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy$SerialPortObject;
serialPortports&[Lcom/fazecast/jSerialComm/SerialPort; StackMapTableMethodParametersdata[B
sendLengthreadBufferLength receiveThreadLjava/lang/Thread;e Ljava/lang/InterruptedException;
bufferCopyLjava/nio/ByteBuffer;remainingLength hexStringresult rawBuffer1java/lang/Throwable9(Ljava/lang/String;)Lcom/fazecast/jSerialComm/SerialPort;i portNames[Ljava/lang/String;5 isConnected boardTypeInfoLjava/util/Map;LocalVariableTypeTable<00>Ljava/util/Map<Lcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy$ThisProxSupportChannelType;Lcom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BaseBoardType;>;<00>()Ljava/util/Map<Lcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy$ThisProxSupportChannelType;Lcom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BaseBoardType;>;getBoardInfoOnTheMotherBoard()Ljava/util/List; baseBoardCLcom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BaseBoard;
baseBoardsLjava/util/List;ULjava/util/List<Lcom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BaseBoard;>;W()Ljava/util/List<Lcom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BaseBoard;>;getCommunicationChannelPath<00>(Lcom/cbsd/universaltestsoftwareserver/module/manage/entity/Board;Lcom/cbsd/universaltestsoftwareserver/module/manage/entity/BoardType;)Ljava/util/List;communicationChannelPathInfoFLcom/cbsd/universaltestsoftwareserver/vo/CommunicationChannelPathInfo;sboardALcom/cbsd/universaltestsoftwareserver/module/manage/entity/Board; boardTypeELcom/cbsd/universaltestsoftwareserver/module/manage/entity/BoardType;communicationChannelPathInfos portsListXLjava/util/List<Lcom/cbsd/universaltestsoftwareserver/vo/CommunicationChannelPathInfo;>;R?com/cbsd/universaltestsoftwareserver/module/manage/entity/BoardTCcom/cbsd/universaltestsoftwareserver/module/manage/entity/BoardType<00>(Lcom/cbsd/universaltestsoftwareserver/module/manage/entity/Board;Lcom/cbsd/universaltestsoftwareserver/module/manage/entity/BoardType;)Ljava/util/List<Lcom/cbsd/universaltestsoftwareserver/vo/CommunicationChannelPathInfo;>;getThisProxyDoardChannleTypeMap_()Ljava/util/Map<Ljava/lang/String;Lcom/cbsd/universaltestsoftwareserver/vo/BoardChannelType;>; getThisProxyRegisterFunctionTypeY(Lcom/cbsd/universaltestsoftwareserver/module/manage/entity/ChannelType;)Ljava/util/List; channelTypeGLcom/cbsd/universaltestsoftwareserver/module/manage/entity/ChannelType;registerFunctionListRLjava/util/List<Lcom/cbsd/universaltestsoftwareserver/vo/ProxyRegisterFunctions;>;<00>(Lcom/cbsd/universaltestsoftwareserver/module/manage/entity/ChannelType;)Ljava/util/List<Lcom/cbsd/universaltestsoftwareserver/vo/ProxyRegisterFunctions;>;getThisProxyExtraData<00>(Lcom/cbsd/universaltestsoftwareserver/module/manage/entity/ChannelType;)Lcom/cbsd/universaltestsoftwareserver/vo/ProxyExtraData;proxyExtraData8Lcom/cbsd/universaltestsoftwareserver/vo/ProxyExtraData;parseM(Lcom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BoardChannelInfo;)VLjava/lang/Exception;receiveTcpContentBytesContent functionTypeboardChannelInfoJLcom/cbsd/universaltestsoftwareserver/dllInterfaces/pojo/BoardChannelInfo;receiveTcpContent>Lcom/cbsd/universaltestsoftwareserver/netty/ReceiveTcpContent;channelCLcom/cbsd/universaltestsoftwareserver/module/manage/entity/Channel; operationType bytesContent channelPath extraDataextraDataResult5Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;#
access$000*()Ljava/util/concurrent/ConcurrentHashMap;
access$100w(Lcom/cbsd/universaltestsoftwareserver/dllserviceproxy/SerialPortServiceProxy;Ljava/lang/String;Ljava/nio/ByteBuffer;)Vx0x1x2<clinit>
SourceFileSerialPortServiceProxy.java*Lorg/springframework/stereotype/Component; InnerClassesSerialPortObjectReceiveRunnable OperationTypeThisProxSupportChannelType IsUpDateType RWChannelType<02>Jcom/cbsd/universaltestsoftwareserver/dllserviceproxy/ZlgcanDllServiceProxyREGISTER_FUNCTION_TYPE! <01><01> 
 
 /*<2A> <0B>* <01><01>*<08>,<2C><11>:<07>#<23>Y<>Y<><1E> ,<2C> $<24> <20>&<26>*<2A>:<08>-:  :

<EFBFBD>6 6   <0B>#
 2:  <0A>3,<2C>6<>
 :<08> <09> <01><><EFBFBD><08>#<23>Y<>Y<><1E> ,<2C> <<3C> <20>&<26>*<2A><1D>>W<04>BW<05>EW<06>HW<03><03>KW<08>O<>'<27>Y*<2A>S:<08>V+<2B>Z<>,<07>]W<08><>Y<>Y<><1E> ,<2C> a<> <20>&<26>*<2A>bd ef1i4k9nSo_pcqfnluqv<00>z<00>{<00>|<00>}<00>~<00><00><00><00><00><00><00><00><00><00><00><00><00><00>p S <01><01><01><01> <00>4<00>9<00> 2<06>1<17> 77.   <20>$<24>V!<01><01><01><01><01><01>(<00><>+<2B><11>M,<2C>o,<2C>cN-<2D>F-<2D>g<>,<2C>c<>jW,<01>V,<01>m<>+<2B>qW<04><>Y<>Y<><1E> +<2B> t<> <20>&<26>*<2A><>Y<>Y<><1E> +<2B> v<> <20>&<26>*<2A><>Y<>Y<><1E> +<2B> x<> <20>&<26>*<2A>6 <00> <00><00><00><00><00>'<00>,<00>1<00>9<00>;<00>[<00>{<00>*g<00><00> <00><03>;.<1F>!<01><01>r<>+<2B><11>N-<2D>#<23>Y<>Y<><1E> +<2B> x<> <20>&<26>*<2A>-<2D>c:<04>#<23>Y<>Y<><1E> +<2B> x<> <20>&<26>*<2A>,,<2C><><EFBFBD>z6,<2C><><04><03>"<00> <00><00>/<00>5<00>:<00>Z<00>e<00>>rrr"# g5=e $<04>/<17>*.<2E>@! "<01><01>$<00><>~<7E>Y<><12><> +<2B> <12><> <20>&<26><00><>+<2B><11>N-<2D><00>:<04> <0A>~<12><><00><03>-<2D><00>:<05><00>Y<EFBFBD><00>Y*+<1C><00><>Y<><12><> +<2B> <20>&<26><00>:-<04>m<03><00><04><00><>~<12><><00><04>6 <00><00>)<00>/<00>4<00><<00>><00>D<00>l<00>r<00>x<00>}<00><00><00>><00><00><00>%)^/X&'DC <01>><00>! %<01><01>-x<>+<2B><11>M,<2C><00>N-<2D> <0A>~<12><><00><03>,<01>m-<2D><00><>E-<2D><00>-<00><><00>-<2D><00><> <0B><00><12><><00><>(:<04><00><><00><><00><>Y<>ö <04>Ŷ <20>&<26><00>N<>~ȶ<00><04>.DG<00>J<00> <00><00><00><00><00>#<00>*<00>.<00>5<00><<00>D<00>G<00>I<00>O<00>l<00>n<00>v<00>4I#()xx mh&'<04><00>%B<00>$!I
<00>,YN<59>,<2C>ʞk,<2C><00>:<04><00>W<04><00>6<05>:<06><00>W<06><00>:<07>~<7E>Y<><12><> <07> <20>&<26><00><>7Y<06><00><><00>:<08><00>Y+<2B><00><12><><00><><00>,<2C>W-ç
: -<2D> <09><>uxx|x:QS UWYZ$[,]3^M_[nnpsrsRb*+U,$O"#3@-[.<00><00><00>/+<03>s D0<>! /e2<00>]<5D>+<2B><11>M,<2C>#<23>Y<>Y<><1E> +<2B> t<> <20>&<26>*<2A>,<2C>cN-<2D>#<23>Y<>Y<><1E> +<2B> t<> <20>&<26>*<2A>,<2C>c<>y z{/}4~8X<01>*]] R4)<02>/<17>(.!FG<00>#<23>-L+<2B><>7M>+<2B><>,+2<>3S<33><01><><EFBFBD>,<2C><01><01>
<01><01><01>!<01>* 3#
45<02>  6<01>7<01><00> <20>+<2B><11>M,<2C><03>,<2C>cN-<2D><04><03><01> <01><01><01><01>*   
<03><17> .@!%&| .<2E>Y<>L+<2B><07> Y<><0F><07><18><07><04><1D> W+<2B><01><01>,<01>.&89: &8; <=><00>D*<2A>#L<>'Y<>)M,*<2A>,,/<2F>1,/<2F>4,+<2B><07>7<00> <0A>8<><Y<>>N-,<2C>?W-<2D>& <01><01> <01><01><01>"<01>2<01>:<01>B<01>*D?89 7?@:
AB:?8;:
AC DEF0
f<><Y<>>N*<2A>D::<05>66<06>F2:<08>HY<48>J:  <08>K <08>N <09>Q<>W <09>[<5B>a <01>e- <09>?W<><01><><EFBFBD>-<2D>2 <01><01><01>(<01>1<01>8<01>?<01>G<01>O<01>U<01>^<01>d<01>H1-GH (6IffJKfLM^NBXO5: ^NP <02>QS@66<00>I! JL UV&,<01><01>  WXY<00>G<><Y<>>M,<2C>iYk<>m<>s<>tY*<2A>v<>w<>?W,<2C>iYz<>|<7C>s<><Y<>><3E>w<>?W,<2C><01>'E  GGZ[?\B: ?\]!Z ^_`\<16>Y<7F><01>M,<2C><01>Y*<2A><01><><01>,<2C> Z[ab!Zcd?+<2B><01>M+<2B><01>N+<2B><01>:+<2B><01>:,<2C><01>:,<2C><01>:-<2D><01>:-<2D><01>: ,<2C><01>:

<EFBFBD><01>: <06><01><>!* <07><01>W<EFBFBD><00>: <0C><01> <0C>ù<01><00><00><06>ɦ<00>,<2C><01>: <0C>7Y <0C><01>: <0A>϶<01> <0A>6<>t չ7<00>7<><01>6 ݹ7<00>7<><01>6 ߹7<00>7<><01>6 <01><>7<00>7<><01>6* <11><01>W<EFBFBD><01><01><><01>* <00><01>W<EFBFBD>,<2C><01><><01> <0A>6<>* <09><01>W* <09><01><><0E><01><01><><01><00>: <0C><01> <0C>ù<01><00>Y <0C><01><><EFBFBD>CLO<01>i"%<01><00>$!"
#$'("+(,.-4.;1C4L7O5Q6^7a9i<o=z@<00>B<00>C<00>D<00>E<00>F<00>G<00>H<00>IKLM"S%P'Q4R>U<00>Q (e <00>\<01><00>J<01><00>8<01><00>&<01>o<00>f# z<00>g '(e ??hi:jk
5lm/JK)LM#n<01>"o#(.p 4 q
;r9 : ;rs B<06>O <01><01><01>QS<01>t777!<01><11><00>t7<>(B<01>!huv<04><07>*wxE*+,<2C><01>* yz{+|/<02><01><><01><>Y<><04><07>
(S}~ <02>Z <02><00><02><00><00><02>@<02>@RH<02>@\H<02>@n<02><02>@t<01><01><01><02>@<01><02>@