Archive for June, 2009

Another day…

Tuesday, June 30th, 2009

I’m about to close up shop for the night so it’s time to check in here. I spent the day again working on integrating the libtpproto-cpp protocol’s event loop. I’m working on two approaches at the same time. One is to rewrite the TPSocket* handler using Qt and create an eventloop using QAbstractEventDispatcher and QSocketNotifier classes. This approach is a little bit outside my knowledge of Qt but I’m trying to piece it together. The second approach I’m trying is to hack a modified version of the SimpleEventLoop class from the protocol into the Qt client. This has not yet been succesful either. Compiling Parsek fails where the eventloop class reads a callback signal like this (*timer.signal)(); where timer.signal is boost::signal that is connected to the callback. Boost creates an error like this:

parsekeventloop.cpp:(.text._ZNK5boost9function0IvEclEv[boost::function0::operator()() const]+0×27): undefined reference to `boost::throw_exception(std::exception const&)’ .

The good news is that I have narrowed the error down to that point and I’m going to continue working on both approaches to the fixing the event loop. In between hacking on the event loop, I spent sometime working on the implementation of this status listener class.

class ParsekStatusListener : public QObject, public TPProto::GameStatusListener
{
Q_OBJECT
public:
void connected();
void disconnected();
bool redirected(const std::basic_string< char >&)
void accountCreated(bool);
void loggedIn(bool);
void eotStarted();
void eotEnded();
void timeToEot(uint32_t);

public Q_SIGNALS:
void signalConnected();
void signalDisconnected();
void signalAccountCreated(bool);
void signalLoggedIn(bool);
void signalEotStarted();
void signalEotEnded();
void signalTimeToEot(quint32);
};

Tomorrow I hope to maybe get a lid on this event loop “black magic” as a friend called it and continue working on getting Parsek fully connected.

Signals and Systems … Slots

Monday, June 29th, 2009

This past week I wrapped up my summer school class for Signals and Systems. It was harder than I expected so I’m happy it is now out of the way. Lately I’ve been confused with Qt’s Signals and Slots while trying to integrate the protocol backend. Specifically, I need to subclass this EventLoop class in my Qt application. Trying to integrate the protocol’s eventloop with Parsek has proven to be confusing. The libtpproto-cpp protocol library also uses Boost::signals pretty heavily which further complicates things considering I’m not familiar with Boost at all. The good news is that I’m learning both Qt and Boost. I have posted for help here and here. I’m looking into some of the solutions suggested but this is all new terrerority for me. I’m racing to have my milestones on track for the midterm so if I cannot resolve the eventloop problem, I will focus on other components of Parsek. There’s still a lot of work for me to do to catch up.

To make up for my total neglect of this blog, I’ve decided to start writing daily so I hope I see you tomorrow…

H1N.5

Wednesday, June 3rd, 2009

Unfortunately I’ve been out of commission for more than a week with a pretty bad flu, which I call H1N.5. It has been an up and down ride. I thought I was on the road to recovery before the weekend and my optimistic thinking came back to bite me in the ass. The good news is I’m finally feeling better and have been for the past couple of days. My appetite is back to normal and I have been trying to get some exercise in along with my usual jujitsu practices. The bad news is that I am behind schedule and now have to haul ass to get back to speed.

I plan on working double time over the next couple weeks to re-allign myself with my objectives. I know this blog hasn’t exactly been maintained and updated regularly but my priorities have been strictly focused on code. I have familiarized myself with the C++ TP protocol library. There is a lot of new functionality that is in place as part of the new protocol standard which simply does not work with the existing code in Parsek. I have begun the process of rewriting the existing code in Parsek and found this to be quite tedious. My plan is to now focus on simply building much of the required functionality from scratch rather than trying to retrofit the Parsek code base. In the next few days I hope to have server connectivity and basic game status management functionality in place. I will hopefully have more updates on my progress by the weekend.