#ifndef THREE_PI_LIB_PACK_H
#define THREE_PI_LIB_PACK_H

#include "3pifunctions.h"
#include "loadConfig.h"

void setConnection()
{
    config.loadFile("3pi.ini");
    gConnectionAddress = config.getValue("ip");
    gConnectionPort = config.getIntValue("port");
    gRobotName = "3pi";
}

bool initialization()
{
    setConnection();
    globalTimer.start();
    return startClient();
}

void run();

void finish()
{
    endClient();
}

int main()
{
    if( !initialization() )
    {
        return 0;
    }
    std::cout << "3pi robot is running..." << std::endl;
    run();
    std::cout << "Program finished..." << std::endl;
    finish();
    return 0;
}

#endif // THREE_PI_LIB_PACK_H
