Skip to main content

sow-paginated

Including the basic AMPS library:

#include <amps/ampsplusplus.hpp>

Constructing the command:

AMPS::Command cmd(AMPS::Message::Command::SOW);
cmd.setTopic(topic).setOrderBy("/id DESC");

AMPS::Message::Options opts;
opts.setTopN(10);
opts.setSkipN(100);
// set other options as needed

cmd.setOptions(opts);

The command can now be used in execute or executeAsync.