Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
willi-menapace committed Aug 7, 2019
1 parent db85fc2 commit 6ca1509
Show file tree
Hide file tree
Showing 144 changed files with 12,850 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Action.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* Copyright (C) 2015 Willi Menapace <willi.menapace@gmail.com>, Simone Lorengo - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Willi Menapace <willi.menapace@gmail.com>
*/

#ifndef ACTION_INCLUDED
#define ACTION_INCLUDED

#include "GlobalDefines.h"

#include "NetworkResources.h"

#include "FileWriter.h"
#include "ActionTypes.cpp"
#include "XBee.h"

/**
* Classe astratta che rappresenta un'azione eseguibile
* all'interno di una rete
*
* @author Willi Menapace
*/
class Action {

public:

/**
* @return il tipo di azione
*/
virtual ActionTypes getType() = 0;
/**
* Esegue l'azione all'interno del contesto di rete specificato
*
* @param networkResources il contesto di rete
* @param xBee modulo per la trasmissione
*/
virtual void execute(NetworkResources *networkResources, XBee *xBee) = 0;
/**
* Effettua l'output della configurazione su file
*
* @param fileWriter il file su cui effettuare l'output
*/
virtual void writeToFile(FileWriter *fileWriter) = 0;
virtual ~Action() {};
};

#endif // ACTION_INCLUDED
16 changes: 16 additions & 0 deletions ActionTypes.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* Copyright (C) 2015 Willi Menapace <willi.menapace@gmail.com>, Simone Lorengo - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Willi Menapace <willi.menapace@gmail.com>
*/

#ifndef ACTION_TYPES_INCLUDED
#define ACTION_TYPES_INCLUDED

#include "GlobalDefines.h"

enum ActionTypes {
CONSTANT_OUTPUT_ACTION = 0
};

#endif // ACTION_TYPES_INCLUDED
Loading

0 comments on commit 6ca1509

Please sign in to comment.