func (session *Session) GetIsHeartBeatTask() bool {
    return session.sessionConfig.isHeartBeatTask
}
/*
Get session is-hb-task
return: is-hb-task value
package libcoap
import "C"
import "strings"
import "strconv"
import "github.com/shopspring/decimal"
import "math"
import dots_config "github.com/nttdots/go-dots/dots_server/config"
type Session struct {
    ptr *C.coap_session_t
    sessionConfig *SessionConfig
}
type SessionConfig struct {
    isReceiveHeartBeat       bool
    isReceiveResponseContent bool
    isHeartBeatTask          bool
    isSentHeartBeat          bool
    isReceivedPreMitigation  bool
    isNotification           bool
    isSentNotification       bool
    missing_hb_allowed       int
    current_missing_hb       int
}
var sessions = make(map[*C.coap_session_t] *Session)
func (session *Session) SessionRelease() {
    ptr := session.ptr
    delete(sessions, ptr)
    session.ptr = nil
    C.coap_session_handle_release(ptr)
}
func (session *Session) SetMaxRetransmit (value int) {
    C.coap_session_set_max_retransmit(session.ptr, C.uint(value))
}
func (session *Session) SetAckTimeout (value decimal.Decimal) {
    valStr := value.String()
    parts := strings.Split(valStr, ".")
    intPart,_ := strconv.Atoi(parts[0])
    var fraction float64
    if len(parts) > 1 {
        fractionPart,_ := strconv.Atoi(parts[1])
        fraction = float64(fractionPart) * (math.Pow10(-len(parts[1])))
    }
    C.coap_session_set_ack_timeout (session.ptr, C.coap_fixed_point_t{C.uint16_t(intPart), C.uint16_t(fraction * 1000)})
}
func (session *Session) SetAckRandomFactor (value decimal.Decimal) {
    valStr := value.String()
    parts := strings.Split(valStr, ".")
    intPart,_ := strconv.Atoi(parts[0])
    var fraction float64
    if len(parts) > 1 {
        fractionPart,_ := strconv.Atoi(parts[1])
        fraction = float64(fractionPart) * (math.Pow10(-len(parts[1])))
    }
    C.coap_session_set_ack_random_factor (session.ptr, C.coap_fixed_point_t{C.uint16_t(intPart), C.uint16_t(fraction * 1000)})
}
func (session *Session) String() string {
    res := C.GoString(C.coap_session_str(session.ptr))
    return res
}
func ConnectingSessions() map[*C.coap_session_t] *Session {
    return sessions
}
 func AddNewConnectingSession(session *Session) {
    sessions[session.ptr] = session
}
func RemoveConnectingSession(session *Session) {
    delete(sessions, session.ptr)
}
func (session *Session) GetCurrentMissingHb() int {
    return session.sessionConfig.current_missing_hb
}
 func (session *Session) GetMissingHbAllowed() int {
    return session.sessionConfig.missing_hb_allowed
}
func (session *Session) SetCurrentMissingHb(new_hb_allowed int) {
    session.sessionConfig.current_missing_hb = new_hb_allowed
}