DNS/Player simulation dto

This commit is contained in:
moxitech 2024-11-16 19:39:43 +07:00
parent d249b1cf62
commit 45b46d155d

View File

@ -128,11 +128,24 @@ const InitPlayer: React.FC<Player> = ({ Click, TimeStep, TimeEnd, onTimeUpdate }
);
};
// IPlayerSimulationPart - часть симуляции
interface IPlayerSimulationPart {
Timestamp?: number // Временная метка
CGS?: [] // базовые станции - DTO
UAV?: [] // беспилотные аппараты - DTO
}
// IPlayerTsInstance - объект плеера
interface IPlayerTsInstance {
TimestampEnd?: number
TimestampStep?: number
Simulations?: IPlayerSimulationPart[]
}
const PlayerTsInstance : React.FC<IPlayerTsInstance> = () => {
const PlayerTsInstance : React.FC<IPlayerTsInstance> = ({
TimestampEnd,
TimestampStep,
Simulations
}) => {
const [drones, setDrones] = useState<Drone[]>([]);
const [baseStations, setBaseStations] = useState<BaseStation[]>([]);
const [selectedObject, setSelectedObject] = useState<{ type: 'drone' | 'baseStation'; id: number } | null>(null);
@ -268,7 +281,6 @@ const PlayerTsInstance : React.FC<IPlayerTsInstance> = () => {
<button onClick={() => selectNextObject('next')} className="p-2 m-2 bg-yellow-500 text-white rounded transition duration-300 ease-in-out transform hover:scale-105 focus:scale-95">&gt;</button>
</div>
</div>
);
};