/* * sync.h * * Copyright (c) 2009 Ismael Gomez-Miguelez, UPC , * Xavier Reves, UPC * All rights reserved. * * * This file is part of ALOE. * * ALOE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * ALOE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with ALOE. If not, see . * */ #define MAX_CHILD 5 #define SYNC_KEY 0x10011001 #define DEFAULT_PERIOD 1000 #define MIN_PERIOD 200 #define MIN_ROUND_TRIP 100 #define DEFAULT_ROUND_TRIP 2000 struct syncdata { int key; time_t tx_time; time_t rx_time; time_t ref_time; }; struct sync_register { int cmd; hwitf_t itf_id; peid_t pe_id; int plat_family; int tslen_usec; int period; int round_trip_limit; }; #define SYNC_REGISTER_MAGIC 0x10203040 #define SYNC_REGISTER_OK 0x0000FFFF #define SYNC_REGISTER_ERROR 0xFFFF0000 #define SYNC_MASTER_ITF 0x2 #define SYNC_SLAVE_ITF 0x3