Skip to content

Commit

Permalink
2021-07-12T15:04
Browse files Browse the repository at this point in the history
  • Loading branch information
kenta-shimizu committed Jul 12, 2021
1 parent c136489 commit ea073a2
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 41 deletions.
Binary file modified docs/CliSecsSimulator.jar
Binary file not shown.
Binary file modified docs/SwingSecsSimulator.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -254,59 +254,58 @@ private void entryCircuit() throws InterruptedException {

try {

this.sendByte(ENQ);

for (int retry = 0; retry <= this.secs1Config().retry().intValue(); ) {
for ( int retry = 0; retry <= this.secs1Config().retry().intValue(); ) {

Byte b = this.circuitQueue.pollByte(this.secs1Config().timeout().t2());
this.sendByte(ENQ);

if ( b == null ) {

this.notifyLog(Secs1RetryCircuitControlLog.newInstance(retry));
retry += 1;
for ( ;; ) {

this.sendByte(ENQ);
Byte b = this.circuitQueue.pollByte(this.secs1Config().timeout().t2());

} else if ( b.byteValue() == ENQ && ! this.secs1Config().isMaster().booleanValue() ) {
if ( b == null ) {

try {
this.receiveCircuit();
}
catch ( SecsException e ) {
this.notifyLog(e);
}

retry = 0;
pack.reset();

this.sendByte(ENQ);

} else if ( b.byteValue() == EOT ) {

if ( this.sendCircuit(pack.present()) ) {
this.notifyLog(Secs1RetryCircuitControlLog.newInstance(retry));
retry += 1;
break;

if ( pack.ebit() ) {
} else if ( b.byteValue() == ENQ && ! this.secs1Config().isMaster().booleanValue() ) {

this.sendMgr.putSended(pack.message());
this.offerSendedMsgPassThroughQueue(pack.message());
this.notifyLog(new Secs1SendedMessageLog(pack.message()));
try {
this.receiveCircuit();
}
catch ( SecsException e ) {
this.notifyLog(e);
}

retry = 0;
pack.reset();
break;

} else if ( b.byteValue() == EOT ) {

if ( this.sendCircuit(pack.present()) ) {

return;
if ( pack.ebit() ) {

this.sendMgr.putSended(pack.message());
this.offerSendedMsgPassThroughQueue(pack.message());
this.notifyLog(new Secs1SendedMessageLog(pack.message()));

return;

} else {

pack.next();
retry = 0;
break;
}

} else {

pack.next();
retry = 0;

this.sendByte(ENQ);
this.notifyLog(Secs1RetryCircuitControlLog.newInstance(retry));
retry += 1;
break;
}

} else {

this.notifyLog(Secs1RetryCircuitControlLog.newInstance(retry));
retry += 1;

this.sendByte(ENQ);
}
}
}
Expand Down

0 comments on commit ea073a2

Please sign in to comment.