AddWriteDataCollectionMessage.F90 Source File


This file depends on

sourcefile~~addwritedatacollectionmessage.f90~~EfferentGraph sourcefile~addwritedatacollectionmessage.f90 AddWriteDataCollectionMessage.F90 sourcefile~abstractmessage.f90 AbstractMessage.F90 sourcefile~addwritedatacollectionmessage.f90->sourcefile~abstractmessage.f90 sourcefile~filemetadata.f90 FileMetadata.F90 sourcefile~addwritedatacollectionmessage.f90->sourcefile~filemetadata.f90 sourcefile~mapl_exceptionhandling.f90 MAPL_ExceptionHandling.F90 sourcefile~addwritedatacollectionmessage.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~pfio_constants.f90 pFIO_Constants.F90 sourcefile~addwritedatacollectionmessage.f90->sourcefile~pfio_constants.f90 sourcefile~pfio_utilities.f90 pFIO_Utilities.F90 sourcefile~addwritedatacollectionmessage.f90->sourcefile~pfio_utilities.f90 sourcefile~abstractmessage.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~filemetadata.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~filemetadata.f90->sourcefile~pfio_constants.f90 sourcefile~filemetadata.f90->sourcefile~pfio_utilities.f90 sourcefile~attribute.f90 Attribute.F90 sourcefile~filemetadata.f90->sourcefile~attribute.f90 sourcefile~coordinatevariable.f90 CoordinateVariable.F90 sourcefile~filemetadata.f90->sourcefile~coordinatevariable.f90 sourcefile~keywordenforcer.f90 KeywordEnforcer.F90 sourcefile~filemetadata.f90->sourcefile~keywordenforcer.f90 sourcefile~stringintegermaputil.f90 StringIntegerMapUtil.F90 sourcefile~filemetadata.f90->sourcefile~stringintegermaputil.f90 sourcefile~stringvariablemap.f90 StringVariableMap.F90 sourcefile~filemetadata.f90->sourcefile~stringvariablemap.f90 sourcefile~stringvectorutil.f90 StringVectorUtil.F90 sourcefile~filemetadata.f90->sourcefile~stringvectorutil.f90 sourcefile~unlimitedentity.f90 UnlimitedEntity.F90 sourcefile~filemetadata.f90->sourcefile~unlimitedentity.f90 sourcefile~variable.f90 Variable.F90 sourcefile~filemetadata.f90->sourcefile~variable.f90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~mapl_exceptionhandling.f90->sourcefile~errorhandling.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~mapl_exceptionhandling.f90->sourcefile~mapl_throw.f90 sourcefile~pfio_utilities.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~pfio_utilities.f90->sourcefile~pfio_constants.f90 sourcefile~attribute.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~attribute.f90->sourcefile~pfio_utilities.f90 sourcefile~attribute.f90->sourcefile~unlimitedentity.f90 sourcefile~coordinatevariable.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~coordinatevariable.f90->sourcefile~pfio_constants.f90 sourcefile~coordinatevariable.f90->sourcefile~pfio_utilities.f90 sourcefile~coordinatevariable.f90->sourcefile~keywordenforcer.f90 sourcefile~coordinatevariable.f90->sourcefile~variable.f90 sourcefile~errorhandling.f90->sourcefile~mapl_throw.f90 sourcefile~stringintegermaputil.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~stringintegermaputil.f90->sourcefile~pfio_utilities.f90 sourcefile~stringvariablemap.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~stringvariablemap.f90->sourcefile~pfio_utilities.f90 sourcefile~stringvariablemap.f90->sourcefile~coordinatevariable.f90 sourcefile~stringvariablemap.f90->sourcefile~variable.f90 sourcefile~stringvectorutil.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~stringvectorutil.f90->sourcefile~pfio_utilities.f90 sourcefile~stringvectorutil.f90->sourcefile~attribute.f90 sourcefile~unlimitedentity.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~unlimitedentity.f90->sourcefile~pfio_constants.f90 sourcefile~unlimitedentity.f90->sourcefile~pfio_utilities.f90 sourcefile~variable.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~variable.f90->sourcefile~pfio_constants.f90 sourcefile~variable.f90->sourcefile~pfio_utilities.f90 sourcefile~variable.f90->sourcefile~attribute.f90 sourcefile~variable.f90->sourcefile~keywordenforcer.f90 sourcefile~variable.f90->sourcefile~stringvectorutil.f90 sourcefile~variable.f90->sourcefile~unlimitedentity.f90

Files dependent on this one

sourcefile~~addwritedatacollectionmessage.f90~~AfferentGraph sourcefile~addwritedatacollectionmessage.f90 AddWriteDataCollectionMessage.F90 sourcefile~clientthread.f90 ClientThread.F90 sourcefile~clientthread.f90->sourcefile~addwritedatacollectionmessage.f90 sourcefile~messagevisitor.f90 MessageVisitor.F90 sourcefile~clientthread.f90->sourcefile~messagevisitor.f90 sourcefile~messagevisitor.f90->sourcefile~addwritedatacollectionmessage.f90 sourcefile~mockclientthread.f90 MockClientThread.F90 sourcefile~mockclientthread.f90->sourcefile~addwritedatacollectionmessage.f90 sourcefile~mockclientthread.f90->sourcefile~clientthread.f90 sourcefile~mockclientthread.f90->sourcefile~messagevisitor.f90 sourcefile~protocolparser.f90 ProtocolParser.F90 sourcefile~protocolparser.f90->sourcefile~addwritedatacollectionmessage.f90 sourcefile~serverthread.f90 ServerThread.F90 sourcefile~serverthread.f90->sourcefile~addwritedatacollectionmessage.f90 sourcefile~serverthread.f90->sourcefile~messagevisitor.f90 sourcefile~baseserver.f90 BaseServer.F90 sourcefile~baseserver.f90->sourcefile~serverthread.f90 sourcefile~basethread.f90 BaseThread.F90 sourcefile~basethread.f90->sourcefile~messagevisitor.f90 sourcefile~clientmanager.f90 ClientManager.F90 sourcefile~clientmanager.f90->sourcefile~clientthread.f90 sourcefile~clientthreadvector.f90 ClientThreadVector.F90 sourcefile~clientthreadvector.f90->sourcefile~clientthread.f90 sourcefile~directoryservice.f90 DirectoryService.F90 sourcefile~directoryservice.f90->sourcefile~clientthread.f90 sourcefile~directoryservice.f90->sourcefile~protocolparser.f90 sourcefile~directoryservice.f90->sourcefile~serverthread.f90 sourcefile~fastclientthread.f90 FastClientThread.F90 sourcefile~fastclientthread.f90->sourcefile~clientthread.f90 sourcefile~maplframework.f90 MaplFramework.F90 sourcefile~maplframework.f90->sourcefile~clientthread.f90 sourcefile~messagevector.f90 MessageVector.F90 sourcefile~messagevector.f90->sourcefile~protocolparser.f90 sourcefile~mockclient.f90 MockClient.F90 sourcefile~mockclient.f90->sourcefile~clientthread.f90 sourcefile~mockserverthread.f90 MockServerThread.F90 sourcefile~mockserverthread.f90->sourcefile~messagevisitor.f90 sourcefile~mockserverthread.f90->sourcefile~serverthread.f90 sourcefile~mpiserver.f90 MpiServer.F90 sourcefile~mpiserver.f90->sourcefile~serverthread.f90 sourcefile~mpisocket.f90 MpiSocket.F90 sourcefile~mpisocket.f90->sourcefile~protocolparser.f90 sourcefile~multicommserver.f90 MultiCommServer.F90 sourcefile~multicommserver.f90->sourcefile~serverthread.f90 sourcefile~multigroupserver.f90 MultiGroupServer.F90 sourcefile~multigroupserver.f90->sourcefile~serverthread.f90 sourcefile~multilayerserver.f90 MultiLayerServer.F90 sourcefile~multilayerserver.f90->sourcefile~serverthread.f90 sourcefile~openmpserver.f90 OpenMPServer.F90 sourcefile~openmpserver.f90->sourcefile~serverthread.f90 sourcefile~pfio.f90 pFIO.F90 sourcefile~pfio.f90->sourcefile~clientthread.f90 sourcefile~pfio.f90->sourcefile~serverthread.f90 sourcefile~serverthreadvector.f90 ServerThreadVector.F90 sourcefile~serverthreadvector.f90->sourcefile~serverthread.f90 sourcefile~test_client.pf Test_Client.pf sourcefile~test_client.pf->sourcefile~mockclientthread.f90 sourcefile~test_mpisocket.pf Test_MpiSocket.pf sourcefile~test_mpisocket.pf->sourcefile~protocolparser.f90 sourcefile~test_protocolparser.pf Test_ProtocolParser.pf sourcefile~test_protocolparser.pf->sourcefile~protocolparser.f90 sourcefile~test_serverthread.pf Test_ServerThread.pf sourcefile~test_serverthread.pf->sourcefile~serverthread.f90 sourcefile~test_simplesocket.pf Test_SimpleSocket.pf sourcefile~test_simplesocket.pf->sourcefile~clientthread.f90 sourcefile~test_simplesocket.pf->sourcefile~serverthread.f90

