Skip to content
Snippets Groups Projects
Commit c5af1775 authored by RobertPatzke's avatar RobertPatzke
Browse files

No commit message

No commit message
parent 17feacf0
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,9 @@ void BlePoll::begin(ComType typeIn, int adrIn, AppType appType, dword watchDog)
if(typeIn == ctMASTER)
master = true;
else
master = false; void resetPollCounters();
master = false;
resetPollCounters();
chn = 0; // 1. Bewerbungskanal
......@@ -138,6 +140,7 @@ void BlePoll::begin(ComType typeIn, int adrIn, AppType appType, dword watchDog)
|| appType == atTestSend
|| appType == atDevSOAAP
|| appType == atSOAAP2
|| appType == atSOAPP2
)
{
pduOut.adr5 = 0x53;
......@@ -161,7 +164,9 @@ void BlePoll::begin(ComType typeIn, int adrIn, AppType appType, dword watchDog)
pduOut.data[1] = appType; // Pdu-Typ (TYPE)
pduIn.data[1] = appType;
// --------------------------------------------------------------------------
if(appType == atSOAAP1)
// --------------------------------------------------------------------------
{
if(master)
{
......@@ -177,7 +182,9 @@ void BlePoll::begin(ComType typeIn, int adrIn, AppType appType, dword watchDog)
plMode = plmSoaapS;
}
}
// --------------------------------------------------------------------------
else if(appType == atSOAAP2)
// --------------------------------------------------------------------------
{
if(master)
{
......@@ -212,7 +219,46 @@ void BlePoll::begin(ComType typeIn, int adrIn, AppType appType, dword watchDog)
plMode = plmSoaapS;
}
}
// --------------------------------------------------------------------------
else if(appType == atSOAPP2)
// --------------------------------------------------------------------------
{
if(master)
{
// Bei atSOAPP2 wird die Übermittlung von Daten beim Sendeaufruf implementiert.
// Das erfordert eine spezifische Behandlung für jeden Slave.
// Die globalen Anweisungen sind obsolet und sollen demnächst eliminiert werden.
// (Vorher Auswertung kontrollieren).
//
valuePdu.appId = plptIMU3F4Ctrl4;
ctrlPdu.appId = plptCtrl2;
plMode = plmSoaapM;
fullCycle = true;
for(int i = 1; i <= MAXSLAVE; i++)
{
ctrlPtr = (PlpCtrl25Ptr) &slaveList[i].control;
ctrlPtr->counter = 0;
ctrlPtr->type = appType;
ctrlPtr->appId = plptCtrl2;
ctrlPtr->ctrlPath = 0;
ctrlPtr->ctrlCnt = 0;
ctrlPtr->reqAppId = plptIMU3F4Ctrl4;
ctrlPtr->ctrl[0] = 0;
ctrlPtr->ctrl[1] = 0;
}
}
else
{
valuePdu.appId = plptIMU3F4Ctrl4;
ctrlPdu.appId = plptCtrl2;
plMode = plmSoaapS;
}
}
// --------------------------------------------------------------------------
else if (appType == atDevSOAAP)
// --------------------------------------------------------------------------
{
if(master)
{
......@@ -241,6 +287,12 @@ void BlePoll::begin(ComType typeIn, int adrIn, AppType appType, dword watchDog)
// Konfiguration
// --------------------------------------------------------------------------
//
void BlePoll::setNet(int chnIn, int areaIn)
{
chn = chnIn;
area = areaIn;
}
void BlePoll::setPollAddress(int chnIn, int adrIn, int areaIn, bool masterIn, bool eadrIn, bool nakIn)
{
chn = chnIn;
......
......@@ -305,6 +305,7 @@ public:
atTestSend, // einfacher Sendetest (Soaap)
atSOAAP1, // Steuerung optischer und akustischer Ausgaben für Performance-Künstler
atSOAAP2, // Version 2
atSOAPP2, // Version 2 erneuert (Beachte SOAAP->SOAPP)
atDevSOAAP, // Entwicklerbetrieb für SOAAP
atDHA // Dezentrale Hausautomatisierung
} AppType;
......@@ -470,6 +471,7 @@ public:
// Konfiguration
// --------------------------------------------------------------------------
//
void setNet(int chnIn, int areaIn); // Netzwerk ist Kanal und Area
void setPollAddress(int chnIn, int adrIn, int areaIn, bool masterIn, bool eadrIn, bool nakIn);
void setEmptyPollParams(int cycleTotal, int cycleRun, dword timeOut);
void setDataPollParams(int slAdr, int prio, int minPrio, dword timeOut);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment