void UpdateSplit(SPluginsKartSplit_t* psSplitData) { stCombined.splitId = IncrementId(stCombined.splitId); CopyMemory((PVOID)(pBuf+mapOffsetSplitId), &stCombined.splitId, sizeof(stCombined.splitId)); stCombined.split = *psSplitData; CopyMemory((PVOID)(pBuf+mapOffsetSplit), psSplitData, sizeof(SPluginsKartSplit_t)); }
void UpdateLap(SPluginsKartLap_t* psLapData) { stCombined.lapId = IncrementId(stCombined.lapId); CopyMemory((PVOID)(pBuf+mapOffsetLapId), &stCombined.lapId, sizeof(stCombined.lapId)); stCombined.lap = *psLapData; CopyMemory((PVOID)(pBuf+mapOffsetLap), psLapData, sizeof(SPluginsKartLap_t)); }
void UpdateSession(SPluginsKartSession_t* psSessionData) { stCombined.sessionId = IncrementId(stCombined.sessionId); CopyMemory((PVOID)(pBuf+mapOffsetSessionId), &stCombined.sessionId, sizeof(stCombined.sessionId)); stCombined.session = *psSessionData; CopyMemory((PVOID)(pBuf+mapOffsetSession), psSessionData, sizeof(SPluginsKartSession_t)); }
void UpdateEvent(SPluginsKartEvent_t* psEventData) { stCombined.eventId = IncrementId(stCombined.eventId); CopyMemory((PVOID)(pBuf+mapOffsetEventId), &stCombined.eventId, sizeof(stCombined.eventId)); stCombined.event = *psEventData; CopyMemory((PVOID)(pBuf+mapOffsetEvent), psEventData, sizeof(SPluginsKartEvent_t)); }
void UpdateTelemetry(float time, float pos, SPluginsKartData_t* psKartData) { stCombined.dataId = IncrementId(stCombined.dataId); CopyMemory((PVOID)(pBuf+mapOffsetDataId), &stCombined.dataId, sizeof(stCombined.dataId)); stCombined.onTrackTime = time; CopyMemory((PVOID)(pBuf+mapOffsetOnTrackTime), &stCombined.onTrackTime, 4); stCombined.trackPositionPct = pos; CopyMemory((PVOID)(pBuf+mapOffsetTrackPositionPct), &stCombined.trackPositionPct, 4); stCombined.data = *psKartData; CopyMemory((PVOID)(pBuf+mapOffsetData), psKartData, sizeof(SPluginsKartData_t)); }
void RpcHandler::SendNotification(const QSharedPointer<ISender> &to, const QString &method, const QVariant &data) { int id = IncrementId(); QVariantList container = Request::BuildNotification(id, method, data); QByteArray msg; QDataStream stream(&msg, QIODevice::WriteOnly); stream << container; qDebug() << "RpcHandler: Sending notification" << id << "for" << method << "to" << to->ToString(); to->Send(msg); }
int RpcHandler::SendRequest(const QSharedPointer<ISender> &to, const QString &method, const QVariant &data, const QSharedPointer<ResponseHandler> &cb, bool timeout) { int id = IncrementId(); qint64 ctime = Utils::Time::GetInstance().MSecsSinceEpoch(); TimerCallback *callback = new TimerCallback(this, &RpcHandler::Timeout, id); Utils::TimerEvent timer = Utils::Timer::GetInstance().QueueCallback(callback, TimeoutDelta); _requests[id] = QSharedPointer<RequestState>( new RequestState(to, cb, ctime, timer, timeout)); QVariantList container = Request::BuildRequest(id, method, data); QByteArray msg; QDataStream stream(&msg, QIODevice::WriteOnly); stream << container; qDebug() << "RpcHandler: Sending request" << id << "for" << method << "to" << to->ToString(); to->Send(msg); return id; }
UnFixedWageEmployee::UnFixedWageEmployee() { _empId = IncrementId(); _fixedPay = false; }