Ignore:
Timestamp:
Apr 5, 2019, 9:26:53 PM (5 years ago)
Author:
coas-nagasima
Message:

mbed関連を更新
シリアルドライバをmbedのHALを使うよう変更
ファイルディスクリプタの処理を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tecsgen/tecslib/core/types.rb

    r359 r374  
    44#      Generator for TOPPERS Embedded Component System
    55#
    6 #   Copyright (C) 2008-2015 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#-- 
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    629629
    630630class FloatType < Type
    631 #  @bit_size::         32, 64, (80), -32, -64
     631#  @bit_size::         32, 64, (80), -32, -64, -128
    632632
    633633  def initialize( bit_size )
     
    684684    when -64
    685685      str = "#{str}double"
     686    when -128
     687      str = "#{str}long double"
    686688    end
    687689    return str
     
    15581560# 動的結合で渡すデスクリプタ型
    15591561class DescriptorType < Type
    1560 # @sinagure_nsp::NamespacePath
     1562  # @sinagure_nsp::NamespacePath
     1563
     1564  @@descriptors = {}
    15611565
    15621566  def initialize( signature_nsp )
    1563     # p "Desc #{signature_nsp.to_s}"
    1564     obj = Namespace.find signature_nsp
    1565     if ! obj.kind_of? Signature then
    1566       cdl_error( "T9999 '$1': not signature or not found", signature_nsp.to_s )
    1567       @signature_nsp = signature_nsp
    1568     else
    1569       if obj.has_descriptor? then
    1570        # cdl_error( "T9999 '$1': has Descriptor in function parameter", signature_nsp.to_s )
    1571       end
    1572       @signature_nsp = obj.get_namespace_path
    1573     end
     1567    @signature_nsp = signature_nsp
     1568    # check_signature ##
     1569    @@descriptors[ self ] = false
    15741570  end
    15751571
     
    15951591    else
    15961592      cdl_error2( locale, "T9999 Descriptor cannot be used for $1", kind)
     1593    end
     1594  end
     1595
     1596  def self.check_signature
     1597    @@descriptors.each{ |desc, val|
     1598      if val != true then
     1599        desc.check_signature
     1600        @@descriptors[ desc ] = true
     1601      end
     1602    }
     1603  end
     1604 
     1605  def check_signature
     1606    # p "Desc #{@signature_nsp.to_s}"
     1607    obj = Namespace.find @signature_nsp
     1608    if ! obj.kind_of? Signature then
     1609      cdl_error( "T9999 '$1': not signature or not found", @signature_nsp.to_s )
     1610    else
     1611      if obj.has_descriptor? then
     1612       # cdl_error( "T9999 '$1': has Descriptor in function parameter", @signature_nsp.to_s )
     1613      end
     1614      # @signature_nsp = obj.get_namespace_path
    15971615    end
    15981616  end
Note: See TracChangeset for help on using the changeset viewer.