Source Code

#include "MAPL_ErrLog.h"
#include "unused_dummy.H"

module pFIO_AddWriteDataCollectionMessageMod

   use MAPL_ExceptionHandling
   use pFIO_UtilitiesMod
   use pFIO_AbstractMessageMod
   use pFIO_FileMetadataMod
   use pFIO_ConstantsMod
   implicit none
   private

   public :: AddWriteDataCollectionMessage

   type, extends(AbstractMessage) :: AddWriteDataCollectionMessage
      type(FileMetadata) :: fmd
      integer :: create_mode
   contains
      procedure, nopass :: get_type_id
      procedure :: get_length
      procedure :: serialize
      procedure :: deserialize
   end type AddWriteDataCollectionMessage

   interface AddWriteDataCollectionMessage
      module procedure new_AddWriteDataCollectionMessage
   end interface AddWriteDataCollectionMessage

contains

   function new_AddWriteDataCollectionMessage(fmd, mode) result(message)
      type (AddWriteDataCollectionMessage) :: message
      type(FileMetadata), intent(in) :: fmd
      integer, optional, intent(in) :: mode
      message%fmd = fmd
      message%create_mode = PFIO_NOCLOBBER
      if( present(mode)) message%create_mode = mode
   end function new_AddWriteDataCollectionMessage

   
   integer function get_type_id() result(type_id)
      type_id = ADD_WRITEDATA_COLLECTION_ID
   end function get_type_id


   integer function get_length(this) result(length)
      class (AddWriteDataCollectionMessage), intent(in) :: this
      integer,allocatable :: buffer(:) ! no-op
      call this%fmd%serialize(buffer)
      length = size(buffer) + 1 ! 1 is the create_mode
   end function get_length


   subroutine serialize(this, buffer, rc)
      class (AddWriteDataCollectionMessage), intent(in) :: this
      integer, intent(inout) :: buffer(:) ! no-op
      integer, optional, intent(out) :: rc

      integer,allocatable :: tmp_buffer(:) ! no-op
      integer :: status
      call this%fmd%serialize(tmp_buffer, status)
      _VERIFY(status)
      buffer = [tmp_buffer,serialize_intrinsic(this%create_mode)]
      _RETURN(_SUCCESS)
   end subroutine serialize


   subroutine deserialize(this, buffer,rc)
      class (AddWriteDataCollectionMessage), intent(inout) :: this
      integer, intent(in) :: buffer(:)
      integer, optional, intent(out) :: rc
      integer :: n, length, status

      n = 1
      call FileMetaData_deserialize(buffer(n:), this%fmd, status)
      _VERIFY(status)
      call deserialize_intrinsic(buffer(n:), length)
      n = n + length 
      call deserialize_intrinsic(buffer(n:), this%create_mode)
      _RETURN(_SUCCESS)
   end subroutine deserialize

end module pFIO_AddWriteDataCollectionMessageMod