添加遥控业务代码
This commit is contained in:
@@ -15,6 +15,7 @@ Get-Command $Compiler -ErrorAction Stop | Out-Null
|
||||
$libraryNames = @(
|
||||
'104/business/IEC104_Interrogation.c', '104/business/IEC104_GeneralInterrogation.c',
|
||||
'104/business/IEC104_CounterInterrogation.c', '104/business/IEC104_ClockSynchronization.c',
|
||||
'104/business/IEC104_Command.c',
|
||||
'104/IEC104_Slave.c',
|
||||
'common/IEC60870_Slave.c', 'common/IEC60870_Asdu.c',
|
||||
'common/IEC60870_InformationObjects.c', 'common/IEC60870_Time.c', 'common/IEC60870_Clock.c',
|
||||
@@ -54,6 +55,18 @@ if ($Test) {
|
||||
& $testOutput
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Slave example tests failed' }
|
||||
}
|
||||
# Command transactions use one fixed slot and a bounded independent reply pool.
|
||||
# The controlled backend includes TcpServer.c; do not link TCP/Windows Net again.
|
||||
$commandTestSources = @((Join-Path $projectRoot 'test/iec104_command_test.c')) + $librarySources
|
||||
foreach ($capacity in @(1, 2)) {
|
||||
foreach ($replyCapacity in @(1, 4)) {
|
||||
$commandOutput = Join-Path $exampleBuild "iec104_command_test_${capacity}_${replyCapacity}.exe"
|
||||
& $Compiler @compileFlags "-DIEC104_TCP_SERVER_CAPACITY=$capacity" "-DIEC104_COMMAND_REPLY_CAPACITY=$replyCapacity" -DIEC104_TCP_HIGH_CAPACITY=251 @commandTestSources -o $commandOutput
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Command test build failed' }
|
||||
& $commandOutput
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Command tests failed' }
|
||||
}
|
||||
}
|
||||
$rulesOutput = Join-Path $exampleBuild 'iec104_interrogation_rules_test.exe'
|
||||
$rulesSources = @(
|
||||
(Join-Path $projectRoot 'test/iec104_interrogation_rules_test.c'),
|
||||
|
||||
Reference in New Issue
Block a user