#include "Acl.h" #include int main( int argc, char** argv ) { Acl *acl = new Acl(); acl->fill2(1, 11, 6, 0x1234); acl->fill2(1, 11, 7, 0x5678); acl->fill(1, 11, 5, 0, true); acl->fill(1, 11, 5, 1, true); uint32_t* result = acl->get(); // Dump data to screen cerr.setf( ios::hex, ios::basefield ); for ( uint32_t i = 0; i < acl->size(); i++ ) { cerr << setw(3) << "0x" << i << ": 0x" << result[i] << endl; } // once more acl->reset(); cerr << "==============================" << endl; for ( uint32_t i = 8; i < 16; i++ ) acl->fill(1, 11, 5, i, true); for ( int i = 15; i >= 0; i-- ) acl->fill(1, 8, 6, (uint32_t)i, true); acl->fill2(1, 11, 6, 0x1234); acl->fill2(1, 11, 7, 0x5678); for ( uint32_t i = 0; i < acl->size(); i++ ) { cerr << setw(3) << "0x" << i << ": 0x" << acl->at(i) << endl; } if (acl->isChannelActive(1, 11, 5, 12)) cout << "channel 1 is active!" << endl; if (acl->isChannelActive(1, 1, 7, 12)) cout << "channel 2 is active!" << endl; if (acl->isChannelActive(1, 8, 6, 2)) cout << "channel 3 is active!" << endl; delete acl; acl = 0; return 1; }