blob: daaa66bf53489c8d15d689ae0e3e0b547fd701d4 [file] [log] [blame]
Ernesto Posse8a4f2962015-05-12 13:28:46 -04001// umlrtcapsule.cc
2
3/*******************************************************************************
4* Copyright (c) 2015 Zeligsoft (2009) Limited and others.
5* All rights reserved. This program and the accompanying materials
6* are made available under the terms of the Eclipse Public License v1.0
7* which accompanies this distribution, and is available at
8* http://www.eclipse.org/legal/epl-v10.html
9*******************************************************************************/
10
11#include "umlrtcapsuleclass.hh"
12#include "umlrtcapsule.hh"
13#include "umlrtframeservice.hh"
14#include "basedebug.hh"
15#include "basedebugtype.hh"
Barry Maherf9252612015-05-31 11:33:20 -040016#include <stdio.h>
Ernesto Posse8a4f2962015-05-12 13:28:46 -040017
18UMLRTCapsule::~UMLRTCapsule ( )
19{
20 BDEBUG(BD_INSTANTIATE, "%s destructor\n", slot->name);
21 UMLRTCapsuleToControllerMap::removeCapsule(slot->name, this);
22}
23
Barry Maherf9252612015-05-31 11:33:20 -040024UMLRTCapsule::UMLRTCapsule ( const UMLRTRtsInterface * rtsif_, const UMLRTCapsuleClass * capsuleClass_, UMLRTSlot * slot, const UMLRTCommsPort * * borderPorts_, const UMLRTCommsPort * internalPorts_, bool isStatic_ ) : msg(NULL), rtsif(rtsif_), capsuleClass(capsuleClass_), slot(slot), borderPorts(borderPorts_), internalPorts(internalPorts_), isStatic(isStatic_)
Ernesto Posse8a4f2962015-05-12 13:28:46 -040025{
26 BDEBUG(BD_INSTANTIATE, "slot %s constructor\n", slot->name);
27 UMLRTCapsuleToControllerMap::addCapsule(slot->name, this);
28}
29
30void UMLRTCapsule::unbindPort ( bool isBorder, int portIndex, int farEndIndex )
31{
32}
33
34void UMLRTCapsule::bindPort ( bool isBorder, int portIndex, int farEndIndex )
35{
36}
Barry Maherf9252612015-05-31 11:33:20 -040037
38void UMLRTCapsule::unexpectedMessage ( ) const
39{
40 fprintf( stderr, "capsule %s unexpected message on port %s protocol %s signal id %d\n",
41 getName(), getMsg()->destPort->role()->name, getMsg()->destPort->role()->protocol, getMsg()->signal.getId());
42}