Audiovox P965 Arkusz Danych Strona 120

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 280
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 119
API In CPP
117
}
/********************************************************************
* Add a Sentence to a block
********************************************************************/
void Block::AddSentence(const Sentence &sentence)
{
sentences.push_back(sentence);
DEBUG ? printf("AddSentenceToBlock Size=%d\n", sentences.size()) : 0;
}
/********************************************************************
* Print a block.
********************************************************************/
bool Block::Print()
{
DEBUG ? printf("PrintBlock\n") : 0;
DEBUG ? printf("Block Size = %d\n", sentences.size()) : 0;
for (int i = 0; i < sentences.size(); ++i) {
sentences[i].Print();
}
return true;
}
Mikrotik API header file (MikrotikAPI.h)
This is the API header file. This file contains the MikrotikAPI class.
Notes:
NOCONNECT, NOLOGIN constants are defined.
/********************************************************************
* Some definitions
* Word = piece of API code
* Sentence = multiple words
* Block = multiple sentences (usually in response to a Sentence request)
*
try {
MikrotikAPI mt = MikrotikAPI("64.126.135.214", "test", "joey", 8728);
Sentence sentence;
Block block;
// Fill and send sentence to the API
sentence.AddWord("/interface/getall");
Przeglądanie stron 119
1 2 ... 115 116 117 118 119 120 121 122 123 124 125 ... 279 280

Komentarze do niniejszej Instrukcji

Brak uwag