X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/13e0c316176dfe56c04b66d96b65a174e76d0549..310e28eac7bc0c752880767cd88a66d64ebf04ef:/src/surf/vm_workstation_interface.hpp diff --git a/src/surf/vm_workstation_interface.hpp b/src/surf/vm_workstation_interface.hpp index ec334ac5b5..262b288f7a 100644 --- a/src/surf/vm_workstation_interface.hpp +++ b/src/surf/vm_workstation_interface.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2013. The SimGrid Team. +/* Copyright (c) 2004-2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -27,6 +27,28 @@ typedef WorkstationVM *WorkstationVMPtr; class WorkstationVMLmm; typedef WorkstationVMLmm *WorkstationVMLmmPtr; +/************* + * Callbacks * + *************/ + +/** @ingroup SURF_callbacks + * @brief Callbacks handler which emit the callbacks after WorkstationVM creation * + * @details Callback functions have the following signature: `void(WorkstationVMPtr)` + */ +extern surf_callback(void, WorkstationVMPtr) workstationVMCreatedCallbacks; + +/** @ingroup SURF_callbacks + * @brief Callbacks handler which emit the callbacks after WorkstationVM destruction * + * @details Callback functions have the following signature: `void(WorkstationVMPtr)` + */ +extern surf_callback(void, WorkstationVMPtr) workstationVMDestructedCallbacks; + +/** @ingroup SURF_callbacks + * @brief Callbacks handler which emit the callbacks after WorkstationVM State changed * + * @details Callback functions have the following signature: `void(WorkstationVMActionPtr)` + */ +extern surf_callback(void, WorkstationVMPtr) workstationVMStateChangedCallbacks; + /********* * Model * *********/ @@ -55,7 +77,6 @@ public: */ virtual void createResource(const char *name, void *ind_phys_workstation)=0; - void adjustWeightOfDummyCpuActions() {}; }; @@ -79,14 +100,15 @@ public: * @param cpu The Cpu associated to this Workstation */ WorkstationVM(ModelPtr model, const char *name, xbt_dict_t props, - RoutingEdgePtr netElm, CpuPtr cpu) - : Workstation(model, name, props, NULL, netElm, cpu) {} + RoutingEdgePtr netElm, CpuPtr cpu); /** - * @brief WdorkstationVM estructor + * @brief WdorkstationVM destructor */ ~WorkstationVM(); + void setState(e_surf_resource_state_t state); + /** * @brief Suspend the VM */